mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 05:43:18 +08:00
Merge pull request #6523 from Joehuu/make-most-textbox-carets-movable
Make most textbox carets movable
This commit is contained in:
commit
f43e4bfd70
@ -14,8 +14,6 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
protected virtual bool AllowCommit => false;
|
protected virtual bool AllowCommit => false;
|
||||||
|
|
||||||
public override bool HandleLeftRightArrows => false;
|
|
||||||
|
|
||||||
public SearchTextBox()
|
public SearchTextBox()
|
||||||
{
|
{
|
||||||
Height = 35;
|
Height = 35;
|
||||||
|
13
osu.Game/Graphics/UserInterface/SeekLimitedSearchTextBox.cs
Normal file
13
osu.Game/Graphics/UserInterface/SeekLimitedSearchTextBox.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
namespace osu.Game.Graphics.UserInterface
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A <see cref="SearchTextBox"/> which does not handle left/right arrow keys for seeking.
|
||||||
|
/// </summary>
|
||||||
|
public class SeekLimitedSearchTextBox : SearchTextBox
|
||||||
|
{
|
||||||
|
public override bool HandleLeftRightArrows => false;
|
||||||
|
}
|
||||||
|
}
|
@ -37,7 +37,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
protected SettingsSectionsContainer SectionsContainer;
|
protected SettingsSectionsContainer SectionsContainer;
|
||||||
|
|
||||||
private SearchTextBox searchTextBox;
|
private SeekLimitedSearchTextBox searchTextBox;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provide a source for the toolbar height.
|
/// Provide a source for the toolbar height.
|
||||||
@ -80,7 +80,7 @@ namespace osu.Game.Overlays
|
|||||||
Masking = true,
|
Masking = true,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
ExpandableHeader = CreateHeader(),
|
ExpandableHeader = CreateHeader(),
|
||||||
FixedHeader = searchTextBox = new SearchTextBox
|
FixedHeader = searchTextBox = new SeekLimitedSearchTextBox
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
|
@ -49,7 +49,7 @@ namespace osu.Game.Screens.Select
|
|||||||
return criteria;
|
return criteria;
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly SearchTextBox searchTextBox;
|
private readonly SeekLimitedSearchTextBox searchTextBox;
|
||||||
|
|
||||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) =>
|
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) =>
|
||||||
base.ReceivePositionalInputAt(screenSpacePos) || groupTabs.ReceivePositionalInputAt(screenSpacePos) || sortTabs.ReceivePositionalInputAt(screenSpacePos);
|
base.ReceivePositionalInputAt(screenSpacePos) || groupTabs.ReceivePositionalInputAt(screenSpacePos) || sortTabs.ReceivePositionalInputAt(screenSpacePos);
|
||||||
@ -73,7 +73,7 @@ namespace osu.Game.Screens.Select
|
|||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
searchTextBox = new SearchTextBox { RelativeSizeAxes = Axes.X },
|
searchTextBox = new SeekLimitedSearchTextBox { RelativeSizeAxes = Axes.X },
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Loading…
Reference in New Issue
Block a user