mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Update examples to widgets instead components
This commit is contained in:
@@ -1,16 +1,11 @@
|
||||
local component = require("druid.component")
|
||||
|
||||
---@class examples.scroll: druid.component
|
||||
---@class examples.scroll: druid.widget
|
||||
---@field root node
|
||||
---@field scroll druid.scroll
|
||||
---@field druid druid.instance
|
||||
local M = component.create("scroll")
|
||||
|
||||
---@param template string
|
||||
---@param nodes table<hash, node>
|
||||
function M:init(template, nodes)
|
||||
self.druid = self:get_druid(template, nodes)
|
||||
local M = {}
|
||||
|
||||
function M:init()
|
||||
self.scroll = self.druid:new_scroll("scroll_view", "scroll_content")
|
||||
|
||||
self.button_tutorial = self.druid:new_button("button_tutorial/root")
|
||||
|
Reference in New Issue
Block a user