add simple usage of button

This commit is contained in:
Insality 2019-03-27 00:48:08 +03:00
parent e986b2c3b8
commit da1e75fa89

View File

@ -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
function on_reload(self)
-- Add input-handling code here
-- Remove this function if not needed
end end