diff options
author | sanine-a <sanine.not@pm.me> | 2020-10-24 22:09:34 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-10-24 22:09:34 -0500 |
commit | de2fa7938758ff83cabf06baf4c0ac7a230e78bf (patch) | |
tree | cf11c155d3c1e432b19f840556065d2b94e41773 /demo | |
parent | 41ac253f743e464194587c3ecc0f2547c95d924d (diff) |
add more window functions and clean up window info access
Diffstat (limited to 'demo')
-rw-r--r-- | demo/main.lua | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/demo/main.lua b/demo/main.lua index 6f6439f..64ab0ae 100644 --- a/demo/main.lua +++ b/demo/main.lua @@ -1,15 +1,25 @@ -for key, value in pairs(honey.input) do - print(key, value) -end - local fullscreen = false local a_func = function(action, data) + if (action == 0) then return end fullscreen = not fullscreen honey.window.set_fullscreen(fullscreen) end +local b_func = function(action, data) + if (action == 0) then return end + local w, h = honey.window.get_size() + print(w, h) +end + +for k,v in pairs(honey.window) do + print(k, v) +end + +honey.window.set_title('honey engine demo') + honey.input.bind_key(honey.input.key.a, a_func) +honey.input.bind_key(honey.input.key.b, b_func) function honey.update(dt) end |