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:52:10 -0500 |
commit | 4749e1a01e989999eef9f4131cf2edf6e3211ebc (patch) | |
tree | fb7716037e302bed236f9ff2134a5631d26b912e /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() |