Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Insality committed Nov 30, 2024
1 parent cb36625 commit e59a2b0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion druid/widget/fps_panel/fps_panel.gui
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ textures {
nodes {
size {
x: 200.0
y: 100.0
y: 140.0
}
type: TYPE_BOX
id: "root"
Expand Down
5 changes: 5 additions & 0 deletions druid/widget/fps_panel/fps_panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ if TARGET_FPS == 0 then
end

function M:init()
self.root = self:get_node("root")

self.delta_time = 0.1 -- in seconds
self.collect_time = 3 -- in seconds
self.collect_time_counter = 0
Expand All @@ -37,6 +39,9 @@ function M:init()
self.timer_id = timer.delay(self.delta_time, true, function()
self:push_fps_value()
end)

self.container = self.druid:new_container(self.root)
self.container:add_container(self.mini_graph.container)
end


Expand Down
2 changes: 1 addition & 1 deletion druid/widget/memory_panel/memory_panel.gui
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ textures {
nodes {
size {
x: 200.0
y: 100.0
y: 140.0
}
type: TYPE_BOX
id: "root"
Expand Down
3 changes: 3 additions & 0 deletions druid/widget/memory_panel/memory_panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ function M:init()
self.timer_id = timer.delay(self.delta_time, true, function()
self:push_next_value()
end)

self.container = self.druid:new_container(self.root)
self.container:add_container(self.mini_graph.container)
end


Expand Down
4 changes: 2 additions & 2 deletions druid/widget/properties_panel/properties_panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,12 @@ end
---@private
function M:add_property(widget)
gui.set_enabled(widget.root, true)
self.layout:add(widget.root)

table.insert(self.properties, widget)
local width = self.layout:get_content_size()
widget.container:set_size(width)

self.layout:add(widget.root)

return widget
end

Expand Down

0 comments on commit e59a2b0

Please sign in to comment.