function on_input(self, action_id, action)
-- backキーでアプリを終了させる。
if action_id == hash("back") and action.pressed then
print("You back")
msg.post("@system:", "exit", {code = 0})
end
end
これでAndroidのBackキー押下でアプリを終了できる。
Permalink wiki/defold2/api/004.1522192703.txt.gz · 最終更新: 2018/03/27 23:18 by step