mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Update example with new brand one
This commit is contained in:
44
example/examples/windows/window_info/window_info.gui_script
Normal file
44
example/examples/windows/window_info/window_info.gui_script
Normal file
@@ -0,0 +1,44 @@
|
||||
local lang = require("lang.lang")
|
||||
local druid = require("druid.druid")
|
||||
|
||||
local window_info = require("example.examples.windows.window_info.window_info")
|
||||
|
||||
|
||||
local function debug_stub(self)
|
||||
if msg.url().socket ~= hash("window_info") then
|
||||
return
|
||||
end
|
||||
|
||||
lang.init()
|
||||
druid.set_text_function(lang.txp)
|
||||
end
|
||||
|
||||
|
||||
function init(self)
|
||||
debug_stub(self)
|
||||
|
||||
-- Using component instead put all inside gui_script to
|
||||
-- allow use it as example and as separate collection
|
||||
self.druid = druid.new(self)
|
||||
self.druid:new(window_info)
|
||||
end
|
||||
|
||||
|
||||
function final(self)
|
||||
self.druid:final()
|
||||
end
|
||||
|
||||
|
||||
function update(self, dt)
|
||||
self.druid:update(dt)
|
||||
end
|
||||
|
||||
|
||||
function on_message(self, message_id, message, sender)
|
||||
self.druid:on_message(message_id, message, sender)
|
||||
end
|
||||
|
||||
|
||||
function on_input(self, action_id, action)
|
||||
return self.druid:on_input(action_id, action)
|
||||
end
|
Reference in New Issue
Block a user