1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 14:12:56 +08:00

Make most textbox carets movable

This commit is contained in:
Joehu 2019-10-15 14:47:48 -07:00
parent 8bba6288a8
commit 649951198e
2 changed files with 7 additions and 4 deletions

View File

@ -14,8 +14,6 @@ namespace osu.Game.Graphics.UserInterface
{
protected virtual bool AllowCommit => false;
public override bool HandleLeftRightArrows => false;
public SearchTextBox()
{
Height = 35;

View File

@ -49,7 +49,7 @@ namespace osu.Game.Screens.Select
return criteria;
}
private readonly SearchTextBox searchTextBox;
private readonly SongSelectTextBox searchTextBox;
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) =>
base.ReceivePositionalInputAt(screenSpacePos) || groupTabs.ReceivePositionalInputAt(screenSpacePos) || sortTabs.ReceivePositionalInputAt(screenSpacePos);
@ -73,7 +73,7 @@ namespace osu.Game.Screens.Select
Origin = Anchor.TopRight,
Children = new Drawable[]
{
searchTextBox = new SearchTextBox { RelativeSizeAxes = Axes.X },
searchTextBox = new SongSelectTextBox { RelativeSizeAxes = Axes.X },
new Box
{
RelativeSizeAxes = Axes.X,
@ -170,5 +170,10 @@ namespace osu.Game.Screens.Select
}
private void updateCriteria() => FilterChanged?.Invoke(CreateCriteria());
private class SongSelectTextBox : SearchTextBox
{
public override bool HandleLeftRightArrows => false;
}
}
}