mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Initial design update pass
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
@ -24,7 +23,8 @@ namespace osu.Game.Overlays.Notifications
|
||||
set
|
||||
{
|
||||
text = value;
|
||||
textDrawable.Text = text;
|
||||
if (textDrawable != null)
|
||||
textDrawable.Text = text;
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,48 +36,46 @@ namespace osu.Game.Overlays.Notifications
|
||||
set
|
||||
{
|
||||
icon = value;
|
||||
iconDrawable.Icon = icon;
|
||||
if (iconDrawable != null)
|
||||
iconDrawable.Icon = icon;
|
||||
}
|
||||
}
|
||||
|
||||
private readonly TextFlowContainer textDrawable;
|
||||
private readonly SpriteIcon iconDrawable;
|
||||
protected Box IconBackground = null!;
|
||||
|
||||
protected Box IconBackground;
|
||||
private TextFlowContainer? textDrawable;
|
||||
|
||||
public SimpleNotification()
|
||||
private SpriteIcon? iconDrawable;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours, OverlayColourProvider colourProvider)
|
||||
{
|
||||
Light.Colour = colours.Green;
|
||||
|
||||
IconContent.AddRange(new Drawable[]
|
||||
{
|
||||
IconBackground = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = ColourInfo.GradientVertical(OsuColour.Gray(0.2f), OsuColour.Gray(0.6f))
|
||||
Colour = colourProvider.Background5,
|
||||
},
|
||||
iconDrawable = new SpriteIcon
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Icon = icon,
|
||||
Size = new Vector2(20),
|
||||
Size = new Vector2(16),
|
||||
}
|
||||
});
|
||||
|
||||
Content.Add(textDrawable = new OsuTextFlowContainer(t => t.Font = t.Font.With(size: 14))
|
||||
Content.Add(textDrawable = new OsuTextFlowContainer(t => t.Font = t.Font.With(size: 14, weight: FontWeight.Medium))
|
||||
{
|
||||
Colour = OsuColour.Gray(128),
|
||||
AutoSizeAxes = Axes.Y,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Text = text
|
||||
});
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
Light.Colour = colours.Green;
|
||||
}
|
||||
|
||||
public override bool Read
|
||||
{
|
||||
get => base.Read;
|
||||
|
Reference in New Issue
Block a user