mirror of
https://github.com/Insality/druid
synced 2025-11-26 19:00:52 +01:00
Remove widgets from druid repo
This commit is contained in:
1086
example/druid.gui
1086
example/druid.gui
File diff suppressed because it is too large
Load Diff
@@ -25,89 +25,5 @@ nodes {
|
||||
inherit_alpha: true
|
||||
template: "/druid/widget/fps_panel/fps_panel.gui"
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/root"
|
||||
parent: "fps_panel"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "fps_panel/mini_graph"
|
||||
parent: "fps_panel/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/mini_graph/root"
|
||||
parent: "fps_panel/mini_graph"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/mini_graph/header"
|
||||
parent: "fps_panel/mini_graph/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "fps_panel/mini_graph/text_header"
|
||||
parent: "fps_panel/mini_graph/header"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/mini_graph/icon_drag"
|
||||
parent: "fps_panel/mini_graph/header"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/mini_graph/content"
|
||||
parent: "fps_panel/mini_graph/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/mini_graph/prefab_line"
|
||||
parent: "fps_panel/mini_graph/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/mini_graph/color_low"
|
||||
parent: "fps_panel/mini_graph/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/content"
|
||||
parent: "fps_panel/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "fps_panel/text_min_fps"
|
||||
parent: "fps_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "fps_panel/text_fps"
|
||||
parent: "fps_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/line_second_1"
|
||||
parent: "fps_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/line_second_2"
|
||||
parent: "fps_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
material: "/builtins/materials/gui.material"
|
||||
adjust_reference: ADJUST_REFERENCE_PARENT
|
||||
|
||||
@@ -10,181 +10,6 @@ function M.get_examples()
|
||||
root = "hover_hint_example/root",
|
||||
code_url = "example/examples/widgets/hover_hint/hover_hint_example.lua",
|
||||
widget_class = require("example.examples.widgets.hover_hint.hover_hint_example"),
|
||||
},
|
||||
{
|
||||
name_id = "ui_example_widget_properties_panel",
|
||||
information_text_id = "ui_example_widget_properties_panel_description",
|
||||
template = "properties_panel",
|
||||
root = "properties_panel/root",
|
||||
code_url = "example/examples/widgets/examples_list.lua",
|
||||
widget_class = require("druid.widget.properties_panel.properties_panel"),
|
||||
on_create = function(instance, output_list)
|
||||
---@cast instance druid.widget.properties_panel
|
||||
|
||||
instance:add_button(function(button)
|
||||
button:set_text_button("Button")
|
||||
button.button.on_click:subscribe(function()
|
||||
print("Button clicked")
|
||||
end)
|
||||
end)
|
||||
|
||||
instance:add_checkbox(function(checkbox)
|
||||
--print("Checkbox clicked", value)
|
||||
checkbox:set_text_property("Checkbox")
|
||||
checkbox.on_change_value:subscribe(function(value)
|
||||
print("Checkbox clicked", value)
|
||||
end)
|
||||
checkbox:set_value(false)
|
||||
end)
|
||||
|
||||
instance:add_input(function(input)
|
||||
input:set_text_property("Input")
|
||||
input:set_text_value("Initial")
|
||||
input:on_change(function(text)
|
||||
print("Input changed", text)
|
||||
end)
|
||||
end)
|
||||
|
||||
instance:add_left_right_selector(function(selector)
|
||||
selector:set_template("Arrows Number")
|
||||
selector.on_change_value:subscribe(function(value)
|
||||
print("Left Right Selector changed", value)
|
||||
end)
|
||||
selector:set_number_type(0, 42, true, 1)
|
||||
selector:set_value(0)
|
||||
end)
|
||||
|
||||
instance:add_left_right_selector(function(selector)
|
||||
selector:set_template("Arrows Array")
|
||||
selector.on_change_value:subscribe(function(value)
|
||||
print("Left Right Array value", value)
|
||||
end)
|
||||
selector:set_array_type({"Zero", "One", "Two", "Three", "Four", "Five"}, false, 1)
|
||||
selector:set_value("Zero")
|
||||
end)
|
||||
|
||||
instance:add_slider(function(slider)
|
||||
slider:set_text_property("Slider")
|
||||
slider:set_value(0.5)
|
||||
slider:on_change(function(value)
|
||||
print("Slider changed", value)
|
||||
end)
|
||||
end)
|
||||
|
||||
instance:add_text(function(text)
|
||||
text:set_text_property("Text")
|
||||
text:set_text_value("Hello, World!")
|
||||
end)
|
||||
end,
|
||||
},
|
||||
{
|
||||
name_id = "ui_example_widget_property_button",
|
||||
information_text_id = "ui_example_widget_property_button_description",
|
||||
template = "property_button",
|
||||
root = "property_button/root",
|
||||
code_url = "example/components/properties_panel/properties/property_button.lua",
|
||||
widget_class = require("example.components.properties_panel.properties.property_button"),
|
||||
on_create = function(instance, output_list)
|
||||
---@cast instance property_button
|
||||
instance.button.on_click:subscribe(function()
|
||||
output_list:add_log_text("Button clicked")
|
||||
end)
|
||||
end,
|
||||
},
|
||||
{
|
||||
name_id = "ui_example_widget_property_input",
|
||||
information_text_id = "ui_example_widget_property_input_description",
|
||||
template = "property_input",
|
||||
root = "property_input/root",
|
||||
code_url = "example/examples/widgets/examples_list.lua",
|
||||
widget_class = require("druid.widget.properties_panel.properties.property_input"),
|
||||
},
|
||||
{
|
||||
name_id = "ui_example_widget_property_slider",
|
||||
information_text_id = "ui_example_widget_property_slider_description",
|
||||
template = "property_slider",
|
||||
root = "property_slider/root",
|
||||
code_url = "example/components/properties_panel/properties/property_slider.lua",
|
||||
widget_class = require("example.components.properties_panel.properties.property_slider"),
|
||||
on_create = function(instance, output_list)
|
||||
---@cast instance property_slider
|
||||
instance.slider.on_change_value:subscribe(function(_, value)
|
||||
output_list:add_log_text("Slider value: " .. value)
|
||||
end)
|
||||
end,
|
||||
},
|
||||
{
|
||||
name_id = "ui_example_widget_property_checkbox",
|
||||
information_text_id = "ui_example_widget_property_checkbox_description",
|
||||
template = "property_checkbox",
|
||||
root = "property_checkbox/root",
|
||||
code_url = "example/components/properties_panel/properties/property_checkbox.lua",
|
||||
widget_class = require("example.components.properties_panel.properties.property_checkbox"),
|
||||
on_create = function(instance, output_list)
|
||||
---@cast instance property_checkbox
|
||||
instance.button.on_click:subscribe(function()
|
||||
output_list:add_log_text("Checkbox clicked")
|
||||
end)
|
||||
end,
|
||||
},
|
||||
{
|
||||
name_id = "ui_example_widget_memory_panel",
|
||||
information_text_id = "ui_example_widget_memory_panel_description",
|
||||
template = "memory_panel",
|
||||
root = "memory_panel/root",
|
||||
code_url = "druid/widget/memory_panel/memory_panel.lua",
|
||||
widget_class = require("druid.widget.memory_panel.memory_panel"),
|
||||
on_create = function(instance, output_list)
|
||||
---@cast instance druid.widget.memory_panel
|
||||
print("Memory panel created")
|
||||
end,
|
||||
},
|
||||
{
|
||||
name_id = "ui_example_widget_fps_panel",
|
||||
information_text_id = "ui_example_widget_fps_panel_description",
|
||||
template = "fps_panel",
|
||||
root = "fps_panel/root",
|
||||
code_url = "druid/widget/fps_panel/fps_panel.lua",
|
||||
widget_class = require("druid.widget.fps_panel.fps_panel"),
|
||||
on_create = function(instance, output_list)
|
||||
---@cast instance druid.widget.fps_panel
|
||||
print("FPS panel created")
|
||||
end,
|
||||
},
|
||||
{
|
||||
name_id = "ui_example_widget_mini_graph",
|
||||
information_text_id = "ui_example_widget_mini_graph_description",
|
||||
template = "mini_graph",
|
||||
root = "mini_graph/root",
|
||||
code_url = "druid/widget/mini_graph/mini_graph.lua",
|
||||
widget_class = require("druid.widget.mini_graph.mini_graph"),
|
||||
on_create = function(instance, output_list)
|
||||
---@cast instance druid.widget.mini_graph
|
||||
instance:set_samples(50)
|
||||
end,
|
||||
properties_control = function(instance, properties_panel)
|
||||
---@cast instance druid.widget.mini_graph
|
||||
properties_panel:add_slider("value", 0.5, function(value)
|
||||
-- Remap to -1, 2
|
||||
value = value * 3 - 1
|
||||
for index = 1, 50 do
|
||||
-- Take value each 0.1 step, the higher value at argument value
|
||||
local x = index * (1 / 50)
|
||||
local distance = math.abs(x - value)
|
||||
local line_v = 1 - distance^2
|
||||
|
||||
instance:set_line_value(index, line_v)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
},
|
||||
{
|
||||
name_id = "ui_example_widget_tiling_node",
|
||||
information_text_id = "ui_example_widget_tiling_node_description",
|
||||
template = "example_tiling_node",
|
||||
root = "example_tiling_node/root",
|
||||
code_url = "example/examples/widgets/tiling_node/example_tiling_node.lua",
|
||||
widget_class = require("example.examples.widgets.tiling_node.example_tiling_node"),
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
nodes {
|
||||
size {
|
||||
x: 200.0
|
||||
y: 100.0
|
||||
}
|
||||
type: TYPE_BOX
|
||||
id: "root"
|
||||
inherit_alpha: true
|
||||
size_mode: SIZE_MODE_AUTO
|
||||
visible: false
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "fps_panel"
|
||||
parent: "root"
|
||||
inherit_alpha: true
|
||||
template: "/druid/widget/fps_panel/fps_panel.gui"
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/root"
|
||||
parent: "fps_panel"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "fps_panel/mini_graph"
|
||||
parent: "fps_panel/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/mini_graph/root"
|
||||
parent: "fps_panel/mini_graph"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/mini_graph/header"
|
||||
parent: "fps_panel/mini_graph/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "fps_panel/mini_graph/text_header"
|
||||
parent: "fps_panel/mini_graph/header"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/mini_graph/icon_drag"
|
||||
parent: "fps_panel/mini_graph/header"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/mini_graph/content"
|
||||
parent: "fps_panel/mini_graph/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/mini_graph/prefab_line"
|
||||
parent: "fps_panel/mini_graph/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/mini_graph/color_low"
|
||||
parent: "fps_panel/mini_graph/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/content"
|
||||
parent: "fps_panel/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "fps_panel/text_min_fps"
|
||||
parent: "fps_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "fps_panel/text_fps"
|
||||
parent: "fps_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/line_second_1"
|
||||
parent: "fps_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "fps_panel/line_second_2"
|
||||
parent: "fps_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
material: "/builtins/materials/gui.material"
|
||||
adjust_reference: ADJUST_REFERENCE_PARENT
|
||||
@@ -1,12 +0,0 @@
|
||||
local fps_panel = require("druid.widget.fps_panel.fps_panel")
|
||||
|
||||
---@class examples.example_fps_panel: druid.widget
|
||||
local M = {}
|
||||
|
||||
|
||||
function M:init()
|
||||
self.fps_panel = self.druid:new_widget(fps_panel, "fps_panel")
|
||||
end
|
||||
|
||||
|
||||
return M
|
||||
@@ -1,110 +0,0 @@
|
||||
nodes {
|
||||
size {
|
||||
x: 200.0
|
||||
y: 100.0
|
||||
}
|
||||
type: TYPE_BOX
|
||||
id: "root"
|
||||
inherit_alpha: true
|
||||
size_mode: SIZE_MODE_AUTO
|
||||
visible: false
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "memory_panel"
|
||||
parent: "root"
|
||||
inherit_alpha: true
|
||||
template: "/druid/widget/memory_panel/memory_panel.gui"
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/root"
|
||||
parent: "memory_panel"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "memory_panel/mini_graph"
|
||||
parent: "memory_panel/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/root"
|
||||
parent: "memory_panel/mini_graph"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/header"
|
||||
parent: "memory_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"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/icon_drag"
|
||||
parent: "memory_panel/mini_graph/header"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/content"
|
||||
parent: "memory_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"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/color_low"
|
||||
parent: "memory_panel/mini_graph/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/content"
|
||||
parent: "memory_panel/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "memory_panel/text_max_value"
|
||||
parent: "memory_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "memory_panel/text_per_second"
|
||||
parent: "memory_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/line_second_1"
|
||||
parent: "memory_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"
|
||||
template_node_child: true
|
||||
}
|
||||
material: "/builtins/materials/gui.material"
|
||||
adjust_reference: ADJUST_REFERENCE_PARENT
|
||||
@@ -1,12 +0,0 @@
|
||||
local memory_panel = require("druid.widget.memory_panel.memory_panel")
|
||||
|
||||
---@class examples.example_memory_panel: druid.widget
|
||||
local M = {}
|
||||
|
||||
|
||||
function M:init()
|
||||
self.memory_panel = self.druid:new_widget(memory_panel, "memory_panel")
|
||||
end
|
||||
|
||||
|
||||
return M
|
||||
@@ -1,626 +0,0 @@
|
||||
nodes {
|
||||
size {
|
||||
x: 200.0
|
||||
y: 100.0
|
||||
}
|
||||
type: TYPE_BOX
|
||||
id: "root"
|
||||
inherit_alpha: true
|
||||
size_mode: SIZE_MODE_AUTO
|
||||
visible: false
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "properties_panel"
|
||||
parent: "root"
|
||||
inherit_alpha: true
|
||||
template: "/druid/widget/properties_panel/properties_panel.gui"
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/root"
|
||||
parent: "properties_panel"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/header"
|
||||
parent: "properties_panel/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/text_header"
|
||||
parent: "properties_panel/header"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/icon_drag"
|
||||
parent: "properties_panel/header"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/icon_refresh"
|
||||
parent: "properties_panel/header"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/icon_back"
|
||||
parent: "properties_panel/header"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/content"
|
||||
parent: "properties_panel/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/scroll_view"
|
||||
parent: "properties_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/scroll_content"
|
||||
parent: "properties_panel/scroll_view"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/propeties"
|
||||
parent: "properties_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "properties_panel/property_slider"
|
||||
parent: "properties_panel/propeties"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_slider/root"
|
||||
parent: "properties_panel/property_slider"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_slider/text_name"
|
||||
parent: "properties_panel/property_slider/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_slider/E_Anchor"
|
||||
parent: "properties_panel/property_slider/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_slider/slider"
|
||||
parent: "properties_panel/property_slider/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_slider/slider_back"
|
||||
parent: "properties_panel/property_slider/slider"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_slider/slider_pin"
|
||||
parent: "properties_panel/property_slider/slider"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_slider/button"
|
||||
parent: "properties_panel/property_slider/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_slider/selected"
|
||||
parent: "properties_panel/property_slider/button"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_slider/text_value"
|
||||
parent: "properties_panel/property_slider/button"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "properties_panel/property_checkbox"
|
||||
parent: "properties_panel/propeties"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_checkbox/root"
|
||||
parent: "properties_panel/property_checkbox"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_checkbox/text_name"
|
||||
parent: "properties_panel/property_checkbox/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_checkbox/E_Anchor"
|
||||
parent: "properties_panel/property_checkbox/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_checkbox/button"
|
||||
parent: "properties_panel/property_checkbox/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_checkbox/icon"
|
||||
parent: "properties_panel/property_checkbox/button"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_checkbox/selected"
|
||||
parent: "properties_panel/property_checkbox/button"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "properties_panel/property_button"
|
||||
parent: "properties_panel/propeties"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_button/root"
|
||||
parent: "properties_panel/property_button"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_button/text_name"
|
||||
parent: "properties_panel/property_button/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_button/E_Anchor"
|
||||
parent: "properties_panel/property_button/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_button/button"
|
||||
parent: "properties_panel/property_button/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_button/selected"
|
||||
parent: "properties_panel/property_button/button"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_button/text_button"
|
||||
parent: "properties_panel/property_button/button"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "properties_panel/property_input"
|
||||
parent: "properties_panel/propeties"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_input/root"
|
||||
parent: "properties_panel/property_input"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_input/text_name"
|
||||
parent: "properties_panel/property_input/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_input/E_Anchor"
|
||||
parent: "properties_panel/property_input/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "properties_panel/property_input/rich_input"
|
||||
parent: "properties_panel/property_input/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_input/rich_input/root"
|
||||
parent: "properties_panel/property_input/rich_input"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_input/rich_input/button"
|
||||
parent: "properties_panel/property_input/rich_input/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_input/rich_input/placeholder_text"
|
||||
parent: "properties_panel/property_input/rich_input/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_input/rich_input/input_text"
|
||||
parent: "properties_panel/property_input/rich_input/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_input/rich_input/cursor_node"
|
||||
parent: "properties_panel/property_input/rich_input/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_input/rich_input/cursor_text"
|
||||
parent: "properties_panel/property_input/rich_input/cursor_node"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_input/selected"
|
||||
parent: "properties_panel/property_input/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "properties_panel/property_text"
|
||||
parent: "properties_panel/propeties"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_text/root"
|
||||
parent: "properties_panel/property_text"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_text/text_name"
|
||||
parent: "properties_panel/property_text/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_text/text_right"
|
||||
parent: "properties_panel/property_text/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "properties_panel/property_left_right_selector"
|
||||
parent: "properties_panel/propeties"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_left_right_selector/root"
|
||||
parent: "properties_panel/property_left_right_selector"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_left_right_selector/text_name"
|
||||
parent: "properties_panel/property_left_right_selector/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_left_right_selector/E_Anchor"
|
||||
parent: "properties_panel/property_left_right_selector/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_left_right_selector/button_left"
|
||||
parent: "properties_panel/property_left_right_selector/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_left_right_selector/icon_left"
|
||||
parent: "properties_panel/property_left_right_selector/button_left"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_left_right_selector/button_right"
|
||||
parent: "properties_panel/property_left_right_selector/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_left_right_selector/icon_right"
|
||||
parent: "properties_panel/property_left_right_selector/button_right"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_left_right_selector/selected"
|
||||
parent: "properties_panel/property_left_right_selector/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_left_right_selector/text_value"
|
||||
parent: "properties_panel/property_left_right_selector/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "properties_panel/property_vector3"
|
||||
parent: "properties_panel/propeties"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/root"
|
||||
parent: "properties_panel/property_vector3"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_vector3/text_name"
|
||||
parent: "properties_panel/property_vector3/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/E_Anchor"
|
||||
parent: "properties_panel/property_vector3/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/field_x"
|
||||
parent: "properties_panel/property_vector3/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_vector3/text_x"
|
||||
parent: "properties_panel/property_vector3/field_x"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "properties_panel/property_vector3/rich_input_x"
|
||||
parent: "properties_panel/property_vector3/field_x"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/rich_input_x/root"
|
||||
parent: "properties_panel/property_vector3/rich_input_x"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/rich_input_x/button"
|
||||
parent: "properties_panel/property_vector3/rich_input_x/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_vector3/rich_input_x/placeholder_text"
|
||||
parent: "properties_panel/property_vector3/rich_input_x/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_vector3/rich_input_x/input_text"
|
||||
parent: "properties_panel/property_vector3/rich_input_x/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/rich_input_x/cursor_node"
|
||||
parent: "properties_panel/property_vector3/rich_input_x/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_vector3/rich_input_x/cursor_text"
|
||||
parent: "properties_panel/property_vector3/rich_input_x/cursor_node"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/selected_x"
|
||||
parent: "properties_panel/property_vector3/field_x"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/field_y"
|
||||
parent: "properties_panel/property_vector3/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_vector3/text_y"
|
||||
parent: "properties_panel/property_vector3/field_y"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "properties_panel/property_vector3/rich_input_y"
|
||||
parent: "properties_panel/property_vector3/field_y"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/rich_input_y/root"
|
||||
parent: "properties_panel/property_vector3/rich_input_y"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/rich_input_y/button"
|
||||
parent: "properties_panel/property_vector3/rich_input_y/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_vector3/rich_input_y/placeholder_text"
|
||||
parent: "properties_panel/property_vector3/rich_input_y/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_vector3/rich_input_y/input_text"
|
||||
parent: "properties_panel/property_vector3/rich_input_y/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/rich_input_y/cursor_node"
|
||||
parent: "properties_panel/property_vector3/rich_input_y/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_vector3/rich_input_y/cursor_text"
|
||||
parent: "properties_panel/property_vector3/rich_input_y/cursor_node"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/selected_y"
|
||||
parent: "properties_panel/property_vector3/field_y"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/field_z"
|
||||
parent: "properties_panel/property_vector3/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_vector3/text_z"
|
||||
parent: "properties_panel/property_vector3/field_z"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "properties_panel/property_vector3/rich_input_z"
|
||||
parent: "properties_panel/property_vector3/field_z"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/rich_input_z/root"
|
||||
parent: "properties_panel/property_vector3/rich_input_z"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/rich_input_z/button"
|
||||
parent: "properties_panel/property_vector3/rich_input_z/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_vector3/rich_input_z/placeholder_text"
|
||||
parent: "properties_panel/property_vector3/rich_input_z/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_vector3/rich_input_z/input_text"
|
||||
parent: "properties_panel/property_vector3/rich_input_z/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/rich_input_z/cursor_node"
|
||||
parent: "properties_panel/property_vector3/rich_input_z/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_vector3/rich_input_z/cursor_text"
|
||||
parent: "properties_panel/property_vector3/rich_input_z/cursor_node"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_vector3/selected_z"
|
||||
parent: "properties_panel/property_vector3/field_z"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "properties_panel/property_button_small"
|
||||
parent: "properties_panel/propeties"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_button_small/root"
|
||||
parent: "properties_panel/property_button_small"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_button_small/text_name"
|
||||
parent: "properties_panel/property_button_small/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_button_small/E_Anchor"
|
||||
parent: "properties_panel/property_button_small/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_button_small/button"
|
||||
parent: "properties_panel/property_button_small/E_Anchor"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "properties_panel/property_button_small/selected"
|
||||
parent: "properties_panel/property_button_small/button"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "properties_panel/property_button_small/text_button"
|
||||
parent: "properties_panel/property_button_small/button"
|
||||
template_node_child: true
|
||||
}
|
||||
material: "/builtins/materials/gui.material"
|
||||
adjust_reference: ADJUST_REFERENCE_PARENT
|
||||
@@ -1,67 +0,0 @@
|
||||
local properties_panel = require("druid.widget.properties_panel.properties_panel")
|
||||
|
||||
---@class druid.widget.example_properties_panel: druid.widget
|
||||
local M = {}
|
||||
|
||||
|
||||
function M:init()
|
||||
self.properties_panel = self.druid:new_widget(properties_panel, "properties_panel")
|
||||
|
||||
self.properties_panel:add_button(function(button)
|
||||
button:set_text_button("Button")
|
||||
button.button.on_click:subscribe(function()
|
||||
print("Button clicked")
|
||||
end)
|
||||
end)
|
||||
|
||||
self.properties_panel:add_checkbox(function(checkbox)
|
||||
--print("Checkbox clicked", value)
|
||||
checkbox:set_text_property("Checkbox")
|
||||
checkbox.on_change_value:subscribe(function(value)
|
||||
print("Checkbox clicked", value)
|
||||
end)
|
||||
checkbox:set_value(false)
|
||||
end)
|
||||
|
||||
self.properties_panel:add_input(function(input)
|
||||
input:set_text_property("Input")
|
||||
input:set_text_value("Initial")
|
||||
input:on_change(function(text)
|
||||
print("Input changed", text)
|
||||
end)
|
||||
end)
|
||||
|
||||
self.properties_panel:add_left_right_selector(function(selector)
|
||||
selector:set_template("Arrows Number")
|
||||
selector.on_change_value:subscribe(function(value)
|
||||
print("Left Right Selector changed", value)
|
||||
end)
|
||||
selector:set_number_type(0, 42, true, 1)
|
||||
selector:set_value(0)
|
||||
end)
|
||||
|
||||
self.properties_panel:add_left_right_selector(function(selector)
|
||||
selector:set_template("Arrows Array")
|
||||
selector.on_change_value:subscribe(function(value)
|
||||
print("Left Right Array value", value)
|
||||
end)
|
||||
selector:set_array_type({"Zero", "One", "Two", "Three", "Four", "Five"}, false, 1)
|
||||
selector:set_value("Zero")
|
||||
end)
|
||||
|
||||
self.properties_panel:add_slider(function(slider)
|
||||
slider:set_text_property("Slider")
|
||||
slider:set_value(0.5)
|
||||
slider:on_change(function(value)
|
||||
print("Slider changed", value)
|
||||
end)
|
||||
end)
|
||||
|
||||
self.properties_panel:add_text(function(text)
|
||||
text:set_text_property("Text")
|
||||
text:set_text_value("Hello, World!")
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
return M
|
||||
@@ -1,34 +0,0 @@
|
||||
textures {
|
||||
name: "tiling_texture"
|
||||
texture: "/example/examples/widgets/tiling_node/tiling_texture.atlas"
|
||||
}
|
||||
nodes {
|
||||
size {
|
||||
x: 200.0
|
||||
y: 100.0
|
||||
}
|
||||
type: TYPE_BOX
|
||||
id: "root"
|
||||
inherit_alpha: true
|
||||
size_mode: SIZE_MODE_AUTO
|
||||
visible: false
|
||||
}
|
||||
nodes {
|
||||
size {
|
||||
x: 900.0
|
||||
y: 900.0
|
||||
}
|
||||
type: TYPE_BOX
|
||||
texture: "tiling_texture/pattern_0004"
|
||||
id: "tiling_node"
|
||||
parent: "root"
|
||||
inherit_alpha: true
|
||||
alpha: 0.42
|
||||
material: "gui_tiling_node"
|
||||
}
|
||||
material: "/builtins/materials/gui.material"
|
||||
adjust_reference: ADJUST_REFERENCE_PARENT
|
||||
materials {
|
||||
name: "gui_tiling_node"
|
||||
material: "/druid/custom/tiling_node/gui_tiling_node.material"
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
local tiling_node = require("druid.custom.tiling_node.tiling_node")
|
||||
|
||||
---@class examples.example_tiling_node: druid.widget
|
||||
local M = {}
|
||||
|
||||
|
||||
function M:init()
|
||||
self.tiling_node = self.druid:new(tiling_node, self:get_node("tiling_node"))
|
||||
end
|
||||
|
||||
|
||||
---@param properties_panel properties_panel
|
||||
function M:properties_control(properties_panel)
|
||||
properties_panel:add_slider("Repeat X", 0, function(value)
|
||||
local repeat_x = math.floor(value * 10)
|
||||
self.tiling_node:set_repeat(repeat_x, nil)
|
||||
end)
|
||||
properties_panel:add_slider("Repeat Y", 0, function(value)
|
||||
local repeat_y = math.floor(value * 10)
|
||||
self.tiling_node:set_repeat(nil, repeat_y)
|
||||
end)
|
||||
properties_panel:add_slider("Offset X", 0, function(value)
|
||||
self.tiling_node:set_offset(value, nil)
|
||||
end)
|
||||
properties_panel:add_slider("Offset Y", 0, function(value)
|
||||
self.tiling_node:set_offset(nil, value)
|
||||
end)
|
||||
properties_panel:add_slider("Margin X", 0, function(value)
|
||||
self.tiling_node:set_margin(value, nil)
|
||||
end)
|
||||
properties_panel:add_slider("Margin Y", 0, function(value)
|
||||
self.tiling_node:set_margin(nil, value)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
return M
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,3 +0,0 @@
|
||||
images {
|
||||
image: "/example/examples/widgets/tiling_node/pattern_0004.png"
|
||||
}
|
||||
@@ -62,95 +62,5 @@ nodes {
|
||||
inherit_alpha: true
|
||||
template: "/druid/widget/memory_panel/memory_panel.gui"
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/root"
|
||||
parent: "memory_panel"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEMPLATE
|
||||
id: "memory_panel/mini_graph"
|
||||
parent: "memory_panel/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/root"
|
||||
parent: "memory_panel/mini_graph"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/header"
|
||||
parent: "memory_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"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/icon_drag"
|
||||
parent: "memory_panel/mini_graph/header"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/content"
|
||||
parent: "memory_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"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/mini_graph/color_low"
|
||||
parent: "memory_panel/mini_graph/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/content"
|
||||
parent: "memory_panel/root"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "memory_panel/text_max_value"
|
||||
parent: "memory_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_TEXT
|
||||
id: "memory_panel/text_per_second"
|
||||
parent: "memory_panel/content"
|
||||
template_node_child: true
|
||||
}
|
||||
nodes {
|
||||
type: TYPE_BOX
|
||||
id: "memory_panel/line_second_1"
|
||||
parent: "memory_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"
|
||||
template_node_child: true
|
||||
}
|
||||
material: "/druid/materials/gui_world/gui_world.material"
|
||||
adjust_reference: ADJUST_REFERENCE_DISABLED
|
||||
|
||||
Reference in New Issue
Block a user