mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 14:42:56 +08:00
Always show rectangular grid in osu! composer
This commit is contained in:
parent
cdef6d0cf5
commit
b5af01f456
@ -68,7 +68,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
},
|
||||
rectangularPositionSnapGridContainer = new Container
|
||||
rectangularPositionSnapGrid = new OsuRectangularPositionSnapGrid(EditorBeatmap.BeatmapInfo.GridSize)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
}
|
||||
@ -89,8 +89,6 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
|
||||
gridSnapToggle.ValueChanged += _ =>
|
||||
{
|
||||
updateRectangularPositionSnapGrid();
|
||||
|
||||
if (gridSnapToggle.Value == TernaryState.True)
|
||||
distanceSnapToggle.Value = TernaryState.False;
|
||||
};
|
||||
@ -111,6 +109,8 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
private readonly Cached distanceSnapGridCache = new Cached();
|
||||
private double? lastDistanceSnapGridTime;
|
||||
|
||||
private RectangularPositionSnapGrid rectangularPositionSnapGrid;
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
@ -298,21 +298,5 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
|
||||
return new OsuDistanceSnapGrid((OsuHitObject)sourceObject, (OsuHitObject)targetObject);
|
||||
}
|
||||
|
||||
private Container rectangularPositionSnapGridContainer;
|
||||
private RectangularPositionSnapGrid rectangularPositionSnapGrid;
|
||||
|
||||
private void updateRectangularPositionSnapGrid()
|
||||
{
|
||||
rectangularPositionSnapGridContainer.Clear();
|
||||
|
||||
if (gridSnapToggle.Value == TernaryState.True)
|
||||
{
|
||||
rectangularPositionSnapGridContainer.Add(rectangularPositionSnapGrid = new OsuRectangularPositionSnapGrid(EditorBeatmap.BeatmapInfo.GridSize)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user