mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
Update
This commit is contained in:
parent
cb36625836
commit
e59a2b0bcb
@ -13,7 +13,7 @@ textures {
|
|||||||
nodes {
|
nodes {
|
||||||
size {
|
size {
|
||||||
x: 200.0
|
x: 200.0
|
||||||
y: 100.0
|
y: 140.0
|
||||||
}
|
}
|
||||||
type: TYPE_BOX
|
type: TYPE_BOX
|
||||||
id: "root"
|
id: "root"
|
||||||
|
@ -11,6 +11,8 @@ if TARGET_FPS == 0 then
|
|||||||
end
|
end
|
||||||
|
|
||||||
function M:init()
|
function M:init()
|
||||||
|
self.root = self:get_node("root")
|
||||||
|
|
||||||
self.delta_time = 0.1 -- in seconds
|
self.delta_time = 0.1 -- in seconds
|
||||||
self.collect_time = 3 -- in seconds
|
self.collect_time = 3 -- in seconds
|
||||||
self.collect_time_counter = 0
|
self.collect_time_counter = 0
|
||||||
@ -37,6 +39,9 @@ function M:init()
|
|||||||
self.timer_id = timer.delay(self.delta_time, true, function()
|
self.timer_id = timer.delay(self.delta_time, true, function()
|
||||||
self:push_fps_value()
|
self:push_fps_value()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
self.container = self.druid:new_container(self.root)
|
||||||
|
self.container:add_container(self.mini_graph.container)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ textures {
|
|||||||
nodes {
|
nodes {
|
||||||
size {
|
size {
|
||||||
x: 200.0
|
x: 200.0
|
||||||
y: 100.0
|
y: 140.0
|
||||||
}
|
}
|
||||||
type: TYPE_BOX
|
type: TYPE_BOX
|
||||||
id: "root"
|
id: "root"
|
||||||
|
@ -37,6 +37,9 @@ function M:init()
|
|||||||
self.timer_id = timer.delay(self.delta_time, true, function()
|
self.timer_id = timer.delay(self.delta_time, true, function()
|
||||||
self:push_next_value()
|
self:push_next_value()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
self.container = self.druid:new_container(self.root)
|
||||||
|
self.container:add_container(self.mini_graph.container)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -249,12 +249,12 @@ end
|
|||||||
---@private
|
---@private
|
||||||
function M:add_property(widget)
|
function M:add_property(widget)
|
||||||
gui.set_enabled(widget.root, true)
|
gui.set_enabled(widget.root, true)
|
||||||
self.layout:add(widget.root)
|
|
||||||
|
|
||||||
table.insert(self.properties, widget)
|
table.insert(self.properties, widget)
|
||||||
local width = self.layout:get_content_size()
|
local width = self.layout:get_content_size()
|
||||||
widget.container:set_size(width)
|
widget.container:set_size(width)
|
||||||
|
|
||||||
|
self.layout:add(widget.root)
|
||||||
|
|
||||||
return widget
|
return widget
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user