mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
More widgets stuff, cleaning code
This commit is contained in:
15
druid/editor_scripts/widget.lua_template
Normal file
15
druid/editor_scripts/widget.lua_template
Normal file
@@ -0,0 +1,15 @@
|
||||
---@class widget.TEMPLATE: druid.widget
|
||||
local M = {}
|
||||
|
||||
function M:init()
|
||||
self.root = self:get_node("root")
|
||||
self.button = self.druid:new_button("button"), self.on_button, self)
|
||||
end
|
||||
|
||||
|
||||
function M:on_button()
|
||||
print("Root node", self.root)
|
||||
end
|
||||
|
||||
|
||||
return M
|
Reference in New Issue
Block a user