basic touch system impl

This commit is contained in:
2020-02-05 11:12:30 +07:00
parent 89415081eb
commit 7f731f99bc
14 changed files with 668 additions and 327 deletions

View File

@@ -24,4 +24,18 @@ end
function M.on_update(meta, go)
end
---@param go gobject
---@param type string
---@param event touchable_mouse_evt
function M:on_event(go, type, event)
if type == "touchable.mouse_evt" then
the_debug:trace(string.format(
"ship %q touched(%s %s) - %s",
go.named and go.named.name or "---",
event.type,
event.button,
go == event.target and "self" or "other"))
end
end
return M