mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 04:22:55 +08:00
Block certain operations when customisation panel is open
Normally I would just block keyboard input from going past `ModCustomisationPanel`, but it's a little complicated here since I'm dealing with global action key binding presses, and I also still want actions like `GlobalAction.Back` to get past the customisation panel even if it's expanded.
This commit is contained in:
parent
57ee794398
commit
3f06a0ef9e
@ -691,7 +691,7 @@ namespace osu.Game.Overlays.Mods
|
||||
// wherein activating the binding will both change the contents of the search text box and deselect all mods.
|
||||
case GlobalAction.DeselectAllMods:
|
||||
{
|
||||
if (!SearchTextBox.HasFocus)
|
||||
if (!SearchTextBox.HasFocus && !customisationPanel.Expanded.Value)
|
||||
{
|
||||
deselectAllModsButton.TriggerClick();
|
||||
return true;
|
||||
@ -762,6 +762,9 @@ namespace osu.Game.Overlays.Mods
|
||||
if (e.Repeat || e.Key != Key.Tab)
|
||||
return false;
|
||||
|
||||
if (customisationPanel.Expanded.Value)
|
||||
return true;
|
||||
|
||||
// TODO: should probably eventually support typical platform search shortcuts (`Ctrl-F`, `/`)
|
||||
setTextBoxFocus(!SearchTextBox.HasFocus);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user