Update example assets

This commit is contained in:
Insality
2024-11-20 23:43:39 +02:00
parent 7ea8691fc5
commit 6552ea5cac
71 changed files with 199 additions and 2687 deletions

View File

@@ -21,7 +21,7 @@ nodes {
z: 0.157
}
type: TYPE_BOX
texture: "druid/pixel"
texture: "druid_example/pixel"
id: "root"
layer: "druid"
inherit_alpha: true

View File

@@ -17,7 +17,7 @@ nodes {
z: 0.204
}
type: TYPE_BOX
texture: "druid/pixel"
texture: "druid_example/pixel"
id: "root"
adjust_mode: ADJUST_MODE_STRETCH
layer: "druid"
@@ -72,7 +72,7 @@ nodes {
y: 850.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "scroll_view"
pivot: PIVOT_NW
adjust_mode: ADJUST_MODE_STRETCH
@@ -87,7 +87,7 @@ nodes {
y: 850.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "scroll_content"
pivot: PIVOT_NW
adjust_mode: ADJUST_MODE_STRETCH
@@ -106,36 +106,6 @@ nodes {
inherit_alpha: true
template: "/example/components/examples_list_view/examples_list_view_item.gui"
}
nodes {
type: TYPE_BOX
id: "examples_list_view_item/root"
parent: "examples_list_view_item"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "examples_list_view_item/panel_highlight"
parent: "examples_list_view_item/root"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "examples_list_view_item/panel_selected"
parent: "examples_list_view_item/root"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "examples_list_view_item/icon"
parent: "examples_list_view_item/root"
template_node_child: true
}
nodes {
type: TYPE_TEXT
id: "examples_list_view_item/text"
parent: "examples_list_view_item/root"
template_node_child: true
}
layers {
name: "druid"
}

View File

@@ -90,7 +90,13 @@ function M:add_example(examples, druid_example)
local root = gui.get_node(example_data.root)
gui.set_enabled(root, true)
local instance = druid_example.druid:new(example_data.component_class, example_data.template)
local instance
if example_data.widget_class then
instance = druid_example.druid:new_widget(example_data.widget_class, example_data.template)
else
instance = druid_example.druid:new(example_data.component_class, example_data.template)
end
self.selected_example = {
data = example_data,

View File

@@ -17,7 +17,7 @@ nodes {
z: 0.204
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "root"
pivot: PIVOT_W
adjust_mode: ADJUST_MODE_STRETCH
@@ -36,7 +36,7 @@ nodes {
z: 0.322
}
type: TYPE_BOX
texture: "druid/pixel"
texture: "druid_example/pixel"
id: "panel_highlight"
pivot: PIVOT_W
parent: "root"
@@ -55,7 +55,7 @@ nodes {
z: 0.333
}
type: TYPE_BOX
texture: "druid/pixel"
texture: "druid_example/pixel"
id: "panel_selected"
pivot: PIVOT_W
parent: "root"
@@ -77,7 +77,7 @@ nodes {
z: 0.851
}
type: TYPE_BOX
texture: "druid/icon_arrow"
texture: "druid_example/icon_arrow"
id: "icon"
parent: "root"
layer: "druid"

View File

@@ -21,7 +21,7 @@ nodes {
z: 0.204
}
type: TYPE_BOX
texture: "druid/pixel"
texture: "druid_example/pixel"
id: "root"
adjust_mode: ADJUST_MODE_STRETCH
layer: "druid"
@@ -76,7 +76,7 @@ nodes {
y: 190.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "scroll_view"
pivot: PIVOT_NW
adjust_mode: ADJUST_MODE_STRETCH
@@ -91,7 +91,7 @@ nodes {
y: 190.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "scroll_content"
pivot: PIVOT_NW
adjust_mode: ADJUST_MODE_STRETCH
@@ -150,7 +150,7 @@ nodes {
z: 0.157
}
type: TYPE_BOX
texture: "druid/pixel"
texture: "druid_example/pixel"
id: "separator"
pivot: PIVOT_N
parent: "root"

View File

@@ -156,7 +156,7 @@ nodes {
y: 50.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "group_fps"
parent: "root"
inherit_alpha: true
@@ -286,7 +286,7 @@ nodes {
y: 50.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "group_components"
parent: "root"
inherit_alpha: true

View File

@@ -21,7 +21,7 @@ nodes {
z: 0.204
}
type: TYPE_BOX
texture: "druid/pixel"
texture: "druid_example/pixel"
id: "root"
adjust_mode: ADJUST_MODE_STRETCH
layer: "druid"
@@ -91,30 +91,6 @@ nodes {
inherit_alpha: true
template: "/example/templates/button_text_blue.gui"
}
nodes {
size {
x: 240.0
y: 80.0
}
type: TYPE_BOX
id: "button_view_code/root"
parent: "button_view_code"
overridden_fields: 4
template_node_child: true
}
nodes {
scale {
x: 0.75
y: 0.75
}
type: TYPE_TEXT
text: "View code"
id: "button_view_code/text"
parent: "button_view_code/root"
overridden_fields: 3
overridden_fields: 8
template_node_child: true
}
nodes {
position {
x: 220.0
@@ -142,44 +118,6 @@ nodes {
inherit_alpha: true
template: "/example/templates/button_text_yellow.gui"
}
nodes {
size {
x: 130.0
y: 35.0
}
type: TYPE_BOX
texture: "druid/ui_circle_8"
id: "button_profiler/root"
parent: "button_profiler"
slice9 {
x: 4.0
y: 4.0
z: 4.0
w: 4.0
}
overridden_fields: 4
overridden_fields: 9
overridden_fields: 22
template_node_child: true
}
nodes {
scale {
x: 0.6
y: 0.6
}
size {
x: 190.0
y: 50.0
}
type: TYPE_TEXT
text: "Profiler"
id: "button_profiler/text"
parent: "button_profiler/root"
overridden_fields: 3
overridden_fields: 4
overridden_fields: 8
template_node_child: true
}
nodes {
position {
x: -200.0
@@ -190,7 +128,7 @@ nodes {
y: 250.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "scroll_view"
pivot: PIVOT_NW
parent: "root"
@@ -203,7 +141,7 @@ nodes {
y: 250.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "scroll_content"
pivot: PIVOT_NW
parent: "scroll_view"

View File

@@ -12,7 +12,7 @@ nodes {
y: 40.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "root"
pivot: PIVOT_NW
adjust_mode: ADJUST_MODE_STRETCH
@@ -71,7 +71,7 @@ nodes {
z: 0.49
}
type: TYPE_BOX
texture: "druid/rect_round2_width1"
texture: "druid_example/rect_round2_width1"
id: "button"
parent: "root"
inherit_alpha: true
@@ -96,7 +96,7 @@ nodes {
z: 0.333
}
type: TYPE_BOX
texture: "druid/pixel"
texture: "druid_example/pixel"
id: "selected"
pivot: PIVOT_S
adjust_mode: ADJUST_MODE_STRETCH

View File

@@ -12,7 +12,7 @@ nodes {
y: 40.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "root"
pivot: PIVOT_NW
adjust_mode: ADJUST_MODE_STRETCH
@@ -71,7 +71,7 @@ nodes {
z: 0.49
}
type: TYPE_BOX
texture: "druid/rect_round2_width1"
texture: "druid_example/rect_round2_width1"
id: "button"
parent: "root"
inherit_alpha: true
@@ -89,7 +89,7 @@ nodes {
z: 0.761
}
type: TYPE_BOX
texture: "druid/icon_check"
texture: "druid_example/icon_check"
id: "icon"
parent: "button"
inherit_alpha: true
@@ -109,7 +109,7 @@ nodes {
z: 0.333
}
type: TYPE_BOX
texture: "druid/pixel"
texture: "druid_example/pixel"
id: "selected"
pivot: PIVOT_S
adjust_mode: ADJUST_MODE_STRETCH

View File

@@ -12,7 +12,7 @@ nodes {
y: 40.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "root"
pivot: PIVOT_NW
adjust_mode: ADJUST_MODE_STRETCH
@@ -62,7 +62,7 @@ nodes {
y: -20.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "E_Anchor"
pivot: PIVOT_E
adjust_mode: ADJUST_MODE_STRETCH
@@ -85,7 +85,7 @@ nodes {
z: 0.49
}
type: TYPE_BOX
texture: "druid/rect_round2_width1"
texture: "druid_example/rect_round2_width1"
id: "button"
pivot: PIVOT_E
parent: "E_Anchor"
@@ -111,7 +111,7 @@ nodes {
z: 0.333
}
type: TYPE_BOX
texture: "druid/pixel"
texture: "druid_example/pixel"
id: "selected"
pivot: PIVOT_SE
adjust_mode: ADJUST_MODE_STRETCH
@@ -169,7 +169,7 @@ nodes {
z: 0.157
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "slider"
parent: "root"
inherit_alpha: true
@@ -185,7 +185,7 @@ nodes {
z: 0.157
}
type: TYPE_BOX
texture: "druid/ui_circle_8"
texture: "druid_example/ui_circle_8"
id: "slider_back"
parent: "slider"
inherit_alpha: true
@@ -210,7 +210,7 @@ nodes {
z: 0.761
}
type: TYPE_BOX
texture: "druid/ui_circle_8"
texture: "druid_example/ui_circle_8"
id: "slider_pin"
parent: "slider"
inherit_alpha: true

View File

@@ -17,7 +17,7 @@ nodes {
z: 0.204
}
type: TYPE_BOX
texture: "druid/pixel"
texture: "druid_example/pixel"
id: "root"
adjust_mode: ADJUST_MODE_STRETCH
layer: "druid"
@@ -72,7 +72,7 @@ nodes {
y: 290.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "scroll_view"
xanchor: XANCHOR_LEFT
pivot: PIVOT_NW
@@ -88,7 +88,7 @@ nodes {
y: 290.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "scroll_content"
pivot: PIVOT_NW
adjust_mode: ADJUST_MODE_STRETCH
@@ -126,7 +126,7 @@ nodes {
z: 0.157
}
type: TYPE_BOX
texture: "druid/pixel"
texture: "druid_example/pixel"
id: "separator"
pivot: PIVOT_N
parent: "root"
@@ -139,7 +139,7 @@ nodes {
y: 100.0
}
type: TYPE_BOX
texture: "druid/empty"
texture: "druid_example/empty"
id: "propeties"
parent: "root"
inherit_alpha: true
@@ -153,60 +153,6 @@ nodes {
inherit_alpha: true
template: "/example/components/properties_panel/properties/property_slider.gui"
}
nodes {
type: TYPE_BOX
id: "property_slider/root"
parent: "property_slider"
template_node_child: true
}
nodes {
type: TYPE_TEXT
id: "property_slider/text_name"
parent: "property_slider/root"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "property_slider/E_Anchor"
parent: "property_slider/root"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "property_slider/button"
parent: "property_slider/E_Anchor"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "property_slider/selected"
parent: "property_slider/button"
template_node_child: true
}
nodes {
type: TYPE_TEXT
id: "property_slider/text_value"
parent: "property_slider/button"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "property_slider/slider"
parent: "property_slider/root"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "property_slider/slider_back"
parent: "property_slider/slider"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "property_slider/slider_pin"
parent: "property_slider/slider"
template_node_child: true
}
nodes {
position {
y: -50.0
@@ -217,36 +163,6 @@ nodes {
inherit_alpha: true
template: "/example/components/properties_panel/properties/property_checkbox.gui"
}
nodes {
type: TYPE_BOX
id: "property_checkbox/root"
parent: "property_checkbox"
template_node_child: true
}
nodes {
type: TYPE_TEXT
id: "property_checkbox/text_name"
parent: "property_checkbox/root"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "property_checkbox/button"
parent: "property_checkbox/root"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "property_checkbox/icon"
parent: "property_checkbox/button"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "property_checkbox/selected"
parent: "property_checkbox/button"
template_node_child: true
}
nodes {
position {
y: -100.0
@@ -257,36 +173,6 @@ nodes {
inherit_alpha: true
template: "/example/components/properties_panel/properties/property_button.gui"
}
nodes {
type: TYPE_BOX
id: "property_button/root"
parent: "property_button"
template_node_child: true
}
nodes {
type: TYPE_TEXT
id: "property_button/text_name"
parent: "property_button/root"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "property_button/button"
parent: "property_button/root"
template_node_child: true
}
nodes {
type: TYPE_BOX
id: "property_button/selected"
parent: "property_button/button"
template_node_child: true
}
nodes {
type: TYPE_TEXT
id: "property_button/text_button"
parent: "property_button/button"
template_node_child: true
}
nodes {
position {
x: -200.0