summaryrefslogtreecommitdiff
path: root/demo/main.lua
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2020-10-24 22:51:10 -0500
committersanine-a <sanine.not@pm.me>2020-10-24 22:51:10 -0500
commitef48092c9752fe3fdd358351f368c8c66da3638d (patch)
tree843df4575c05dae633e3f0a17972980fd2d0a881 /demo/main.lua
parentde2fa7938758ff83cabf06baf4c0ac7a230e78bf (diff)
add window resize callback functions
Diffstat (limited to 'demo/main.lua')
-rw-r--r--demo/main.lua11
1 files changed, 3 insertions, 8 deletions
diff --git a/demo/main.lua b/demo/main.lua
index 64ab0ae..e7f95c1 100644
--- a/demo/main.lua
+++ b/demo/main.lua
@@ -6,20 +6,15 @@ local a_func = function(action, data)
honey.window.set_fullscreen(fullscreen)
end
-local b_func = function(action, data)
- if (action == 0) then return end
+local resize_func = function(width, height, data)
local w, h = honey.window.get_size()
- print(w, h)
-end
-
-for k,v in pairs(honey.window) do
- print(k, v)
+ print('resized!', w, h)
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)
+honey.window.resize_bind(resize_func)
function honey.update(dt)
end