From 17f7748b451d40052c96dc86536296ea6964422a Mon Sep 17 00:00:00 2001 From: devZoGok Date: Sat, 18 May 2024 20:20:18 +0300 Subject: [PATCH] corrected Z coordinates in the tech tree --- Assets/Scripts/Gui/techTree.lua | 21 ++++++++++----------- researchButton.cpp | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Assets/Scripts/Gui/techTree.lua b/Assets/Scripts/Gui/techTree.lua index 8c75fdd..a579f5d 100644 --- a/Assets/Scripts/Gui/techTree.lua +++ b/Assets/Scripts/Gui/techTree.lua @@ -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', diff --git a/researchButton.cpp b/researchButton.cpp index 4dffae2..2fcd966 100644 --- a/researchButton.cpp +++ b/researchButton.cpp @@ -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); }