blob: 46a9947c168b32db59dd554f3212992fd15a7122 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
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 resize_func = function(width, height, data)
local w, h = honey.window.get_size()
print('resized!', w, h)
end
local mousemove = function(x, y)
print(x, y)
end
honey.window.set_title('honey engine demo')
honey.input.key.bind(honey.input.key.a, a_func)
honey.input.key.bind(honey.input.key.escape, honey.exit)
honey.window.resize_bind(resize_func)
honey.input.mouse.set_mode( honey.input.mouse.mode.disabled )
honey.input.mouse.bind_movement(mousemove)
local focus_func = function(focus)
print('focus:', focus)
end
honey.window.focus_bind(focus_func)
function honey.update(dt)
end
--function honey.draw()
-- print('draw!')
--end
|