mirror of
https://github.com/keharriso/love-nuklear.git
synced 2025-09-10 16:17:47 -04:00
initial commit
This commit is contained in:
commit
681ebb06ea
19 changed files with 4107 additions and 0 deletions
53
example/main.lua
Normal file
53
example/main.lua
Normal file
|
@ -0,0 +1,53 @@
|
|||
-- Several simple examples.
|
||||
|
||||
local nk = require 'nuklear'
|
||||
|
||||
local calculator = require 'calculator'
|
||||
local overview = require 'overview'
|
||||
local style = require 'style'
|
||||
local skin = require 'skin'
|
||||
|
||||
function love.load()
|
||||
nk.init()
|
||||
end
|
||||
|
||||
function love.update(dt)
|
||||
nk.frame_begin()
|
||||
calculator()
|
||||
style()
|
||||
overview()
|
||||
skin()
|
||||
nk.frame_end()
|
||||
end
|
||||
|
||||
function love.draw()
|
||||
nk.draw()
|
||||
end
|
||||
|
||||
function love.keypressed(key, scancode, isrepeat)
|
||||
nk.keypressed(key, scancode, isrepeat)
|
||||
end
|
||||
|
||||
function love.keyreleased(key, scancode)
|
||||
nk.keyreleased(key, scancode)
|
||||
end
|
||||
|
||||
function love.mousepressed(x, y, button, istouch)
|
||||
nk.mousepressed(x, y, button, istouch)
|
||||
end
|
||||
|
||||
function love.mousereleased(x, y, button, istouch)
|
||||
nk.mousereleased(x, y, button, istouch)
|
||||
end
|
||||
|
||||
function love.mousemoved(x, y, dx, dy, istouch)
|
||||
nk.mousemoved(x, y, dx, dy, istouch)
|
||||
end
|
||||
|
||||
function love.textinput(text)
|
||||
nk.textinput(text)
|
||||
end
|
||||
|
||||
function love.wheelmoved(x, y)
|
||||
nk.wheelmoved(x, y)
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue