mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Add reset button
Also fixes a regression causing multiple rows to be displayed for a single action
This commit is contained in:
@ -109,6 +109,17 @@ namespace osu.Game.Overlays.KeyBinding
|
||||
buttons.Add(new KeyButton(b));
|
||||
}
|
||||
|
||||
public void RestoreDefaults()
|
||||
{
|
||||
int i = 0;
|
||||
foreach (var d in Defaults)
|
||||
{
|
||||
var button = buttons[i++];
|
||||
button.UpdateKeyCombination(d);
|
||||
store.Update(button.KeyBinding);
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
{
|
||||
this.FadeEdgeEffectTo<Container>(1, transition_time, Easing.OutQuint);
|
||||
@ -129,6 +140,8 @@ namespace osu.Game.Overlays.KeyBinding
|
||||
|
||||
public bool AllowMainMouseButtons;
|
||||
|
||||
public IEnumerable<KeyCombination> Defaults;
|
||||
|
||||
private bool isModifier(Key k) => k < Key.F1;
|
||||
|
||||
protected override bool OnClick(InputState state) => true;
|
||||
|
Reference in New Issue
Block a user