mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:12:56 +08:00
Move positional modifications to HitCirclePlacementMask
This commit is contained in:
parent
6a65802528
commit
e931aa3d9e
@ -21,16 +21,25 @@ namespace osu.Game.Rulesets.Osu.Edit.Masks
|
|||||||
InternalChild = new HitCircleMask(HitObject);
|
InternalChild = new HitCircleMask(HitObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
// Fixes a 1-frame position discrpancy due to the first mouse move event happening in the next frame
|
||||||
|
Position = GetContainingInputManager().CurrentState.Mouse.Position;
|
||||||
|
}
|
||||||
|
|
||||||
protected override bool OnClick(ClickEvent e)
|
protected override bool OnClick(ClickEvent e)
|
||||||
{
|
{
|
||||||
|
HitObject.Position = e.MousePosition;
|
||||||
Finish();
|
Finish();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseMove(MouseMoveEvent e)
|
protected override bool OnMouseMove(MouseMoveEvent e)
|
||||||
{
|
{
|
||||||
HitObject.Position = e.MousePosition;
|
Position = e.MousePosition;
|
||||||
return base.OnMouseMove(e);
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ using osu.Game.Rulesets.Edit;
|
|||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
using osu.Game.Rulesets.Osu.Edit;
|
using osu.Game.Rulesets.Osu.Edit;
|
||||||
|
using osu.Game.Rulesets.Osu.Edit.Masks;
|
||||||
using osu.Game.Rulesets.Osu.Objects;
|
using osu.Game.Rulesets.Osu.Objects;
|
||||||
using osu.Game.Screens.Edit.Screens.Compose.Layers;
|
using osu.Game.Screens.Edit.Screens.Compose.Layers;
|
||||||
using osu.Game.Tests.Beatmaps;
|
using osu.Game.Tests.Beatmaps;
|
||||||
@ -29,7 +30,10 @@ namespace osu.Game.Tests.Visual
|
|||||||
typeof(HitObjectComposer),
|
typeof(HitObjectComposer),
|
||||||
typeof(OsuHitObjectComposer),
|
typeof(OsuHitObjectComposer),
|
||||||
typeof(HitObjectMaskLayer),
|
typeof(HitObjectMaskLayer),
|
||||||
typeof(NotNullAttribute)
|
typeof(NotNullAttribute),
|
||||||
|
typeof(HitCircleMask),
|
||||||
|
typeof(HitCircleSelectionMask),
|
||||||
|
typeof(HitCirclePlacementMask),
|
||||||
};
|
};
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -40,14 +40,6 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
HitObject.ApplyDefaults(workingBeatmap.Value.Beatmap.ControlPointInfo, workingBeatmap.Value.Beatmap.BeatmapInfo.BaseDifficulty);
|
HitObject.ApplyDefaults(workingBeatmap.Value.Beatmap.ControlPointInfo, workingBeatmap.Value.Beatmap.BeatmapInfo.BaseDifficulty);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
// Fixes a 1-frame position discrpancy due to the first mouse move event happening in the next frame
|
|
||||||
Position = GetContainingInputManager().CurrentState.Mouse.Position;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Finishes the placement of <see cref="HitObject"/>.
|
/// Finishes the placement of <see cref="HitObject"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -75,12 +67,6 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseMove(MouseMoveEvent e)
|
|
||||||
{
|
|
||||||
Position = e.MousePosition;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
|
Loading…
Reference in New Issue
Block a user