mirror of https://github.com/ppy/osu
Fix osu! dropdown search text box having commits disabled
I've also removed inheritance from `SearchTextBox` because it contains logic that might interfere with the internal implementation of dropdown search bars (focus logic and stuff).
This commit is contained in:
parent
e4335a543e
commit
811621325f
|
@ -418,16 +418,19 @@ private partial class OsuDropdownSearchBar : DropdownSearchBar
|
|||
FontSize = OsuFont.Default.Size,
|
||||
};
|
||||
|
||||
private partial class DropdownSearchTextBox : SearchTextBox
|
||||
private partial class DropdownSearchTextBox : OsuTextBox
|
||||
{
|
||||
public override bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider? colourProvider)
|
||||
{
|
||||
if (e.Action == GlobalAction.Back)
|
||||
// this method is blocking Dropdown from receiving the back action, despite this text box residing in a separate input manager.
|
||||
// to fix this properly, a local global action container needs to be added as well, but for simplicity, just don't handle the back action here.
|
||||
return false;
|
||||
BackgroundUnfocused = colourProvider?.Background5 ?? new Color4(10, 10, 10, 255);
|
||||
BackgroundFocused = colourProvider?.Background5 ?? new Color4(10, 10, 10, 255);
|
||||
}
|
||||
|
||||
return base.OnPressed(e);
|
||||
protected override void OnFocus(FocusEvent e)
|
||||
{
|
||||
base.OnFocus(e);
|
||||
BorderThickness = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue