1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 07:49:52 +08:00

Adjust switch buttons to make the state more obvious

This commit is contained in:
Dean Herbert
2026-01-09 17:42:54 +09:00
committed by Salman Alshamrani
Unverified
parent 876dcd060c
commit 029d544720
@@ -51,7 +51,6 @@ namespace osu.Game.Graphics.UserInterfaceV2
{
RelativeSizeAxes = Axes.Both,
AlwaysPresent = true,
Alpha = 0
},
new Container
{
@@ -92,7 +91,6 @@ namespace osu.Game.Graphics.UserInterfaceV2
private void updateState()
{
nub.MoveToX(Current.Value ? nubContainer.DrawWidth - nub.DrawWidth : 0, 200, Easing.OutQuint);
fill.FadeTo(Current.Value ? 1 : 0, 250, Easing.OutQuint);
updateColours();
}
@@ -139,7 +137,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
bool hover = IsHovered && !Current.Disabled;
borderColour = hover ? colourProvider.Highlight1.Opacity(0.5f) : colourProvider.Highlight1.Opacity(0.3f);
switchColour = hover ? colourProvider.Highlight1 : colourProvider.Light4;
switchColour = hover || Current.Value ? colourProvider.Highlight1 : colourProvider.Light4;
if (!Current.Value)
{
@@ -147,7 +145,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
switchColour = switchColour.MultiplyAlpha(0.8f);
}
fill.Colour = colourProvider.Background6;
fill.Colour = Current.Value ? colourProvider.Colour4.Darken(0.2f) : colourProvider.Background6;
}
nubContainer.FadeColour(switchColour, 250, Easing.OutQuint);