mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
add simple usage of button
This commit is contained in:
parent
e986b2c3b8
commit
da1e75fa89
@ -1,29 +1,21 @@
|
|||||||
local druid = require "druid.druid"
|
local druid = require "druid.druid"
|
||||||
|
|
||||||
function init(self)
|
function init(self)
|
||||||
end
|
self.druid = druid.new(self)
|
||||||
|
|
||||||
function final(self)
|
self.button = self.druid:new_button("button", function()
|
||||||
-- Add finalization code here
|
print("New click")
|
||||||
-- Remove this function if not needed
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function update(self, dt)
|
function update(self, dt)
|
||||||
-- Add update code here
|
self.druid:update(dt)
|
||||||
-- Remove this function if not needed
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function on_message(self, message_id, message, sender)
|
function on_message(self, message_id, message, sender)
|
||||||
-- Add message-handling code here
|
self.druid:on_message(message_id, message, sender)
|
||||||
-- Remove this function if not needed
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function on_input(self, action_id, action)
|
function on_input(self, action_id, action)
|
||||||
-- Add input-handling code here
|
self.druid:on_input(action_id, action)
|
||||||
-- Remove this function if not needed
|
end
|
||||||
end
|
|
||||||
|
|
||||||
function on_reload(self)
|
|
||||||
-- Add input-handling code here
|
|
||||||
-- Remove this function if not needed
|
|
||||||
end
|
|
Loading…
x
Reference in New Issue
Block a user