diff --git a/example/example.gui.gui_script b/example/example.gui.gui_script index ce07f4f..c7ea0d3 100644 --- a/example/example.gui.gui_script +++ b/example/example.gui.gui_script @@ -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 \ No newline at end of file