mirror of
https://github.com/Insality/druid
synced 2025-06-27 02:17:52 +02:00
Update
This commit is contained in:
parent
ec39242fb1
commit
6d0a853d41
@ -39,7 +39,7 @@ Open your `game.project` file and add the following lines to the dependencies fi
|
||||
**[Druid](https://github.com/Insality/druid/)**
|
||||
|
||||
```
|
||||
https://github.com/Insality/druid/archive/refs/tags/1.1.zip
|
||||
https://github.com/Insality/druid/archive/refs/tags/1.1.0.zip
|
||||
```
|
||||
|
||||
**[Defold Event](https://github.com/Insality/defold-event)**
|
||||
|
@ -182,6 +182,9 @@ function M.assign_layers(gui_resource)
|
||||
name = layer_name,
|
||||
})
|
||||
end
|
||||
if #gui_data.layers == 0 then
|
||||
gui_data.layers = nil
|
||||
end
|
||||
|
||||
-- Create a lookup table for faster matching - include both existing and new layers
|
||||
local layer_lookup = {}
|
||||
|
@ -63,8 +63,8 @@ function M:update(dt)
|
||||
local current_time = socket.gettime()
|
||||
local delta_time = current_time - self.previous_time
|
||||
self.previous_time = current_time
|
||||
self.collect_time_counter = self.collect_time_counter + delta_time
|
||||
|
||||
self.collect_time_counter = self.collect_time_counter + delta_time
|
||||
table.insert(self.fps_samples, 1, delta_time)
|
||||
|
||||
while self.collect_time_counter > self.collect_time do
|
||||
|
@ -13,106 +13,100 @@ textures {
|
||||
}
|
||||
nodes {
|
||||
position {
|
||||
x: 861.0
|
||||
y: 545.0
|
||||
x: 960.0
|
||||
y: 540.0
|
||||
}
|
||||
scale {
|
||||
x: 3.0
|
||||
y: 3.0
|
||||
x: 2.0
|
||||
y: 2.0
|
||||
}
|
||||
type: TYPE_TEMPLATE
|
||||
id: "memory_panel"
|
||||
id: "fps_panel"
|
||||
inherit_alpha: true
|
||||
template: "/druid/widget/memory_panel/memory_panel.gui"
|
||||
template: "/druid/widget/fps_panel/fps_panel.gui"
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/root"
|
||||
parent: "memory_panel"
|
||||
id: "fps_panel/root"
|
||||
parent: "fps_panel"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "memory_panel/mini_graph"
|
||||
parent: "memory_panel/root"
|
||||
id: "fps_panel/mini_graph"
|
||||
parent: "fps_panel/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/root"
|
||||
parent: "memory_panel/mini_graph"
|
||||
id: "fps_panel/mini_graph/root"
|
||||
parent: "fps_panel/mini_graph"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/header"
|
||||
parent: "memory_panel/mini_graph/root"
|
||||
id: "fps_panel/mini_graph/header"
|
||||
parent: "fps_panel/mini_graph/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "memory_panel/mini_graph/text_header"
|
||||
parent: "memory_panel/mini_graph/header"
|
||||
id: "fps_panel/mini_graph/text_header"
|
||||
parent: "fps_panel/mini_graph/header"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/icon_drag"
|
||||
parent: "memory_panel/mini_graph/header"
|
||||
id: "fps_panel/mini_graph/icon_drag"
|
||||
parent: "fps_panel/mini_graph/header"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/content"
|
||||
parent: "memory_panel/mini_graph/root"
|
||||
id: "fps_panel/mini_graph/content"
|
||||
parent: "fps_panel/mini_graph/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/prefab_line"
|
||||
parent: "memory_panel/mini_graph/content"
|
||||
id: "fps_panel/mini_graph/prefab_line"
|
||||
parent: "fps_panel/mini_graph/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/color_low"
|
||||
parent: "memory_panel/mini_graph/content"
|
||||
id: "fps_panel/mini_graph/color_low"
|
||||
parent: "fps_panel/mini_graph/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/content"
|
||||
parent: "memory_panel/root"
|
||||
id: "fps_panel/content"
|
||||
parent: "fps_panel/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "memory_panel/text_max_value"
|
||||
parent: "memory_panel/content"
|
||||
id: "fps_panel/text_min_fps"
|
||||
parent: "fps_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "memory_panel/text_per_second"
|
||||
parent: "memory_panel/content"
|
||||
id: "fps_panel/text_fps"
|
||||
parent: "fps_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/line_second_1"
|
||||
parent: "memory_panel/content"
|
||||
id: "fps_panel/line_second_1"
|
||||
parent: "fps_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/line_second_2"
|
||||
parent: "memory_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "memory_panel/text_memory"
|
||||
parent: "memory_panel/content"
|
||||
id: "fps_panel/line_second_2"
|
||||
parent: "fps_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
material: "/builtins/materials/gui.material"
|
||||
|
@ -1,10 +1,10 @@
|
||||
local druid = require("druid.druid")
|
||||
|
||||
local memory_panel = require("druid.widget.memory_panel.memory_panel")
|
||||
local fps_panel = require("druid.widget.fps_panel.fps_panel")
|
||||
|
||||
function init(self)
|
||||
self.druid = druid.new(self)
|
||||
self.memory_panel = self.druid:new_widget(memory_panel, "memory_panel")
|
||||
self.fps_panel = self.druid:new_widget(fps_panel, "fps_panel")
|
||||
end
|
||||
|
||||
function final(self)
|
||||
|
@ -674,6 +674,7 @@ Thank you for using Druid and please share your feedback!
|
||||
- **[Docs]** Add [CONTRIBUTING.md](https://github.com/Insality/druid/blob/develop/CONTRIBUTING.md) file with various information to help people to contribute to the Druid.
|
||||
- **[Editor Scripts]** Updated editor scripts
|
||||
- **[Editor Scripts]** Add "[Druid] Create Druid Widget" instead of "Create Custom Component"
|
||||
- **[Editor Scripts]** Add "[Druid] Create Druid GUI Script"
|
||||
- **[Editor Scripts]** Add "[Druid] Settings" editor dialog
|
||||
- Contains different documentation links
|
||||
- You can adjust the widget template path to use your own templates in "Create Druid Widget" editor script
|
||||
|
Loading…
x
Reference in New Issue
Block a user