mirror of https://github.com/ppy/osu
Added DeselectAll
This commit is contained in:
parent
a024353574
commit
3f5d155583
|
@ -121,6 +121,14 @@ public Color4 SelectedColour
|
|||
}
|
||||
}
|
||||
|
||||
public void DeselectAll()
|
||||
{
|
||||
foreach (ModButton button in buttons)
|
||||
{
|
||||
button.Deselect();
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonPressed(Mod mod)
|
||||
{
|
||||
Action?.Invoke(SelectedMods);
|
||||
|
|
|
@ -97,6 +97,13 @@ protected override void OnFocusLost(InputState state)
|
|||
base.OnFocusLost(state);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
low_multiplier_colour = colours.Red;
|
||||
high_multiplier_colour = colours.Green;
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
{
|
||||
base.PopIn();
|
||||
|
@ -135,11 +142,15 @@ protected override void TransitionOut()
|
|||
}
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
public void DeselectAll()
|
||||
{
|
||||
low_multiplier_colour = colours.Red;
|
||||
high_multiplier_colour = colours.Green;
|
||||
foreach (ModSection section in sections)
|
||||
{
|
||||
foreach (ModButton button in section.Buttons)
|
||||
{
|
||||
button.Deselect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void modButtonPressed(Mod[] sectionSelectedMods)
|
||||
|
@ -205,6 +216,7 @@ private void modButtonPressed(Mod[] sectionSelectedMods)
|
|||
// 1.00x
|
||||
// 1.05x
|
||||
// 1.20x
|
||||
|
||||
multiplierLabel.Text = string.Format("{0:N2}x", multiplier);
|
||||
rankedLabel.Text = $"{ranked ? @"Ranked" : @"Unranked"}, Score Multiplier: ";
|
||||
if (multiplier > 1.0)
|
||||
|
|
Loading…
Reference in New Issue