summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2020-10-23 21:52:10 -0500
committersanine-a <sanine.not@pm.me>2020-10-23 21:53:02 -0500
commitce0b5a4971be9226bd5c83410dacea128f81771a (patch)
tree6ad7c78b18044614b41928888942d4d2dcf711e0 /demo
parent78553e775f618d20e328bc85c635fbab4bf43d60 (diff)
add key binding input functions
Diffstat (limited to 'demo')
-rw-r--r--demo/main.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/demo/main.lua b/demo/main.lua
index ba548b9..ae0684e 100644
--- a/demo/main.lua
+++ b/demo/main.lua
@@ -4,10 +4,14 @@ end
local total_time = 0
+local a_func = function(action, data)
+ print('a: ', action)
+end
+
+honey.input.bind_key(honey.input.key.a, a_func)
+
function honey.update(dt)
- if honey.input.is_down(honey.input.key.a) then
- print('a pressed!')
- end
+
end
--function honey.draw()