Get key event values
This commit is contained in:
parent
f3f600892d
commit
14153522b6
@ -1,13 +1,17 @@
|
||||
local Event = {}
|
||||
|
||||
function Event.isClickEvent(evt)
|
||||
return evt[1] == "monitor_touch" or evt[1] == "mouse_click"
|
||||
end
|
||||
|
||||
function Event.isKeyEvent(evt, key)
|
||||
return evt[1] == "key" and (key == nil or evt[2] == key)
|
||||
end
|
||||
|
||||
function Event.getKeyParams(evt)
|
||||
return evt[2], evt[3]
|
||||
end
|
||||
|
||||
function Event.isClickEvent(evt)
|
||||
return evt[1] == "monitor_touch" or evt[1] == "mouse_click"
|
||||
end
|
||||
|
||||
function Event.getClickParams(evt)
|
||||
return evt[3], evt[4], evt[2]
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user