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"
function init(self)
end
self.druid = druid.new(self)
function final(self)
-- Add finalization code here
-- Remove this function if not needed
self.button = self.druid:new_button("button", function()
print("New click")
end)
end
function update(self, dt)
-- Add update code here
-- Remove this function if not needed
self.druid:update(dt)
end
function on_message(self, message_id, message, sender)
-- Add message-handling code here
-- Remove this function if not needed
self.druid:on_message(message_id, message, sender)
end
function on_input(self, action_id, action)
-- Add input-handling code here
-- Remove this function if not needed
end
function on_reload(self)
-- Add input-handling code here
-- Remove this function if not needed
end
self.druid:on_input(action_id, action)
end