mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 13:07:24 +08:00
Fix grid type cycling not taking into account the radio button selection
This commit is contained in:
parent
b93bc21e45
commit
ada20d230a
@ -27,8 +27,6 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
private static readonly PositionSnapGridType[] grid_types = Enum.GetValues(typeof(PositionSnapGridType)).Cast<PositionSnapGridType>().ToArray();
|
||||
|
||||
private int currentGridTypeIndex;
|
||||
|
||||
[Resolved]
|
||||
private EditorBeatmap editorBeatmap { get; set; } = null!;
|
||||
|
||||
@ -252,9 +250,9 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
|
||||
private void nextGridType()
|
||||
{
|
||||
currentGridTypeIndex = (currentGridTypeIndex + 1) % grid_types.Length;
|
||||
GridType.Value = grid_types[currentGridTypeIndex];
|
||||
gridTypeButtons.Items[currentGridTypeIndex].Select();
|
||||
int nextGridTypeIndex = (Array.IndexOf(grid_types, GridType.Value) + 1) % grid_types.Length;
|
||||
GridType.Value = grid_types[nextGridTypeIndex];
|
||||
gridTypeButtons.Items[nextGridTypeIndex].Select();
|
||||
}
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
|
Loading…
Reference in New Issue
Block a user