From 4f3ab879de5385fbc00705d414726095fcb7c56d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 22 Mar 2017 09:43:44 +0900 Subject: [PATCH 1/5] Make DrawableHitObject's UpdateState safer by blocking calls at a higher level with not yet loaded. UpdateState is called in LoadComplete for cases where the state may have changed before a load operation. --- osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs | 2 -- osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuHitObject.cs | 2 -- osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs | 2 -- osu.Game.Modes.Osu/Objects/Drawables/DrawableSliderTick.cs | 2 -- osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs | 2 -- osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs | 3 +++ 6 files changed, 3 insertions(+), 10 deletions(-) diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs index 20bb937b76..e8c74d4f8d 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs @@ -111,8 +111,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables protected override void UpdateState(ArmedState state) { - if (!IsLoaded) return; - base.UpdateState(state); ApproachCircle.FadeOut(); diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuHitObject.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuHitObject.cs index 5e6249d66f..b2af678cae 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuHitObject.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuHitObject.cs @@ -22,8 +22,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables protected override void UpdateState(ArmedState state) { - if (!IsLoaded) return; - Flush(); UpdateInitialState(); diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs index e9db97a67b..a2a52c7d94 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs @@ -158,8 +158,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables protected override void UpdateState(ArmedState state) { - if (!IsLoaded) return; - base.UpdateState(state); ball.FadeIn(); diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSliderTick.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSliderTick.cs index 0400d4a866..fff08b9f60 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSliderTick.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSliderTick.cs @@ -95,8 +95,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables protected override void UpdateState(ArmedState state) { - if (!IsLoaded) return; - base.UpdateState(state); switch (state) diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs index 77bfb97ad4..8098e87b12 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs @@ -134,8 +134,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables protected override void UpdateState(ArmedState state) { - if (!IsLoaded) return; - base.UpdateState(state); Delay(spinner.Duration, true); diff --git a/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs index 3ff30bd90e..6322614496 100644 --- a/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs +++ b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs @@ -38,6 +38,9 @@ namespace osu.Game.Modes.Objects.Drawables return; state = value; + if (!IsLoaded) + return; + UpdateState(state); if (State == ArmedState.Hit) From 7fba0c4bce787fe8a4e5eda5bb66ba565c158bbe Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 22 Mar 2017 15:44:23 +0900 Subject: [PATCH 2/5] Update framework. --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 405537bd35..24fc560d01 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 405537bd351954878ddc1d2ba53e5d0563528446 +Subproject commit 24fc560d01ba16d86a1c429817ec3b71d146e698 From fbe08436d2dbe9aac1639d9037e08ac7eec7e57b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 22 Mar 2017 15:27:22 +0900 Subject: [PATCH 3/5] Fix usages of CircularContainer in line with framework changes. --- osu.Game.Modes.Osu/Objects/Drawables/Pieces/NumberPiece.cs | 2 ++ osu.Game.Modes.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs | 1 + osu.Game/Graphics/UserInterface/Nub.cs | 2 ++ osu.Game/Graphics/UserInterface/OsuPasswordTextBox.cs | 2 ++ osu.Game/Overlays/Dialog/PopupDialog.cs | 1 + osu.Game/Screens/Menu/OsuLogo.cs | 2 ++ 6 files changed, 10 insertions(+) diff --git a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/NumberPiece.cs b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/NumberPiece.cs index 8d8aadbb60..750f203a8d 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/NumberPiece.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/NumberPiece.cs @@ -29,6 +29,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces { new CircularContainer { + Masking = true, + Origin = Anchor.Centre, EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Glow, diff --git a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs index 906a3cd7c3..58745dec84 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs @@ -61,6 +61,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces { Colour = Color4.White, RelativePositionAxes = Axes.Both, + Masking = true, Origin = Anchor.Centre, Size = new Vector2(1 / ScreenSpaceDrawQuad.Width * 2000), Children = new[] diff --git a/osu.Game/Graphics/UserInterface/Nub.cs b/osu.Game/Graphics/UserInterface/Nub.cs index 6f3529b67d..a32e047af9 100644 --- a/osu.Game/Graphics/UserInterface/Nub.cs +++ b/osu.Game/Graphics/UserInterface/Nub.cs @@ -30,6 +30,8 @@ namespace osu.Game.Graphics.UserInterface BorderColour = Color4.White; BorderThickness = border_width; + Masking = true; + Children = new[] { fill = new Box diff --git a/osu.Game/Graphics/UserInterface/OsuPasswordTextBox.cs b/osu.Game/Graphics/UserInterface/OsuPasswordTextBox.cs index df48694249..c9d8f936f6 100644 --- a/osu.Game/Graphics/UserInterface/OsuPasswordTextBox.cs +++ b/osu.Game/Graphics/UserInterface/OsuPasswordTextBox.cs @@ -28,6 +28,8 @@ namespace osu.Game.Graphics.UserInterface circle = new CircularContainer { Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Masking = true, Alpha = 0, RelativeSizeAxes = Axes.Both, Size = new Vector2(0.8f, 0), diff --git a/osu.Game/Overlays/Dialog/PopupDialog.cs b/osu.Game/Overlays/Dialog/PopupDialog.cs index 908dbf8ebc..7936339e0c 100644 --- a/osu.Game/Overlays/Dialog/PopupDialog.cs +++ b/osu.Game/Overlays/Dialog/PopupDialog.cs @@ -193,6 +193,7 @@ namespace osu.Game.Overlays.Dialog { Origin = Anchor.Centre, Anchor = Anchor.Centre, + Masking = true, BorderColour = Color4.White, BorderThickness = 5f, Children = new Drawable[] diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index 259e98c483..90223616d0 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -91,8 +91,10 @@ namespace osu.Game.Screens.Menu logoContainer = new CircularContainer { Anchor = Anchor.Centre, + Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, Scale = new Vector2(0.8f), + Masking = true, Children = new Drawable[] { colourAndTriangles = new Container From 1c83442b0b1cc7ea8fe0315567f8f7d2e9989536 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 22 Mar 2017 21:36:03 +0900 Subject: [PATCH 4/5] Update framework. --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 24fc560d01..31cf1c4b58 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 24fc560d01ba16d86a1c429817ec3b71d146e698 +Subproject commit 31cf1c4b58c866d047876b15a95a4cf0115d3105 From 086191a12a8cc15a248d566bc7b8023e2d41924e Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Wed, 22 Mar 2017 16:13:39 +0300 Subject: [PATCH 5/5] Spinner fix --- osu.Game.Modes.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs index 58745dec84..a4fce3deb5 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs @@ -33,6 +33,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces private void load(OsuColour colours) { completeColour = colours.YellowLight.Opacity(0.8f); + Masking = true; } private class SpinnerBorder : Container