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:
parent
8bba6288a8
commit
649951198e
@ -14,8 +14,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
protected virtual bool AllowCommit => false;
|
||||
|
||||
public override bool HandleLeftRightArrows => false;
|
||||
|
||||
public SearchTextBox()
|
||||
{
|
||||
Height = 35;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user