mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:03:08 +08:00
Colour -> GetAppropriateColour, adjust status change transition
This commit is contained in:
parent
62ca76bc41
commit
35814e47e4
@ -78,7 +78,7 @@ namespace osu.Game.Users
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Margin = new MarginPadding { Left = height - status_height - content_padding },
|
||||
Padding = new MarginPadding { Left = height - status_height - content_padding },
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new OsuSpriteText
|
||||
@ -179,7 +179,7 @@ namespace osu.Game.Users
|
||||
|
||||
private void displayStatus(UserStatus status)
|
||||
{
|
||||
statusBg.FadeColour(status.Colour(colours), 200);
|
||||
statusBg.FadeColour(status.GetAppropriateColour(colours), 500, EasingTypes.OutQuint);
|
||||
statusMessage.Text = status.Message;
|
||||
}
|
||||
}
|
||||
|
@ -9,23 +9,23 @@ namespace osu.Game.Users
|
||||
public abstract class UserStatus
|
||||
{
|
||||
public abstract string Message { get; }
|
||||
public abstract Color4 Colour(OsuColour colours);
|
||||
public abstract Color4 GetAppropriateColour(OsuColour colours);
|
||||
}
|
||||
|
||||
public abstract class UserStatusAvailable : UserStatus
|
||||
{
|
||||
public override Color4 Colour(OsuColour colours) => colours.BlueDarker;
|
||||
public override Color4 GetAppropriateColour(OsuColour colours) => colours.BlueDarker;
|
||||
}
|
||||
|
||||
public abstract class UserStatusBusy : UserStatus
|
||||
{
|
||||
public override Color4 Colour(OsuColour colours) => colours.YellowDark;
|
||||
public override Color4 GetAppropriateColour(OsuColour colours) => colours.YellowDark;
|
||||
}
|
||||
|
||||
public class UserStatusOffline : UserStatus
|
||||
{
|
||||
public class UserStatusOffline : UserStatus
|
||||
{
|
||||
public override string Message => @"Offline";
|
||||
public override Color4 Colour(OsuColour colours) => colours.Gray7;
|
||||
public override Color4 GetAppropriateColour(OsuColour colours) => colours.Gray7;
|
||||
}
|
||||
|
||||
public class UserStatusOnline : UserStatusAvailable
|
||||
@ -56,6 +56,6 @@ namespace osu.Game.Users
|
||||
public class UserStatusModding : UserStatus
|
||||
{
|
||||
public override string Message => @"Modding a map";
|
||||
public override Color4 Colour(OsuColour colours) => colours.PurpleDark;
|
||||
public override Color4 GetAppropriateColour(OsuColour colours) => colours.PurpleDark;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user