1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-25 22:40:38 +08:00

More focus hacks

This commit is contained in:
Dean Herbert
2019-01-25 18:38:07 +09:00
Unverified
parent dab27ab47c
commit 090efa8ebb
5 changed files with 8 additions and 14 deletions
@@ -17,6 +17,7 @@ namespace osu.Game.Graphics.UserInterface
public SearchTextBox()
{
Height = 35;
AddRange(new Drawable[]
{
new SpriteIcon
+1 -1
View File
@@ -302,7 +302,7 @@ namespace osu.Game.Overlays
protected override void OnFocus(FocusEvent e)
{
//this is necessary as textbox is masked away and therefore can't get focus :(
GetContainingInputManager().ChangeFocus(textbox);
//GetContainingInputManager().ChangeFocus(textbox);
base.OnFocus(e);
}
+2 -10
View File
@@ -1,7 +1,6 @@
// 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.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
@@ -53,10 +52,9 @@ namespace osu.Game.Overlays.Music
public class FilterTextBox : SearchTextBox
{
private Color4 backgroundColour;
protected override Color4 BackgroundUnfocused => OsuColour.Gray(0.06f);
protected override Color4 BackgroundFocused => OsuColour.Gray(0.12f);
protected override Color4 BackgroundUnfocused => backgroundColour;
protected override Color4 BackgroundFocused => backgroundColour;
protected override bool AllowCommit => true;
public FilterTextBox()
@@ -64,12 +62,6 @@ namespace osu.Game.Overlays.Music
Masking = true;
CornerRadius = 5;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
backgroundColour = colours.Gray2;
}
}
}
}
@@ -127,8 +127,9 @@ namespace osu.Game.Overlays.SearchableList
private class FilterSearchTextBox : SearchTextBox
{
protected override Color4 BackgroundUnfocused => backgroundColour;
protected override Color4 BackgroundFocused => backgroundColour;
protected override Color4 BackgroundUnfocused => OsuColour.Gray(0.06f);
protected override Color4 BackgroundFocused => OsuColour.Gray(0.12f);
protected override bool AllowCommit => true;
private Color4 backgroundColour;
@@ -103,7 +103,7 @@ namespace osu.Game.Overlays.SearchableList
protected override void OnFocus(FocusEvent e)
{
GetContainingInputManager().ChangeFocus(Filter.Search);
//GetContainingInputManager().ChangeFocus(Filter.Search);
}
protected override void PopIn()