From 2ac4f2b6af4c101e968441fd94ed6dcf4ca70e10 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Thu, 1 Nov 2018 19:24:58 +0900 Subject: [PATCH] Lock spinners to centre of screen --- .../Masks/SpinnerMasks/SpinnerPlacementMask.cs | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Edit/Masks/SpinnerMasks/SpinnerPlacementMask.cs b/osu.Game.Rulesets.Osu/Edit/Masks/SpinnerMasks/SpinnerPlacementMask.cs index 97356fa8b6..cd5d6cff04 100644 --- a/osu.Game.Rulesets.Osu/Edit/Masks/SpinnerMasks/SpinnerPlacementMask.cs +++ b/osu.Game.Rulesets.Osu/Edit/Masks/SpinnerMasks/SpinnerPlacementMask.cs @@ -6,6 +6,7 @@ using osu.Framework.Input.Events; using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Osu.Edit.Masks.SpinnerMasks.Components; using osu.Game.Rulesets.Osu.Objects; +using osu.Game.Rulesets.Osu.UI; namespace osu.Game.Rulesets.Osu.Edit.Masks.SpinnerMasks { @@ -18,19 +19,11 @@ namespace osu.Game.Rulesets.Osu.Edit.Masks.SpinnerMasks private bool isPlacingEnd; public SpinnerPlacementMask() - : base(new Spinner()) + : base(new Spinner { Position = OsuPlayfield.BASE_SIZE / 2 }) { InternalChild = piece = new SpinnerPiece(HitObject) { Alpha = 0.5f }; } - protected override void LoadComplete() - { - base.LoadComplete(); - - // Fixes a 1-frame position discrpancy due to the first mouse move event happening in the next frame - HitObject.Position = GetContainingInputManager().CurrentState.Mouse.Position; - } - protected override bool OnClick(ClickEvent e) { if (isPlacingEnd) @@ -48,12 +41,5 @@ namespace osu.Game.Rulesets.Osu.Edit.Masks.SpinnerMasks return true; } - - protected override bool OnMouseMove(MouseMoveEvent e) - { - if (!isPlacingEnd) - HitObject.Position = e.MousePosition; - return true; - } } }