mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
Add glow and bling to game mode selector.
This commit is contained in:
parent
3a5c41b970
commit
918a3bc74f
@ -2,8 +2,10 @@
|
|||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Modes;
|
using osu.Game.Modes;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Toolbar
|
namespace osu.Game.Overlays.Toolbar
|
||||||
{
|
{
|
||||||
@ -26,7 +28,23 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
//Background.Colour = value ? new Color4(100, 100, 100, 255) : new Color4(20, 20, 20, 255);
|
if (value)
|
||||||
|
{
|
||||||
|
DrawableIcon.Colour = Color4.White;
|
||||||
|
DrawableIcon.Masking = true;
|
||||||
|
DrawableIcon.EdgeEffect = new EdgeEffect
|
||||||
|
{
|
||||||
|
Type = EdgeEffectType.Glow,
|
||||||
|
Colour = new Color4(255, 194, 224, 100),
|
||||||
|
Radius = 15,
|
||||||
|
Roundness = 15,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DrawableIcon.Masking = false;
|
||||||
|
DrawableIcon.Colour = new Color4(255, 194, 224, 255);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
const float padding = 10;
|
const float padding = 10;
|
||||||
|
|
||||||
private FlowContainer modeButtons;
|
private FlowContainer modeButtons;
|
||||||
private Box modeButtonLine;
|
private Drawable modeButtonLine;
|
||||||
private ToolbarModeButton activeButton;
|
private ToolbarModeButton activeButton;
|
||||||
|
|
||||||
public Action<PlayMode> OnPlayModeChange;
|
public Action<PlayMode> OnPlayModeChange;
|
||||||
@ -42,13 +42,27 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Padding = new MarginPadding { Left = 10, Right = 10 },
|
Padding = new MarginPadding { Left = 10, Right = 10 },
|
||||||
},
|
},
|
||||||
modeButtonLine = new Box
|
modeButtonLine = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Size = new Vector2(0.3f, 3),
|
Size = new Vector2(0.3f, 3),
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.TopLeft,
|
Origin = Anchor.TopLeft,
|
||||||
Colour = Color4.White
|
Masking = true,
|
||||||
|
EdgeEffect = new EdgeEffect
|
||||||
|
{
|
||||||
|
Type = EdgeEffectType.Glow,
|
||||||
|
Colour = new Color4(255, 194, 224, 100),
|
||||||
|
Radius = 15,
|
||||||
|
Roundness = 15,
|
||||||
|
},
|
||||||
|
Children = new []
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user