1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-31 14:30:30 +08:00

Use enum for background states

This commit is contained in:
Dean Herbert
2026-01-27 18:58:03 +09:00
Unverified
parent 12eeab581e
commit fa22d1f202
8 changed files with 93 additions and 62 deletions
@@ -212,9 +212,14 @@ namespace osu.Game.Graphics.UserInterfaceV2
caption.Colour = Current.Disabled ? colourProvider.Foreground1 : colourProvider.Content2;
filenameText.Colour = Current.Disabled || Current.Value == null ? colourProvider.Foreground1 : colourProvider.Content1;
background.StyleDisabled = Current.Disabled;
background.StyleFocused = popoverState.Value == Visibility.Visible;
background.StyleHovered = IsHovered;
if (Current.Disabled)
background.VisualStyle = VisualStyle.Disabled;
else if (popoverState.Value == Visibility.Visible)
background.VisualStyle = VisualStyle.Focused;
else if (IsHovered)
background.VisualStyle = VisualStyle.Hovered;
else
background.VisualStyle = VisualStyle.Normal;
}
protected override void Dispose(bool isDisposing)