diff options
author | sanine-a <sanine.not@pm.me> | 2020-10-23 21:52:10 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-10-23 21:53:02 -0500 |
commit | ce0b5a4971be9226bd5c83410dacea128f81771a (patch) | |
tree | 6ad7c78b18044614b41928888942d4d2dcf711e0 /demo | |
parent | 78553e775f618d20e328bc85c635fbab4bf43d60 (diff) |
add key binding input functions
Diffstat (limited to 'demo')
-rw-r--r-- | demo/main.lua | 10 |
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() |