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

@@ -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"