Add char event utils
This commit is contained in:
parent
1456dc332f
commit
5eafe25b1a
@ -8,6 +8,14 @@ function Event.getKeyParams(evt)
|
||||
return evt[2], evt[3]
|
||||
end
|
||||
|
||||
function Event.isCharEvent(evt, char)
|
||||
return evt[1] == "char" and (key == nil or evt[2] == key)
|
||||
end
|
||||
|
||||
function Event.getCharValue(evt)
|
||||
return evt[2]
|
||||
end
|
||||
|
||||
function Event.isClickEvent(evt)
|
||||
return evt[1] == "monitor_touch" or evt[1] == "mouse_click"
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user