1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-17 17:17:19 +08:00

Fixed shadow

This commit is contained in:
DrabWeb 2017-03-02 09:05:10 -04:00
parent b856fb5991
commit fcda2f0e4e
2 changed files with 21 additions and 13 deletions

View File

@ -16,6 +16,8 @@ namespace osu.Game.Overlays.BeatmapOptions
{
public class BeatmapOptionsButton : ClickableContainer
{
public static readonly Vector2 SIZE = new Vector2(130f, 100f);
private Box background, flash;
private TextAwesome iconText;
private OsuSpriteText firstLine, secondLine;
@ -67,7 +69,7 @@ namespace osu.Game.Overlays.BeatmapOptions
public BeatmapOptionsButton()
{
Size = new Vector2(130f, 100f);
Size = SIZE;
Children = new Drawable[]
{

View File

@ -6,6 +6,7 @@ using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transforms;
using osu.Game.Graphics;
@ -76,22 +77,19 @@ namespace osu.Game.Overlays.BeatmapOptions
AutoSizeAxes = Axes.Both,
Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft,
Direction = FillDirection.Left,
Padding = new MarginPadding
{
Left = BeatmapOptionsButton.SIZE.X, // For some reason autosize on this flow container is one button too short
},
Children = new BeatmapOptionsButton[]
{
new BeatmapOptionsRemoveFromUnplayedButton
new BeatmapOptionsDeleteButton
{
Action = () =>
{
Hide();
OnRemoveFromUnplayed?.Invoke();
},
},
new BeatmapOptionsClearLocalScoresButton
{
Action = () =>
{
Hide();
OnClearLocalScores?.Invoke();
OnDelete?.Invoke();
},
},
new BeatmapOptionsEditButton
@ -102,12 +100,20 @@ namespace osu.Game.Overlays.BeatmapOptions
OnEdit?.Invoke();
},
},
new BeatmapOptionsDeleteButton
new BeatmapOptionsClearLocalScoresButton
{
Action = () =>
{
Hide();
OnDelete?.Invoke();
OnClearLocalScores?.Invoke();
},
},
new BeatmapOptionsRemoveFromUnplayedButton
{
Action = () =>
{
Hide();
OnRemoveFromUnplayed?.Invoke();
},
},
},