mirror of
https://github.com/ppy/osu.git
synced 2025-01-07 15:32:58 +08:00
Make a separate if section for all highlighted case
This commit is contained in:
parent
8fdf859375
commit
377ae3e685
@ -100,26 +100,20 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
|
|
||||||
private void updateState()
|
private void updateState()
|
||||||
{
|
{
|
||||||
// Expand based on the local state
|
if (SelectedTab.Value == null && !externalDimRequested)
|
||||||
bool shouldExpand = Active.Value || IsHovered;
|
|
||||||
|
|
||||||
bool allHighlighted = SelectedTab.Value == null && !externalDimRequested;
|
|
||||||
|
|
||||||
// Expand based on whether no build is selected and the badge area is hovered
|
|
||||||
shouldExpand |= allHighlighted;
|
|
||||||
|
|
||||||
if (shouldExpand)
|
|
||||||
{
|
{
|
||||||
expandingBar.Expand();
|
expandingBar.Expand();
|
||||||
expandingBar.FadeTo(1, transition_duration, Easing.OutQuint);
|
expandingBar.FadeTo(1, transition_duration, Easing.OutQuint);
|
||||||
}
|
text.FadeTo(1, transition_duration, Easing.OutQuint);
|
||||||
else
|
return;
|
||||||
{
|
|
||||||
expandingBar.Collapse();
|
|
||||||
expandingBar.FadeTo(0.5f, transition_duration, Easing.OutQuint);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
text.FadeTo(IsHovered || (Active.Value && !externalDimRequested) || allHighlighted ? 1 : 0.5f, transition_duration, Easing.OutQuint);
|
var shouldExpand = Active.Value || IsHovered;
|
||||||
|
|
||||||
|
expandingBar.IsCollapsed = !shouldExpand;
|
||||||
|
expandingBar.FadeTo(shouldExpand ? 1 : 0.5f, transition_duration, Easing.OutQuint);
|
||||||
|
|
||||||
|
text.FadeTo(IsHovered || (Active.Value && !externalDimRequested) ? 1 : 0.5f, transition_duration, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool externalDimRequested;
|
private bool externalDimRequested;
|
||||||
|
Loading…
Reference in New Issue
Block a user