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:
parent
e794862da5
commit
de2f9dec39
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
""";
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user