Alexey Gulev 4ce8e85d15 Refactoring: step 1
druid.lua:
- `factory` replaced with `self`
- set new name for metatable
- replaced `ipairs` with `for `i loop

data.lua:
- renamed custom messages
2019-08-04 22:15:22 +02:00

37 lines
675 B
Lua

local M = {}
-- actions
M.A_TOUCH = hash("touch")
M.A_TEXT = hash("text")
M.A_BACKSPACE = hash("backspace")
M.A_ENTER = hash("enter")
M.A_ANDR_BACK = hash("back")
M.RELEASED = "released"
M.PRESSED = "pressed"
--- interests
M.ON_MESSAGE = hash("on_message")
M.ON_UPDATE = hash("on_update")
-- input
M.ON_SWIPE = hash("on_swipe")
M.ON_INPUT = hash("on_input")
M.ui_input = {
[M.ON_SWIPE] = true,
[M.ON_INPUT] = true
}
-- ui messages
M.ON_CHANGE_LANGUAGE = hash("on_change_language")
M.ON_LAYOUT_CHANGED = hash("on_layout_changed")
M.specific_ui_messages = {
[M.ON_CHANGE_LANGUAGE] = "on_change_language",
[M.ON_LAYOUT_CHANGED] = "on_layout_changed"
}
return M