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