mirror of
https://github.com/OpenSolo/OpenSolo.git
synced 2025-05-01 07:04:31 +02:00
BUTTONS: Update button events
This commit is contained in:
parent
33e9215636
commit
a4bc7da3cd
@ -39,12 +39,12 @@ struct __attribute((__packed__)) ButtonEventMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// match artoo/src/button.h
|
// match artoo/src/button.h
|
||||||
enum ButtonEvent { Press, Release, ClickRelease, Hold, LongHold, DoubleClick, EventMax };
|
enum ButtonEvent { Press, Release, ClickRelease, ShortHold, Hold, LongHold, DoubleClick, HoldRelease, LongHoldRelease, EventMax };
|
||||||
|
|
||||||
inline const char *eventName(void) const
|
inline const char *eventName(void) const
|
||||||
{
|
{
|
||||||
static const char *names[] = {
|
static const char *names[] = {
|
||||||
"Press", "Release", "ClickRelease", "Hold", "LongHold", "DoubleClick",
|
"Press", "Release", "ClickRelease", "ShortHold", "Hold", "LongHold", "DoubleClick", "HoldRelease", "LongHoldRelease",
|
||||||
};
|
};
|
||||||
if (event >= 0 && event < EventMax)
|
if (event >= 0 && event < EventMax)
|
||||||
return names[event];
|
return names[event];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user