mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Widgets WIP
This commit is contained in:
@@ -60,7 +60,23 @@ nodes {
|
||||
x: 200.0
|
||||
}
|
||||
size {
|
||||
x: 226.0
|
||||
x: 200.0
|
||||
y: 40.0
|
||||
}
|
||||
type: TYPE_BOX
|
||||
id: "E_Anchor"
|
||||
pivot: PIVOT_E
|
||||
parent: "root"
|
||||
inherit_alpha: true
|
||||
size_mode: SIZE_MODE_AUTO
|
||||
visible: false
|
||||
}
|
||||
nodes {
|
||||
position {
|
||||
x: -100.0
|
||||
}
|
||||
size {
|
||||
x: 200.0
|
||||
y: 40.0
|
||||
}
|
||||
color {
|
||||
@@ -71,8 +87,7 @@ nodes {
|
||||
type: TYPE_BOX
|
||||
texture: "druid/rect_round2_width2"
|
||||
id: "button"
|
||||
pivot: PIVOT_E
|
||||
parent: "root"
|
||||
parent: "E_Anchor"
|
||||
inherit_alpha: true
|
||||
slice9 {
|
||||
x: 5.0
|
||||
@@ -83,11 +98,10 @@ nodes {
|
||||
}
|
||||
nodes {
|
||||
position {
|
||||
x: -113.0
|
||||
y: -20.0
|
||||
}
|
||||
size {
|
||||
x: 226.0
|
||||
x: 200.0
|
||||
y: 4.0
|
||||
}
|
||||
color {
|
||||
@@ -104,9 +118,6 @@ nodes {
|
||||
inherit_alpha: true
|
||||
}
|
||||
nodes {
|
||||
position {
|
||||
x: -113.0
|
||||
}
|
||||
scale {
|
||||
x: 0.65
|
||||
y: 0.65
|
||||
|
@@ -22,7 +22,7 @@ function M:init(template, nodes)
|
||||
|
||||
self.container = self.druid:new_container(self.root)
|
||||
self.container:add_container("text_name")
|
||||
self.container:add_container("button")
|
||||
self.container:add_container("E_Anchor")
|
||||
end
|
||||
|
||||
|
||||
|
@@ -57,7 +57,23 @@ nodes {
|
||||
}
|
||||
nodes {
|
||||
position {
|
||||
x: -20.0
|
||||
x: 200.0
|
||||
}
|
||||
size {
|
||||
x: 200.0
|
||||
y: 40.0
|
||||
}
|
||||
type: TYPE_BOX
|
||||
id: "E_Anchor"
|
||||
pivot: PIVOT_E
|
||||
parent: "root"
|
||||
inherit_alpha: true
|
||||
size_mode: SIZE_MODE_AUTO
|
||||
visible: false
|
||||
}
|
||||
nodes {
|
||||
position {
|
||||
x: -180.0
|
||||
}
|
||||
size {
|
||||
x: 40.0
|
||||
@@ -69,15 +85,15 @@ nodes {
|
||||
z: 0.49
|
||||
}
|
||||
type: TYPE_BOX
|
||||
texture: "druid/rect_round2_width1"
|
||||
texture: "druid/rect_round2_width2"
|
||||
id: "button"
|
||||
parent: "root"
|
||||
parent: "E_Anchor"
|
||||
inherit_alpha: true
|
||||
slice9 {
|
||||
x: 4.0
|
||||
y: 4.0
|
||||
z: 4.0
|
||||
w: 4.0
|
||||
x: 5.0
|
||||
y: 5.0
|
||||
z: 5.0
|
||||
w: 5.0
|
||||
}
|
||||
}
|
||||
nodes {
|
||||
|
@@ -25,7 +25,7 @@ function M:init(template, nodes)
|
||||
|
||||
self.container = self.druid:new_container(self.root)
|
||||
self.container:add_container("text_name")
|
||||
self.container:add_container("button")
|
||||
self.container:add_container("E_Anchor")
|
||||
end
|
||||
|
||||
|
||||
|
@@ -57,10 +57,27 @@ nodes {
|
||||
}
|
||||
nodes {
|
||||
position {
|
||||
x: 40.0
|
||||
x: 200.0
|
||||
}
|
||||
size {
|
||||
x: 190.0
|
||||
x: 200.0
|
||||
y: 40.0
|
||||
}
|
||||
type: TYPE_BOX
|
||||
id: "E_Anchor"
|
||||
pivot: PIVOT_E
|
||||
adjust_mode: ADJUST_MODE_STRETCH
|
||||
parent: "root"
|
||||
inherit_alpha: true
|
||||
size_mode: SIZE_MODE_AUTO
|
||||
visible: false
|
||||
}
|
||||
nodes {
|
||||
position {
|
||||
x: -133.0
|
||||
}
|
||||
size {
|
||||
x: 134.0
|
||||
y: 40.0
|
||||
}
|
||||
color {
|
||||
@@ -71,12 +88,12 @@ nodes {
|
||||
type: TYPE_BOX
|
||||
texture: "druid/empty"
|
||||
id: "slider"
|
||||
parent: "root"
|
||||
parent: "E_Anchor"
|
||||
inherit_alpha: true
|
||||
}
|
||||
nodes {
|
||||
size {
|
||||
x: 166.0
|
||||
x: 134.0
|
||||
y: 8.0
|
||||
}
|
||||
color {
|
||||
@@ -98,7 +115,7 @@ nodes {
|
||||
}
|
||||
nodes {
|
||||
position {
|
||||
x: -83.0
|
||||
x: -55.0
|
||||
}
|
||||
size {
|
||||
x: 24.0
|
||||
@@ -122,9 +139,6 @@ nodes {
|
||||
}
|
||||
}
|
||||
nodes {
|
||||
position {
|
||||
x: 200.0
|
||||
}
|
||||
size {
|
||||
x: 60.0
|
||||
y: 40.0
|
||||
@@ -138,7 +152,7 @@ nodes {
|
||||
texture: "druid/rect_round2_width1"
|
||||
id: "button"
|
||||
pivot: PIVOT_E
|
||||
parent: "root"
|
||||
parent: "E_Anchor"
|
||||
inherit_alpha: true
|
||||
slice9 {
|
||||
x: 4.0
|
||||
|
@@ -20,7 +20,7 @@ function M:init(template, nodes)
|
||||
|
||||
self.text_name = self.druid:new_lang_text("text_name") --[[@as druid.lang_text]]
|
||||
self.text_value = self.druid:new_text("text_value")
|
||||
self.slider = self.druid:new_slider("slider_pin", vmath.vector3(183, 0, 0), self._on_slider_change_by_user) --[[@as druid.slider]]
|
||||
self.slider = self.druid:new_slider("slider_pin", vmath.vector3(55, 0, 0), self._on_slider_change_by_user) --[[@as druid.slider]]
|
||||
self.slider:set_input_node("slider")
|
||||
|
||||
self:set_text_function(function(value)
|
||||
@@ -29,8 +29,7 @@ function M:init(template, nodes)
|
||||
|
||||
self.container = self.druid:new_container(self.root)
|
||||
self.container:add_container("text_name")
|
||||
self.container:add_container("slider")
|
||||
self.container:add_container("button")
|
||||
self.container:add_container("E_Anchor")
|
||||
end
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user