1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 06:52:56 +08:00

Implement tablet button bindings

This commit is contained in:
Aki 2022-10-15 15:11:28 +08:00
parent 10aabfc650
commit 91358f4a6a
No known key found for this signature in database
GPG Key ID: 71EB4ADB554E1DCC

View File

@ -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)