From fcda2f0e4e254a15ec30c90f40ab7abd765b5b98 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Thu, 2 Mar 2017 09:05:10 -0400 Subject: [PATCH] Fixed shadow --- .../BeatmapOptions/BeatmapOptionsButton.cs | 4 ++- .../BeatmapOptions/BeatmapOptionsOverlay.cs | 30 +++++++++++-------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/osu.Game/Overlays/BeatmapOptions/BeatmapOptionsButton.cs b/osu.Game/Overlays/BeatmapOptions/BeatmapOptionsButton.cs index 96deca7321..fd81b9bbfb 100644 --- a/osu.Game/Overlays/BeatmapOptions/BeatmapOptionsButton.cs +++ b/osu.Game/Overlays/BeatmapOptions/BeatmapOptionsButton.cs @@ -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[] { diff --git a/osu.Game/Overlays/BeatmapOptions/BeatmapOptionsOverlay.cs b/osu.Game/Overlays/BeatmapOptions/BeatmapOptionsOverlay.cs index 4ec0993ef3..bebb2ce93b 100644 --- a/osu.Game/Overlays/BeatmapOptions/BeatmapOptionsOverlay.cs +++ b/osu.Game/Overlays/BeatmapOptions/BeatmapOptionsOverlay.cs @@ -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(); }, }, },