mirror of
https://github.com/ppy/osu.git
synced 2026-05-18 04:59:52 +08:00
Make most textbox carets movable
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user