1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 11:47:24 +08:00

Let right-click reset grid to default values

This commit is contained in:
OliBomby 2024-10-08 10:51:35 +02:00
parent e794862da5
commit de2f9dec39
3 changed files with 7 additions and 2 deletions

View File

@ -68,6 +68,11 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints
{
if (e.Button == MouseButton.Right)
{
// Reset the grid to the default values.
gridToolboxGroup.StartPosition.Value = gridToolboxGroup.StartPosition.Default;
gridToolboxGroup.Spacing.Value = gridToolboxGroup.Spacing.Default;
if (!gridToolboxGroup.GridLinesRotation.Disabled)
gridToolboxGroup.GridLinesRotation.Value = gridToolboxGroup.GridLinesRotation.Default;
EndPlacement(true);
return true;
}

View File

@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Osu.Edit
TooltipText = """
Left click to set the origin.
Left click again to set the spacing and rotation.
Right click to only set the origin.
Right click to reset to default.
Click and drag to set the origin, spacing and rotation.
""";
}

View File

@ -71,7 +71,7 @@ namespace osu.Game.Rulesets.Osu.Edit
/// Read-only bindable representing the grid's origin.
/// Equivalent to <code>new Vector2(StartPositionX, StartPositionY)</code>
/// </summary>
public Bindable<Vector2> StartPosition { get; } = new Bindable<Vector2>();
public Bindable<Vector2> StartPosition { get; } = new Bindable<Vector2>(OsuPlayfield.BASE_SIZE / 2);
/// <summary>
/// Read-only bindable representing the grid's spacing in both the X and Y dimension.