mirror of
https://github.com/ppy/osu.git
synced 2026-05-20 06:00:25 +08:00
Use enum for background states
This commit is contained in:
@@ -185,9 +185,14 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
||||
caption.Colour = disabled ? colourProvider.Background1 : colourProvider.Content2;
|
||||
textBox.Colour = disabled ? colourProvider.Foreground1 : colourProvider.Content1;
|
||||
|
||||
background.StyleDisabled = Current.Disabled;
|
||||
background.StyleFocused = textBox.Focused.Value;
|
||||
background.StyleHovered = IsHovered;
|
||||
if (Current.Disabled)
|
||||
background.VisualStyle = VisualStyle.Disabled;
|
||||
else if (textBox.Focused.Value)
|
||||
background.VisualStyle = VisualStyle.Focused;
|
||||
else if (IsHovered)
|
||||
background.VisualStyle = VisualStyle.Hovered;
|
||||
else
|
||||
background.VisualStyle = VisualStyle.Normal;
|
||||
}
|
||||
|
||||
internal partial class InnerTextBox : OsuTextBox
|
||||
|
||||
Reference in New Issue
Block a user