mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 20:47:22 +08:00
TextSize -> SpaceWidth (temporary).
This commit is contained in:
parent
b3e2339175
commit
7f0212f93f
@ -40,7 +40,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
internal event OnCommitHandler OnCommit;
|
internal event OnCommitHandler OnCommit;
|
||||||
public event OnCommitHandler OnChange;
|
public event OnCommitHandler OnChange;
|
||||||
|
|
||||||
internal float TextSize { get; private set; }
|
internal float SpaceWidth = 10;
|
||||||
|
|
||||||
float length;
|
float length;
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
textFlow = new FlowContainer()
|
textFlow = new FlowContainer()
|
||||||
{
|
{
|
||||||
Direction = FlowDirection.HorizontalOnly,
|
Direction = FlowDirection.HorizontalOnly,
|
||||||
//Padding = new Vector2(-TextSize / 3, 0)
|
//Padding = new Vector2(-SpaceWidth / 3, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
cursor = new Box()
|
cursor = new Box()
|
||||||
@ -278,19 +278,19 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
if (char.IsWhiteSpace(c))
|
if (char.IsWhiteSpace(c))
|
||||||
{
|
{
|
||||||
float width = TextSize / 2;
|
float width = SpaceWidth / 2;
|
||||||
|
|
||||||
switch ((int)c)
|
switch ((int)c)
|
||||||
{
|
{
|
||||||
case 0x3000: //double-width space
|
case 0x3000: //double-width space
|
||||||
width = TextSize;
|
width = SpaceWidth;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
textFlow.Add(ch = new Container()
|
textFlow.Add(ch = new Container()
|
||||||
{
|
{
|
||||||
SizeMode = InheritMode.None,
|
SizeMode = InheritMode.None,
|
||||||
Size = new Vector2(width, TextSize),
|
Size = new Vector2(width, SpaceWidth),
|
||||||
Depth = selectionLeft
|
Depth = selectionLeft
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -335,7 +335,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
Drawable ch = AddCharacterToFlow(c);
|
Drawable ch = AddCharacterToFlow(c);
|
||||||
|
|
||||||
ch.Position = new Vector2(0, TextSize);
|
ch.Position = new Vector2(0, SpaceWidth);
|
||||||
ch.MoveToY(0, 200, EasingTypes.OutExpo);
|
ch.MoveToY(0, 200, EasingTypes.OutExpo);
|
||||||
|
|
||||||
text = text.Insert(selectionLeft, c.ToString());
|
text = text.Insert(selectionLeft, c.ToString());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user