corrected Z coordinates in the tech tree

This commit is contained in:
devZoGok
2024-05-18 20:20:18 +03:00
parent a6c3e3df1c
commit 17f7748b45
2 changed files with 11 additions and 12 deletions
+10 -11
View File
@@ -1,7 +1,7 @@
res = graphics.resolution
Size = {x = res.x * .5, y = res.y * .5}
techButtonSize = {x = 50, y = 50}
Pos = {x = res.x * .3, y = res.y * .1, z = 0}
Pos = {x = res.x * .3, y = res.y * .1, z = .1}
margin = {top = 10, left = 10, right = 10, bottom = 10}
baseTechPath = 'Icons/Technologies/'
heightOffset = techButtonSize.y + 10
@@ -10,12 +10,11 @@ gui = {
{
guiType = GuiType.GUI_RECTANGLE,
pos = Pos,
zIndex = .9,
size = Size,
color = {x = 0, y = 0, z = 0, w = .6}
},
{
pos = {x = Pos.x + .5 * (Size.x - techButtonSize.x), y = Pos.y + margin.top, z = 0},
pos = {x = Pos.x + .5 * (Size.x - techButtonSize.x), y = Pos.y + margin.top, z = .11},
size = techButtonSize,
name = "Research",
imagePath = baseTechPath .. 'apt.jpg',
@@ -25,7 +24,7 @@ gui = {
trigger = 82,
},
{
pos = {x = Pos.x + margin.left, y = Pos.y + margin.top + heightOffset, z = 0},
pos = {x = Pos.x + margin.left, y = Pos.y + margin.top + heightOffset, z = .11},
size = techButtonSize,
name = "Research",
imagePath = baseTechPath .. 'fpt.jpg',
@@ -35,7 +34,7 @@ gui = {
trigger = 82,
},
{
pos = {x = Pos.x + margin.left, y = Pos.y + margin.top + 2 * heightOffset, z = 0},
pos = {x = Pos.x + margin.left, y = Pos.y + margin.top + 2 * heightOffset, z = .11},
size = techButtonSize,
name = "Research",
imagePath = baseTechPath .. 'cruisers.jpg',
@@ -45,7 +44,7 @@ gui = {
trigger = 82,
},
{
pos = {x = Pos.x + .5 * (Size.x - techButtonSize.x), y = Pos.y + margin.top + heightOffset, z = 0},
pos = {x = Pos.x + .5 * (Size.x - techButtonSize.x), y = Pos.y + margin.top + heightOffset, z = .11},
size = techButtonSize,
name = "Research",
imagePath = baseTechPath .. 'ept.jpg',
@@ -55,7 +54,7 @@ gui = {
trigger = 82,
},
{
pos = {x = Pos.x + .5 * (Size.x - 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset, z = 0},
pos = {x = Pos.x + .5 * (Size.x - 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset, z = .11},
size = techButtonSize,
name = "Research",
imagePath = baseTechPath .. 'stealth.jpg',
@@ -65,7 +64,7 @@ gui = {
trigger = 82,
},
{
pos = {x = Pos.x + .5 * (Size.x + 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset, z = 0},
pos = {x = Pos.x + .5 * (Size.x + 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset, z = .11},
size = techButtonSize,
name = "Research",
imagePath = baseTechPath .. 'robo.jpg',
@@ -75,7 +74,7 @@ gui = {
trigger = 82,
},
{
pos = {x = Pos.x + Size.x - (margin.right + techButtonSize.x), y = Pos.y + margin.top + heightOffset, z = 0},
pos = {x = Pos.x + Size.x - (margin.right + techButtonSize.x), y = Pos.y + margin.top + heightOffset, z = .11},
size = techButtonSize,
name = "Research",
imagePath = baseTechPath .. 'pct.jpg',
@@ -85,7 +84,7 @@ gui = {
trigger = 82,
},
{
pos = {x = Pos.x + Size.x - (margin.right + 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset, z = 0},
pos = {x = Pos.x + Size.x - (margin.right + 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset, z = .11},
size = techButtonSize,
name = "Research",
imagePath = baseTechPath .. 'carriers.jpg',
@@ -95,7 +94,7 @@ gui = {
trigger = 82,
},
{
pos = {x = Pos.x + Size.x - (margin.right + techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset, z = 0},
pos = {x = Pos.x + Size.x - (margin.right + techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset, z = .11},
size = techButtonSize,
name = "Research",
imagePath = baseTechPath .. 'tanks.jpg',
+1 -1
View File
@@ -28,7 +28,7 @@ namespace battleship{
Quad *quad = new Quad(Vector3(size.x, size.y, 1), false);
quad->setMaterial(mat);
overlay = new Node(Vector3(pos.x, pos.y, -.8));
overlay = new Node(Vector3(pos.x, pos.y, .12));
overlay->attachMesh(quad);
root->getGuiNode()->attachChild(overlay);
}