From 775e8ac5d6491ee79c895a4de295ebf6c2b0c9da Mon Sep 17 00:00:00 2001 From: stanriders Date: Sun, 27 Nov 2016 18:56:05 +0300 Subject: [PATCH] Hardcoded button size, fixed input handling, fixed flash not being visible --- osu.Game/Graphics/UserInterface/BackButton.cs | 20 +++++++++++++++---- osu.Game/Screens/GameModeWhiteBox.cs | 2 -- osu.Game/Screens/Select/PlaySongSelect.cs | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/BackButton.cs b/osu.Game/Graphics/UserInterface/BackButton.cs index 7cba17bf91..06aa21f2b0 100644 --- a/osu.Game/Graphics/UserInterface/BackButton.cs +++ b/osu.Game/Graphics/UserInterface/BackButton.cs @@ -29,7 +29,10 @@ namespace osu.Game.Graphics.UserInterface public BackButton() { - Width = 80; + RelativeSizeAxes = Axes.None; + Width = 120; + Height = 50; // same as bottomToolHeight in PlaySongSelect + Children = new Drawable[] { leftContainer = new Container @@ -56,7 +59,8 @@ namespace osu.Game.Graphics.UserInterface { Origin = Anchor.TopLeft, Anchor = Anchor.TopLeft, - RelativeSizeAxes = Axes.Both, + RelativeSizeAxes = Axes.Y, + Width = 80, Position = Position + InitialExtendLength, Children = new Drawable[] { @@ -86,6 +90,8 @@ namespace osu.Game.Graphics.UserInterface rightContainer.MoveTo(Position + ExtendLength, transform_time, EasingTypes.OutElastic); leftContainer.ResizeTo(new Vector2(ExtendLength.X, 1.0f), transform_time, EasingTypes.OutElastic); + Width = 140; // right container + ExtendLength + int duration = 0; //(int)(Game.Audio.BeatLength / 2); if (duration == 0) duration = pulse_length; @@ -114,6 +120,8 @@ namespace osu.Game.Graphics.UserInterface rightContainer.MoveTo(Position + InitialExtendLength, transform_time, EasingTypes.OutElastic); leftContainer.ResizeTo(new Vector2(InitialExtendLength.X, 1.0f), transform_time, EasingTypes.OutElastic); + Width = 120; // right container + InitialExtendLength + int duration = 0; //(int)(Game.Audio.BeatLength / 2); if (duration == 0) duration = pulse_length * 2; @@ -137,13 +145,17 @@ namespace osu.Game.Graphics.UserInterface { var flash = new Box { - RelativeSizeAxes = RelativeSizeAxes, - Colour = colorBright, + RelativeSizeAxes = Axes.None, + Width = 140, + Height = 50, + Shear = new Vector2(0.1f, 0), + Colour = new Color4(255,255,255,255), BlendingMode = BlendingMode.Additive, Alpha = 0.3f }; Add(flash); + flash.ResizeTo(new Vector2(120, 50), transform_time, EasingTypes.OutElastic); flash.FadeOutFromOne(200); flash.Expire(); diff --git a/osu.Game/Screens/GameModeWhiteBox.cs b/osu.Game/Screens/GameModeWhiteBox.cs index ef85f9e23e..b05ac614c6 100644 --- a/osu.Game/Screens/GameModeWhiteBox.cs +++ b/osu.Game/Screens/GameModeWhiteBox.cs @@ -116,8 +116,6 @@ namespace osu.Game.Screens }, popButton = new BackButton { - RelativeSizeAxes = Axes.None, - Height = 40, Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, Alpha = 0, diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index 66f6e9c2d8..983d5008df 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -125,7 +125,7 @@ namespace osu.Game.Screens.Select { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, - RelativeSizeAxes = Axes.Y, + //RelativeSizeAxes = Axes.Y, Action = () => Exit() }, new Button