Fix for examples

This commit is contained in:
Insality
2025-01-29 23:13:09 +02:00
parent db0c4c8ee5
commit da5c6b9a54
9 changed files with 319 additions and 32 deletions

View File

@@ -8,10 +8,6 @@ textures {
texture: "/example/assets/druid_example.atlas"
}
nodes {
position {
x: 960.0
y: 540.0
}
size {
x: 700.0
y: 500.0
@@ -202,6 +198,18 @@ nodes {
inherit_alpha: true
template: "/example/templates/button_text_green.gui"
}
nodes {
type: TYPE_BOX
id: "button_accept/root"
parent: "button_accept"
template_node_child: true
}
nodes {
type: TYPE_TEXT
id: "button_accept/text"
parent: "button_accept/root"
template_node_child: true
}
nodes {
position {
x: 160.0
@@ -213,6 +221,18 @@ nodes {
inherit_alpha: true
template: "/example/templates/button_text_red.gui"
}
nodes {
type: TYPE_BOX
id: "button_decline/root"
parent: "button_decline"
template_node_child: true
}
nodes {
type: TYPE_TEXT
id: "button_decline/text"
parent: "button_decline/root"
template_node_child: true
}
layers {
name: "druid"
}

View File

@@ -8,10 +8,6 @@ textures {
texture: "/example/assets/druid_example.atlas"
}
nodes {
position {
x: 960.0
y: 540.0
}
size {
x: 700.0
y: 500.0
@@ -201,6 +197,18 @@ nodes {
inherit_alpha: true
template: "/example/templates/button_text_green.gui"
}
nodes {
type: TYPE_BOX
id: "button_accept/root"
parent: "button_accept"
template_node_child: true
}
nodes {
type: TYPE_TEXT
id: "button_accept/text"
parent: "button_accept/root"
template_node_child: true
}
layers {
name: "druid"
}

View File

@@ -8,10 +8,6 @@ textures {
texture: "/example/assets/druid_example.atlas"
}
nodes {
position {
x: 960.0
y: 540.0
}
size {
x: 600.0
y: 580.0
@@ -173,6 +169,23 @@ nodes {
inherit_alpha: true
template: "/example/templates/button_text_white.gui"
}
nodes {
size {
x: 245.0
y: 75.0
}
type: TYPE_BOX
id: "button/root"
parent: "button"
overridden_fields: 4
template_node_child: true
}
nodes {
type: TYPE_TEXT
id: "button/text"
parent: "button/root"
template_node_child: true
}
layers {
name: "druid"
}

View File

@@ -38,7 +38,7 @@ function M:init(template, nodes)
self.grid = self.druid:new_grid("content", self.prefab, 2)
self.grid.style.IS_DYNAMIC_NODE_POSES = true
self.animation = panthera.create_gui(window_animation_panthera, self:get_template(), nodes)
self.animation = panthera.create_gui(window_animation_panthera, self:get_template(), self:get_nodes())
panthera.play(self.animation, "open")
self:load_langs()