mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 18:32:56 +08:00
Fix mod search textbox having focus while settings are visible
Stopped arrow key adjust on slider bars from working. Also just felt wrong that you could type into an off-screen textbox.
This commit is contained in:
parent
c466775f78
commit
51f4c7254c
@ -508,6 +508,11 @@ namespace osu.Game.Overlays.Mods
|
||||
|
||||
modSettingsArea.ResizeHeightTo(modAreaHeight, transition_duration, Easing.InOutCubic);
|
||||
TopLevelContent.MoveToY(-modAreaHeight, transition_duration, Easing.InOutCubic);
|
||||
|
||||
if (customisationVisible.Value)
|
||||
GetContainingInputManager().ChangeFocus(modSettingsArea);
|
||||
else
|
||||
Scheduler.Add(() => GetContainingInputManager().ChangeFocus(null));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -622,7 +627,7 @@ namespace osu.Game.Overlays.Mods
|
||||
}
|
||||
|
||||
if (textSearchStartsActive.Value)
|
||||
SearchTextBox.TakeFocus();
|
||||
SearchTextBox.HoldFocus = true;
|
||||
}
|
||||
|
||||
protected override void PopOut()
|
||||
@ -761,11 +766,9 @@ namespace osu.Game.Overlays.Mods
|
||||
return false;
|
||||
|
||||
// TODO: should probably eventually support typical platform search shortcuts (`Ctrl-F`, `/`)
|
||||
if (SearchTextBox.HasFocus)
|
||||
SearchTextBox.KillFocus();
|
||||
else
|
||||
SearchTextBox.HoldFocus = !SearchTextBox.HoldFocus;
|
||||
if (SearchTextBox.HoldFocus)
|
||||
SearchTextBox.TakeFocus();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,8 @@ namespace osu.Game.Overlays.Mods
|
||||
[Resolved]
|
||||
private OverlayColourProvider colourProvider { get; set; } = null!;
|
||||
|
||||
public override bool AcceptsFocus => true;
|
||||
|
||||
public ModSettingsArea()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
|
Loading…
Reference in New Issue
Block a user