mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 15:17:44 +08:00
use G to change grid type
This commit is contained in:
parent
616c2aeefc
commit
d98cc7fe66
@ -25,6 +25,10 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
public partial class OsuGridToolboxGroup : EditorToolboxGroup, IKeyBindingHandler<GlobalAction>
|
||||
{
|
||||
private static readonly PositionSnapGridType[] grid_types = Enum.GetValues(typeof(PositionSnapGridType)).Cast<PositionSnapGridType>().ToArray();
|
||||
|
||||
private int currentGridTypeIndex;
|
||||
|
||||
[Resolved]
|
||||
private EditorBeatmap editorBeatmap { get; set; } = null!;
|
||||
|
||||
@ -246,6 +250,13 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
Spacing.Value = Spacing.Value * 2 >= max_automatic_spacing ? Spacing.Value / 8 : Spacing.Value * 2;
|
||||
}
|
||||
|
||||
private void nextGridType()
|
||||
{
|
||||
currentGridTypeIndex = (currentGridTypeIndex + 1) % grid_types.Length;
|
||||
GridType.Value = grid_types[currentGridTypeIndex];
|
||||
gridTypeButtons.Items[currentGridTypeIndex].Select();
|
||||
}
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
switch (e.Action)
|
||||
|
Loading…
Reference in New Issue
Block a user