mirror of
https://github.com/ppy/osu.git
synced 2024-09-22 10:47:25 +08:00
switch to changing Mod property
This commit is contained in:
parent
c08fc62e00
commit
abdebcfddc
@ -80,7 +80,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
foregroundIcon.RotateTo(rotate_angle * direction, mod_switch_duration, mod_switch_easing);
|
foregroundIcon.RotateTo(rotate_angle * direction, mod_switch_duration, mod_switch_easing);
|
||||||
backgroundIcon.RotateTo(-rotate_angle * direction, mod_switch_duration, mod_switch_easing);
|
backgroundIcon.RotateTo(-rotate_angle * direction, mod_switch_duration, mod_switch_easing);
|
||||||
|
|
||||||
backgroundIcon.Icon = modAfter.Icon;
|
backgroundIcon.Mod = modAfter;
|
||||||
|
|
||||||
using (BeginDelayedSequence(mod_switch_duration, true))
|
using (BeginDelayedSequence(mod_switch_duration, true))
|
||||||
{
|
{
|
||||||
@ -218,8 +218,8 @@ namespace osu.Game.Overlays.Mods
|
|||||||
private void displayMod(Mod mod)
|
private void displayMod(Mod mod)
|
||||||
{
|
{
|
||||||
if (backgroundIcon != null)
|
if (backgroundIcon != null)
|
||||||
backgroundIcon.Icon = foregroundIcon.Icon;
|
backgroundIcon.Mod = foregroundIcon.Mod;
|
||||||
foregroundIcon.Icon = mod.Icon;
|
foregroundIcon.Mod = mod;
|
||||||
text.Text = mod.Name;
|
text.Text = mod.Name;
|
||||||
Colour = mod.HasImplementation ? Color4.White : Color4.Gray;
|
Colour = mod.HasImplementation ? Color4.White : Color4.Gray;
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,13 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
public virtual string TooltipText { get; }
|
public virtual string TooltipText { get; }
|
||||||
|
|
||||||
protected Mod Mod { get; set; }
|
private Mod mod;
|
||||||
|
|
||||||
|
public Mod Mod
|
||||||
|
{
|
||||||
|
get => mod;
|
||||||
|
set => mod = value;
|
||||||
|
}
|
||||||
|
|
||||||
public ModIcon(Mod mod)
|
public ModIcon(Mod mod)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user