Update layout component, add layout fit example

This commit is contained in:
Insality
2022-09-09 20:45:08 +03:00
parent 25a17773e7
commit ba383261b0
10 changed files with 1472 additions and 76 deletions

View File

@@ -70,7 +70,7 @@ nodes {
}
nodes {
position {
x: -100.0
x: 0.0
y: 250.0
z: 0.0
w: 1.0
@@ -190,7 +190,7 @@ nodes {
}
nodes {
position {
x: -100.0
x: 0.0
y: 100.0
z: 0.0
w: 1.0
@@ -310,7 +310,7 @@ nodes {
}
nodes {
position {
x: -100.0
x: 0.0
y: -50.0
z: 0.0
w: 1.0
@@ -430,7 +430,7 @@ nodes {
}
nodes {
position {
x: -100.0
x: 0.0
y: -200.0
z: 0.0
w: 1.0
@@ -637,7 +637,7 @@ nodes {
}
type: TYPE_TEXT
blend_mode: BLEND_MODE_ALPHA
text: "Layout Stretch by Y Anchor W"
text: "Layout Stretch by X Anchor W"
font: "game"
id: "text_layout_stretch3"
xanchor: XANCHOR_NONE

View File

@@ -9,7 +9,7 @@ function init(self)
self.druid:new_layout("node_layout_stretch", const_druid.LAYOUT_MODE.STRETCH)
self.druid:new_layout("node_layout_stretch_x", const_druid.LAYOUT_MODE.STRETCH_X)
self.druid:new_layout("node_layout_stretch_y", const_druid.LAYOUT_MODE.STRETCH_Y)
self.druid:new_layout("node_layout_stretch_y_anchor_w", const_druid.LAYOUT_MODE.STRETCH_Y)
self.druid:new_layout("node_layout_stretch_y_anchor_w", const_druid.LAYOUT_MODE.STRETCH_X)
end