mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 05:32:55 +08:00
Merge pull request #20771 from AkiSakurai/tablet-button-binding
Implement tablet pen/auxiliary button keybindings
This commit is contained in:
commit
b4f125a7fb
@ -327,6 +327,50 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
finalise();
|
||||
}
|
||||
|
||||
protected override bool OnTabletAuxiliaryButtonPress(TabletAuxiliaryButtonPressEvent e)
|
||||
{
|
||||
if (!HasFocus)
|
||||
return false;
|
||||
|
||||
bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(e.CurrentState));
|
||||
finalise();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void OnTabletAuxiliaryButtonRelease(TabletAuxiliaryButtonReleaseEvent e)
|
||||
{
|
||||
if (!HasFocus)
|
||||
{
|
||||
base.OnTabletAuxiliaryButtonRelease(e);
|
||||
return;
|
||||
}
|
||||
|
||||
finalise();
|
||||
}
|
||||
|
||||
protected override bool OnTabletPenButtonPress(TabletPenButtonPressEvent e)
|
||||
{
|
||||
if (!HasFocus)
|
||||
return false;
|
||||
|
||||
bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(e.CurrentState));
|
||||
finalise();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void OnTabletPenButtonRelease(TabletPenButtonReleaseEvent e)
|
||||
{
|
||||
if (!HasFocus)
|
||||
{
|
||||
base.OnTabletPenButtonRelease(e);
|
||||
return;
|
||||
}
|
||||
|
||||
finalise();
|
||||
}
|
||||
|
||||
private void clear()
|
||||
{
|
||||
if (bindTarget == null)
|
||||
|
Loading…
Reference in New Issue
Block a user