mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Move alpha management closer to screen level
Felt bad messing with alpha at the column level.
This commit is contained in:
@ -350,7 +350,6 @@ namespace osu.Game.Overlays.Mods
|
|||||||
}
|
}
|
||||||
|
|
||||||
allFiltered.Value = panelFlow.All(panel => panel.Filtered.Value);
|
allFiltered.Value = panelFlow.All(panel => panel.Filtered.Value);
|
||||||
Alpha = allFiltered.Value ? 0 : 1;
|
|
||||||
|
|
||||||
if (toggleAllCheckbox != null && !SelectionAnimationRunning)
|
if (toggleAllCheckbox != null && !SelectionAnimationRunning)
|
||||||
{
|
{
|
||||||
|
@ -580,17 +580,20 @@ namespace osu.Game.Overlays.Mods
|
|||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
Active.BindValueChanged(_ => updateDim(), true);
|
Active.BindValueChanged(_ => updateState());
|
||||||
|
Column.AllFiltered.BindValueChanged(_ => updateState(), true);
|
||||||
FinishTransforms();
|
FinishTransforms();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool RequiresChildrenUpdate => base.RequiresChildrenUpdate || Column.SelectionAnimationRunning;
|
protected override bool RequiresChildrenUpdate => base.RequiresChildrenUpdate || Column.SelectionAnimationRunning;
|
||||||
|
|
||||||
private void updateDim()
|
private void updateState()
|
||||||
{
|
{
|
||||||
Colour4 targetColour;
|
Colour4 targetColour;
|
||||||
|
|
||||||
if (Active.Value)
|
Column.Alpha = Column.AllFiltered.Value ? 0 : 1;
|
||||||
|
|
||||||
|
if (Column.Active.Value)
|
||||||
targetColour = Colour4.White;
|
targetColour = Colour4.White;
|
||||||
else
|
else
|
||||||
targetColour = IsHovered ? colours.GrayC : colours.Gray8;
|
targetColour = IsHovered ? colours.GrayC : colours.Gray8;
|
||||||
@ -609,14 +612,14 @@ namespace osu.Game.Overlays.Mods
|
|||||||
protected override bool OnHover(HoverEvent e)
|
protected override bool OnHover(HoverEvent e)
|
||||||
{
|
{
|
||||||
base.OnHover(e);
|
base.OnHover(e);
|
||||||
updateDim();
|
updateState();
|
||||||
return Active.Value;
|
return Active.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnHoverLost(HoverLostEvent e)
|
protected override void OnHoverLost(HoverLostEvent e)
|
||||||
{
|
{
|
||||||
base.OnHoverLost(e);
|
base.OnHoverLost(e);
|
||||||
updateDim();
|
updateState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user