mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
using 3D positions for GUI elements
This commit is contained in:
@@ -12,9 +12,8 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
name = 'refineds',
|
||||
text = '',
|
||||
pos = {x = 100, y = 100},
|
||||
zIndex = 0,
|
||||
scale = 1,
|
||||
pos = {x = 100, y = 100, z = 0},
|
||||
scale = {x = 1, y = 1},
|
||||
font = 'batang.ttf',
|
||||
fontFirstChar = 0,
|
||||
fontLastChar = 256,
|
||||
@@ -24,21 +23,19 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
name = 'wealth',
|
||||
text = '',
|
||||
pos = {x = 100, y = 200},
|
||||
zIndex = 0,
|
||||
scale = 1,
|
||||
pos = {x = 100, y = 200, z = 0},
|
||||
scale = {x = 1, y = 1},
|
||||
font = 'batang.ttf',
|
||||
fontFirstChar = 0,
|
||||
fontLastChar = 256,
|
||||
color = {x = 1, y = 1, z = 1, w = 1}
|
||||
color = {x = 1, y = 0, z = 1, w = 1}
|
||||
},
|
||||
{
|
||||
guiType = GuiType.TEXT,
|
||||
name = 'research',
|
||||
text = '',
|
||||
pos = {x = 100, y = 300},
|
||||
zIndex = 0,
|
||||
scale = 1,
|
||||
pos = {x = 100, y = 300, z = 0},
|
||||
scale = {x = 1, y = 1},
|
||||
font = 'batang.ttf',
|
||||
fontFirstChar = 0,
|
||||
fontLastChar = 256,
|
||||
@@ -46,22 +43,19 @@ gui = {
|
||||
},
|
||||
{
|
||||
guiType = GuiType.GUI_RECTANGLE,
|
||||
pos = {x = 0, y = 0},
|
||||
zIndex = .9,
|
||||
pos = {x = 0, y = 0, z = 0},
|
||||
size = {x = s, y = s},
|
||||
imagePath = resIconBasePath .. 'refineds.jpg',
|
||||
imagePath = resIconBasePath .. 'refineds.png',
|
||||
},
|
||||
{
|
||||
guiType = GuiType.GUI_RECTANGLE,
|
||||
pos = {x = 0, y = 100},
|
||||
zIndex = .9,
|
||||
pos = {x = 0, y = 100, z = 0},
|
||||
size = {x = s, y = s},
|
||||
imagePath = resIconBasePath .. 'wealth.jpg',
|
||||
},
|
||||
{
|
||||
guiType = GuiType.GUI_RECTANGLE,
|
||||
pos = {x = 0, y = 200},
|
||||
zIndex = .9,
|
||||
pos = {x = 0, y = 200, z = 0},
|
||||
size = {x = s, y = s},
|
||||
imagePath = resIconBasePath .. 'research.jpg',
|
||||
},
|
||||
@@ -69,9 +63,8 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
name = 'depth',
|
||||
text = '',
|
||||
pos = {x = 0, y = 400},
|
||||
zIndex = 0,
|
||||
scale = 1,
|
||||
pos = {x = 0, y = 400, z = 0},
|
||||
scale = {x = 1, y = 1},
|
||||
font = 'batang.ttf',
|
||||
fontFirstChar = 0,
|
||||
fontLastChar = 256,
|
||||
@@ -82,29 +75,26 @@ gui = {
|
||||
buttonType = ButtonType.PLAYER_TRADE,
|
||||
name = 'Trade',
|
||||
guiScreen = 'tradingHub.lua',
|
||||
pos = {x = res.x - Size.x, y = 200},
|
||||
pos = {x = res.x - Size.x, y = 200, z = 0},
|
||||
size = Size,
|
||||
trigger = 10
|
||||
},
|
||||
{
|
||||
guiType = GuiType.GUI_RECTANGLE,
|
||||
pos = {x = res.x - sz, y = res.y - sz},
|
||||
zIndex = .9,
|
||||
pos = {x = res.x - sz, y = res.y - sz, z = 0},
|
||||
size = {x = sz, y = sz},
|
||||
color = {x = .6, y = .6, z = .6, w = .6}
|
||||
color = {x = .6, y = .6, z = .6, w = .4}
|
||||
},
|
||||
{
|
||||
guiType = GuiType.GUI_RECTANGLE,
|
||||
pos = {x = 0, y = res.y - sz},
|
||||
zIndex = .9,
|
||||
pos = {x = 0, y = res.y - sz, z = 0},
|
||||
size = {x = sz, y = sz},
|
||||
color = {x = .6, y = .6, z = .6, w = .6}
|
||||
color = {x = .6, y = .6, z = .6, w = .4}
|
||||
},
|
||||
{
|
||||
guiType = GuiType.GUI_RECTANGLE,
|
||||
pos = {x = sz, y = res.y - .75 * sz},
|
||||
zIndex = .9,
|
||||
pos = {x = sz, y = res.y - .75 * sz, z = 0},
|
||||
size = {x = res.x - 2 * sz, y = sz * .75},
|
||||
color = {x = .6, y = .6, z = .6, w = .6}
|
||||
color = {x = .6, y = .6, z = .6, w = .4}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
numGui = 5
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 110, y = 90},
|
||||
pos = {x = 110, y = 90, z = 0},
|
||||
size = {x = 100, y = 10},
|
||||
guiType = GuiType.TEXTBOX,
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 40},
|
||||
pos = {x = 110, y = 40, z = 0},
|
||||
size = {x = 100, y = 10},
|
||||
guiType = GuiType.SLIDER,
|
||||
minValue = 0,
|
||||
@@ -17,21 +17,21 @@ gui = {
|
||||
}
|
||||
},
|
||||
{
|
||||
pos = {x = 100, y = 400},
|
||||
pos = {x = 100, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Ok',
|
||||
buttonType = ButtonType.OK
|
||||
},
|
||||
{
|
||||
pos = {x = 260, y = 400},
|
||||
pos = {x = 260, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Restore defaults',
|
||||
buttonType = ButtonType.DEFAULTS
|
||||
},
|
||||
{
|
||||
pos = {x = 420, y = 400},
|
||||
pos = {x = 420, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Back',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
numGui = 3
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 100, y = 100},
|
||||
pos = {x = 100, y = 100, z = 0},
|
||||
size = {x = 300, y = 20},
|
||||
guiType = GuiType.LISTBOX,
|
||||
listboxType = ListboxType.CONSOLE,
|
||||
@@ -9,12 +9,12 @@ gui = {
|
||||
closable = false
|
||||
},
|
||||
{
|
||||
pos = {x = 100, y = 510},
|
||||
pos = {x = 100, y = 510, z = 0},
|
||||
size = {x = 270, y = 20},
|
||||
guiType = GuiType.TEXTBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 380, y = 510},
|
||||
pos = {x = 380, y = 510, z = 0},
|
||||
size = {x = 20, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.CONSOLE_COMMAND_OK,
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
numGui = 4
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 110, y = 190},
|
||||
pos = {x = 110, y = 190, z = 0},
|
||||
size = {x = 360, y = 20},
|
||||
guiType = GuiType.LISTBOX,
|
||||
listboxType = ListboxType.CONTROLS,
|
||||
numMaxDisplay = 5
|
||||
},
|
||||
{
|
||||
pos = {x = 100, y = 400},
|
||||
pos = {x = 100, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Ok',
|
||||
buttonType = ButtonType.OK
|
||||
},
|
||||
{
|
||||
pos = {x = 260, y = 400},
|
||||
pos = {x = 260, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Restore defaults',
|
||||
buttonType = ButtonType.DEFAULTS
|
||||
},
|
||||
{
|
||||
pos = {x = 420, y = 400},
|
||||
pos = {x = 420, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Back',
|
||||
|
||||
@@ -5,8 +5,7 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
text = 'Defeat',
|
||||
name = 'D',
|
||||
pos = {x = 100, y = 100},
|
||||
zIndex = 0,
|
||||
pos = {x = 100, y = 100, z = 0},
|
||||
scale = 1,
|
||||
font = 'batang.ttf',
|
||||
fontFirstChar = 0,
|
||||
@@ -15,13 +14,12 @@ gui = {
|
||||
},
|
||||
{
|
||||
guiType = GuiType.GUI_RECTANGLE,
|
||||
pos = {x = 100, y = 200},
|
||||
zIndex = 1,
|
||||
pos = {x = 100, y = 200, z = .1},
|
||||
size = {x = 600, y = 600},
|
||||
color = {x = 0, y = 0, z = 0, w = 0.1}
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 350},
|
||||
pos = {x = 110, y = 350, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Leave',
|
||||
|
||||
@@ -5,42 +5,42 @@ sz = {x = Size.x - margin, y = Size.y - margin}
|
||||
|
||||
gui = {
|
||||
{
|
||||
pos = {x = res.x - 3 * Size.x, y = res.y - 3 * Size.y},
|
||||
pos = {x = res.x - 3 * Size.x, y = res.y - 3 * Size.y, z = 0},
|
||||
size = sz,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.BUILD,
|
||||
trigger = 76,
|
||||
},
|
||||
{
|
||||
pos = {x = res.x - 2 * Size.x, y = res.y - 3 * Size.y},
|
||||
pos = {x = res.x - 2 * Size.x, y = res.y - 3 * Size.y, z = 0},
|
||||
size = sz,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.BUILD,
|
||||
trigger = 78,
|
||||
},
|
||||
{
|
||||
pos = {x = res.x - 1 * Size.x, y = res.y - 3 * Size.y},
|
||||
pos = {x = res.x - 1 * Size.x, y = res.y - 3 * Size.y, z = 0},
|
||||
size = sz,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.BUILD,
|
||||
trigger = 77,
|
||||
},
|
||||
{
|
||||
pos = {x = res.x - 3 * Size.x, y = res.y - 2 * Size.y},
|
||||
pos = {x = res.x - 3 * Size.x, y = res.y - 2 * Size.y, z = 0},
|
||||
size = sz,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.BUILD,
|
||||
trigger = 84,
|
||||
},
|
||||
{
|
||||
pos = {x = res.x - 2 * Size.x, y = res.y - 2 * Size.y},
|
||||
pos = {x = res.x - 2 * Size.x, y = res.y - 2 * Size.y, z = 0},
|
||||
size = sz,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.BUILD,
|
||||
trigger = 68,
|
||||
},
|
||||
{
|
||||
pos = {x = res.x - 1 * Size.x, y = res.y - 2 * Size.y},
|
||||
pos = {x = res.x - 1 * Size.x, y = res.y - 2 * Size.y, z = 0},
|
||||
size = sz,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.BUILD,
|
||||
|
||||
@@ -5,7 +5,7 @@ sz = {x = Size.x - margin, y = Size.y - margin}
|
||||
|
||||
gui = {
|
||||
{
|
||||
pos = {x = res.x - Size.x + .5 * margin, y = res.y - Size.y + .5 * margin},
|
||||
pos = {x = res.x - Size.x + .5 * margin, y = res.y - Size.y + .5 * margin, z = 0},
|
||||
size = sz,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.FORT_TRAIN,
|
||||
|
||||
@@ -2,35 +2,35 @@ Size = {x = 150, y = 50}
|
||||
numGui = 5
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 100, y = 100},
|
||||
pos = {x = 100, y = 100, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.RESUME,
|
||||
name = 'Resume'
|
||||
},
|
||||
{
|
||||
pos = {x = 100, y = 100 + 1 * (Size.y + 10)},
|
||||
pos = {x = 100, y = 100 + 1 * (Size.y + 10), z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.CONSOLE,
|
||||
name = 'Console'
|
||||
},
|
||||
{
|
||||
pos = {x = 100, y = 100 + 2 * (Size.y + 10)},
|
||||
pos = {x = 100, y = 100 + 2 * (Size.y + 10), z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.OPTIONS,
|
||||
name = 'Options'
|
||||
},
|
||||
{
|
||||
pos = {x = 100, y = 100 + 3 * (Size.y + 10)},
|
||||
pos = {x = 100, y = 100 + 3 * (Size.y + 10), z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.MAIN_MENU,
|
||||
name = 'Main menu'
|
||||
},
|
||||
{
|
||||
pos = {x = 100, y = 100 + 4 * (Size.y + 10)},
|
||||
pos = {x = 100, y = 100 + 4 * (Size.y + 10), z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.EXIT,
|
||||
|
||||
@@ -3,42 +3,42 @@ Size = {x = 150, y = 40}
|
||||
numGui = 6
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 110, y = 40},
|
||||
pos = {x = 110, y = 40}, z = 0,
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Controls',
|
||||
buttonType = ButtonType.CONTROLS_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 270, y = 40},
|
||||
pos = {x = 270, y = 40}, z = 0,
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Mouse',
|
||||
buttonType = ButtonType.MOUSE_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 430, y = 40},
|
||||
pos = {x = 430, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Video',
|
||||
buttonType = ButtonType.VIDEO_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 590, y = 40},
|
||||
pos = {x = 590, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Audio',
|
||||
buttonType = ButtonType.AUDIO_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 750, y = 40},
|
||||
pos = {x = 750, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Multiplayer',
|
||||
buttonType = ButtonType.MULTIPLAYER_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 910, y = 100},
|
||||
pos = {x = 910, y = 100, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Back',
|
||||
|
||||
@@ -5,21 +5,21 @@ sz = {x = Size.x - margin, y = Size.y - margin}
|
||||
|
||||
gui = {
|
||||
{
|
||||
pos = {x = res.x + .5 * margin - Size.x, y = res.y - 3 * Size.y},
|
||||
pos = {x = res.x + .5 * margin - Size.x, y = res.y - 3 * Size.y, z = 0},
|
||||
size = sz,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.LAND_FACTORY_TRAIN,
|
||||
trigger = 87
|
||||
},
|
||||
{
|
||||
pos = {x = res.x + .5 * margin - 2 * Size.x, y = res.y - 3 * Size.y},
|
||||
pos = {x = res.x + .5 * margin - 2 * Size.x, y = res.y - 3 * Size.y, z = 0},
|
||||
size = sz,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.LAND_FACTORY_TRAIN,
|
||||
trigger = 84
|
||||
},
|
||||
{
|
||||
pos = {x = res.x + .5 * margin - 3 * Size.x, y = res.y - 3 * Size.y},
|
||||
pos = {x = res.x + .5 * margin - 3 * Size.x, y = res.y - 3 * Size.y, z = 0},
|
||||
size = sz,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.LAND_FACTORY_TRAIN,
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
numGui = 3
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 110, y = 190},
|
||||
pos = {x = 110, y = 190, z = 0},
|
||||
size = {x = 360, y = 20},
|
||||
guiType = GuiType.LISTBOX,
|
||||
listboxType = ListboxType.MAPS,
|
||||
numMaxDisplay = 5
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 250},
|
||||
pos = {x = 110, y = 250, z = 0},
|
||||
size = {x = 140, y = 40},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Ok',
|
||||
@@ -19,7 +19,7 @@ gui = {
|
||||
}
|
||||
},
|
||||
{
|
||||
pos = {x = 420, y = 400},
|
||||
pos = {x = 420, y = 400, z = 0},
|
||||
size = {x = 150, y = 50},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Back',
|
||||
|
||||
@@ -3,28 +3,28 @@ Size = {x = 150, y = 40}
|
||||
numGui = 4
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 110, y = 40},
|
||||
pos = {x = 110, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Single player',
|
||||
buttonType = ButtonType.SINGLE_PLAYER
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 90},
|
||||
pos = {x = 110, y = 90, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Map editor',
|
||||
buttonType = ButtonType.MAP_EDITOR
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 140},
|
||||
pos = {x = 110, y = 140, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Options',
|
||||
buttonType = ButtonType.OPTIONS
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 190},
|
||||
pos = {x = 110, y = 190, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Exit',
|
||||
|
||||
@@ -3,42 +3,42 @@ Size = {x = 150, y = 40}
|
||||
numGui = 6
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 110, y = 40},
|
||||
pos = {x = 110, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Controls',
|
||||
buttonType = ButtonType.CONTROLS_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 270, y = 40},
|
||||
pos = {x = 270, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Mouse',
|
||||
buttonType = ButtonType.MOUSE_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 430, y = 40},
|
||||
pos = {x = 430, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Video',
|
||||
buttonType = ButtonType.VIDEO_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 590, y = 40},
|
||||
pos = {x = 590, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Audio',
|
||||
buttonType = ButtonType.AUDIO_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 750, y = 40},
|
||||
pos = {x = 750, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Multiplayer',
|
||||
buttonType = ButtonType.MULTIPLAYER_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 910, y = 100},
|
||||
pos = {x = 910, y = 100, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Back',
|
||||
|
||||
@@ -4,42 +4,42 @@ Size = {x = 140, y = 20}
|
||||
startX = 100
|
||||
gui = {
|
||||
{
|
||||
pos = {x = startX, y = 400},
|
||||
pos = {x = startX, y = 400, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.EXPORT,
|
||||
name = 'Export'
|
||||
},
|
||||
{
|
||||
pos = {x = startX + Size.x + 10, y = 400},
|
||||
pos = {x = startX + Size.x + 10, y = 400, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.LISTBOX,
|
||||
listboxType = ListboxType.VEHICLES,
|
||||
numMaxDisplay = 5
|
||||
},
|
||||
{
|
||||
pos = {x = startX + 2 * (Size.x + 10), y = 400},
|
||||
pos = {x = startX + 2 * (Size.x + 10), y = 400, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.LISTBOX,
|
||||
listboxType = ListboxType.STRUCTURES,
|
||||
numMaxDisplay = 5
|
||||
},
|
||||
{
|
||||
pos = {x = startX + 3 * (Size.x + 10), y = 400},
|
||||
pos = {x = startX + 3 * (Size.x + 10), y = 400, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.LISTBOX,
|
||||
listboxType = ListboxType.RESOURCE_DEPOSITS,
|
||||
numMaxDisplay = 5
|
||||
},
|
||||
{
|
||||
pos = {x = startX + 4 * (Size.x + 10), y = 400},
|
||||
pos = {x = startX + 4 * (Size.x + 10), y = 400, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.LISTBOX,
|
||||
listboxType = ListboxType.SKYBOX_TEXTURES,
|
||||
numMaxDisplay = 5
|
||||
},
|
||||
{
|
||||
pos = {x = startX + 5 * (Size.x + 10), y = 400},
|
||||
pos = {x = startX + 5 * (Size.x + 10), y = 400, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.LISTBOX,
|
||||
listboxType = ListboxType.LAND_TEXTURES,
|
||||
|
||||
@@ -3,21 +3,21 @@ Size = {x = 150, y = 40}
|
||||
numGui = 3
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 110, y = 40},
|
||||
pos = {x = 110, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'New map',
|
||||
buttonType = ButtonType.NEW_MAP
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 90},
|
||||
pos = {x = 110, y = 90, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Load map',
|
||||
buttonType = ButtonType.LOAD_MAP
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 140},
|
||||
pos = {x = 110, y = 140, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Back',
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
numGui = 6
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 110, y = 80},
|
||||
pos = {x = 110, y = 80, z = 0},
|
||||
size = {x = 300, y = 10},
|
||||
guiType = GuiType.TEXTBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 40},
|
||||
pos = {x = 110, y = 40, z = 0},
|
||||
size = {x = 300, y = 10},
|
||||
minValue = 0,
|
||||
maxValue = 2,
|
||||
@@ -17,25 +17,25 @@ gui = {
|
||||
}
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 110},
|
||||
pos = {x = 110, y = 110, z = 0},
|
||||
guiType = GuiType.CHECKBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 100, y = 400},
|
||||
pos = {x = 100, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Ok',
|
||||
buttonType = ButtonType.OK
|
||||
},
|
||||
{
|
||||
pos = {x = 260, y = 400},
|
||||
pos = {x = 260, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Restore defaults',
|
||||
buttonType = ButtonType.DEFAULTS
|
||||
},
|
||||
{
|
||||
pos = {x = 420, y = 400},
|
||||
pos = {x = 420, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Back',
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
numGui = 6
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 110, y = 40},
|
||||
pos = {x = 110, y = 40, z = 0},
|
||||
size = {x = 100, y = 20},
|
||||
guiType = GuiType.TEXTBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 70},
|
||||
pos = {x = 110, y = 70, z = 0},
|
||||
size = {x = 100, y = 20},
|
||||
guiType = GuiType.TEXTBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 100},
|
||||
pos = {x = 110, y = 100, z = 0},
|
||||
size = {x = 100, y = 20},
|
||||
guiType = GuiType.TEXTBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 100, y = 400},
|
||||
pos = {x = 100, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Ok',
|
||||
buttonType = ButtonType.OK
|
||||
},
|
||||
{
|
||||
pos = {x = 260, y = 400},
|
||||
pos = {x = 260, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Restore defaults',
|
||||
buttonType = ButtonType.DEFAULTS
|
||||
},
|
||||
{
|
||||
pos = {x = 420, y = 400},
|
||||
pos = {x = 420, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Back',
|
||||
|
||||
@@ -3,7 +3,7 @@ Size = {x = 70, y = 70}
|
||||
|
||||
gui = {
|
||||
{
|
||||
pos = {x = res.x - Size.x, y = res.y - Size.y},
|
||||
pos = {x = res.x - Size.x, y = res.y - Size.y, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.NAVAL_FACTORY_TRAIN,
|
||||
|
||||
@@ -3,22 +3,22 @@ Size = {x = 140, y = 40}
|
||||
numGui = 5
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 110, y = 150},
|
||||
pos = {x = 110, y = 150, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.TEXTBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 190},
|
||||
pos = {x = 110, y = 190, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.TEXTBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 220},
|
||||
pos = {x = 110, y = 220, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.TEXTBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 420, y = 400},
|
||||
pos = {x = 420, y = 400, z = 0},
|
||||
size = {x = 150, y = 50},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Ok',
|
||||
@@ -31,7 +31,7 @@ gui = {
|
||||
}
|
||||
},
|
||||
{
|
||||
pos = {x = 250, y = 400},
|
||||
pos = {x = 250, y = 400, z = 0},
|
||||
size = {x = 150, y = 50},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Back',
|
||||
|
||||
@@ -3,42 +3,42 @@ Size = {x = 150, y = 40}
|
||||
numGui = 6
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 110, y = 40},
|
||||
pos = {x = 110, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Controls',
|
||||
buttonType = ButtonType.CONTROLS_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 270, y = 40},
|
||||
pos = {x = 270, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Mouse',
|
||||
buttonType = ButtonType.MOUSE_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 430, y = 40},
|
||||
pos = {x = 430, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Video',
|
||||
buttonType = ButtonType.VIDEO_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 590, y = 40},
|
||||
pos = {x = 590, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Audio',
|
||||
buttonType = ButtonType.AUDIO_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 750, y = 40},
|
||||
pos = {x = 750, y = 40, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Multiplayer',
|
||||
buttonType = ButtonType.MULTIPLAYER_TAB
|
||||
},
|
||||
{
|
||||
pos = {x = 910, y = 100},
|
||||
pos = {x = 910, y = 100, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Back',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Pos = {x = 110, y = 150}
|
||||
Pos = {x = 110, y = 150, z = 0}
|
||||
Size = {x = 100, y = 20}
|
||||
space = 60
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ gui = {
|
||||
buttonType = ButtonType.ACTIVE_GAME_STATE,
|
||||
name = 'Tech',
|
||||
guiScreen = 'techTree.lua',
|
||||
pos = {x = res.x - 2 * Size.x, y = res.y - Size.y},
|
||||
pos = {x = res.x - 2 * Size.x, y = res.y - Size.y, z = 0},
|
||||
size = sz,
|
||||
trigger = 85
|
||||
},
|
||||
|
||||
@@ -3,35 +3,35 @@ Size = {x = 100, y = 20}
|
||||
numGui = 6
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 100, y = 100},
|
||||
pos = {x = 100, y = 100, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.LISTBOX,
|
||||
numMaxDisplay = 3,
|
||||
listboxType = ListboxType.CPU_DIFFICULTIES
|
||||
},
|
||||
{
|
||||
pos = {x = 210, y = 100},
|
||||
pos = {x = 210, y = 100, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.LISTBOX,
|
||||
numMaxDisplay = 3,
|
||||
listboxType = ListboxType.FACTIONS
|
||||
},
|
||||
{
|
||||
pos = {x = 100, y = 230},
|
||||
pos = {x = 100, y = 230, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.LISTBOX,
|
||||
numMaxDisplay = 3,
|
||||
listboxType = ListboxType.FACTIONS
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 310},
|
||||
pos = {x = 110, y = 310, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.LISTBOX,
|
||||
listboxType = ListboxType.MAPS,
|
||||
numMaxDisplay = 5
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 460},
|
||||
pos = {x = 110, y = 460, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.PLAY,
|
||||
@@ -45,7 +45,7 @@ gui = {
|
||||
}
|
||||
},
|
||||
{
|
||||
pos = {x = 110 + Size.x + 10, y = 460},
|
||||
pos = {x = 110 + Size.x + 10, y = 460, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.BACK,
|
||||
|
||||
@@ -3,7 +3,7 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
text = 'Statistics',
|
||||
name = 'stat',
|
||||
pos = {x = 850, y = 100},
|
||||
pos = {x = 850, y = 100, z = 0},
|
||||
zIndex = 0,
|
||||
scale = 0.5,
|
||||
font = 'batang.ttf',
|
||||
@@ -15,7 +15,7 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
text = 'Player',
|
||||
name = 'pl',
|
||||
pos = {x = 50, y = 200},
|
||||
pos = {x = 50, y = 200, z = 0},
|
||||
zIndex = 0,
|
||||
scale = 0.3,
|
||||
font = 'batang.ttf',
|
||||
@@ -27,7 +27,7 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
text = 'Vehicles built',
|
||||
name = 'vb',
|
||||
pos = {x = 150, y = 200},
|
||||
pos = {x = 150, y = 200, z = 0},
|
||||
zIndex = 0,
|
||||
scale = 0.3,
|
||||
font = 'batang.ttf',
|
||||
@@ -39,7 +39,7 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
text = 'Vehicles destroyed',
|
||||
name = 'vd',
|
||||
pos = {x = 450, y = 200},
|
||||
pos = {x = 450, y = 200, z = 0},
|
||||
zIndex = 0,
|
||||
scale = 0.3,
|
||||
font = 'batang.ttf',
|
||||
@@ -51,7 +51,7 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
text = 'Vehicles lost',
|
||||
name = 'vl',
|
||||
pos = {x = 850, y = 200},
|
||||
pos = {x = 850, y = 200, z = 0},
|
||||
zIndex = 0,
|
||||
scale = 0.3,
|
||||
font = 'batang.ttf',
|
||||
@@ -63,7 +63,7 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
text = 'Structures built',
|
||||
name = 'sb',
|
||||
pos = {x = 1050, y = 200},
|
||||
pos = {x = 1050, y = 200, z = 0},
|
||||
zIndex = 0,
|
||||
scale = 0.3,
|
||||
font = 'batang.ttf',
|
||||
@@ -75,7 +75,7 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
text = 'Structures destroyed',
|
||||
name = 'sd',
|
||||
pos = {x = 1350, y = 200},
|
||||
pos = {x = 1350, y = 200, z = 0},
|
||||
zIndex = 0,
|
||||
scale = 0.3,
|
||||
font = 'batang.ttf',
|
||||
@@ -87,7 +87,7 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
text = 'Structures lost',
|
||||
name = 'sl',
|
||||
pos = {x = 1720, y = 200},
|
||||
pos = {x = 1720, y = 200, z = 0},
|
||||
zIndex = 0,
|
||||
scale = 0.3,
|
||||
font = 'batang.ttf',
|
||||
@@ -97,13 +97,13 @@ gui = {
|
||||
},
|
||||
{
|
||||
guiType = GuiType.GUI_RECTANGLE,
|
||||
pos = {x = 100, y = 200},
|
||||
pos = {x = 100, y = 200, z = 0},
|
||||
zIndex = 1,
|
||||
size = {x = 600, y = 600},
|
||||
color = {x = 0, y = 0, z = 1, w = 1}
|
||||
},
|
||||
{
|
||||
pos = {x = 1700, y = 1000},
|
||||
pos = {x = 1700, y = 1000, z = 0},
|
||||
size = Size,
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Back',
|
||||
|
||||
@@ -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}
|
||||
Pos = {x = res.x * .3, y = res.y * .1, z = 0}
|
||||
margin = {top = 10, left = 10, right = 10, bottom = 10}
|
||||
baseTechPath = 'Icons/Technologies/'
|
||||
heightOffset = techButtonSize.y + 10
|
||||
@@ -15,7 +15,7 @@ gui = {
|
||||
color = {x = 0, y = 0, z = 0, w = .6}
|
||||
},
|
||||
{
|
||||
pos = {x = Pos.x + .5 * (Size.x - techButtonSize.x), y = Pos.y + margin.top},
|
||||
pos = {x = Pos.x + .5 * (Size.x - techButtonSize.x), y = Pos.y + margin.top, z = 0},
|
||||
size = techButtonSize,
|
||||
name = "Research",
|
||||
imagePath = baseTechPath .. 'apt.jpg',
|
||||
@@ -25,7 +25,7 @@ gui = {
|
||||
trigger = 82,
|
||||
},
|
||||
{
|
||||
pos = {x = Pos.x + margin.left, y = Pos.y + margin.top + heightOffset},
|
||||
pos = {x = Pos.x + margin.left, y = Pos.y + margin.top + heightOffset, z = 0},
|
||||
size = techButtonSize,
|
||||
name = "Research",
|
||||
imagePath = baseTechPath .. 'fpt.jpg',
|
||||
@@ -35,7 +35,7 @@ gui = {
|
||||
trigger = 82,
|
||||
},
|
||||
{
|
||||
pos = {x = Pos.x + margin.left, y = Pos.y + margin.top + 2 * heightOffset},
|
||||
pos = {x = Pos.x + margin.left, y = Pos.y + margin.top + 2 * heightOffset, z = 0},
|
||||
size = techButtonSize,
|
||||
name = "Research",
|
||||
imagePath = baseTechPath .. 'cruisers.jpg',
|
||||
@@ -45,7 +45,7 @@ gui = {
|
||||
trigger = 82,
|
||||
},
|
||||
{
|
||||
pos = {x = Pos.x + .5 * (Size.x - techButtonSize.x), y = Pos.y + margin.top + heightOffset},
|
||||
pos = {x = Pos.x + .5 * (Size.x - techButtonSize.x), y = Pos.y + margin.top + heightOffset, z = 0},
|
||||
size = techButtonSize,
|
||||
name = "Research",
|
||||
imagePath = baseTechPath .. 'ept.jpg',
|
||||
@@ -55,7 +55,7 @@ gui = {
|
||||
trigger = 82,
|
||||
},
|
||||
{
|
||||
pos = {x = Pos.x + .5 * (Size.x - 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset},
|
||||
pos = {x = Pos.x + .5 * (Size.x - 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset, z = 0},
|
||||
size = techButtonSize,
|
||||
name = "Research",
|
||||
imagePath = baseTechPath .. 'stealth.jpg',
|
||||
@@ -65,7 +65,7 @@ gui = {
|
||||
trigger = 82,
|
||||
},
|
||||
{
|
||||
pos = {x = Pos.x + .5 * (Size.x + 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset},
|
||||
pos = {x = Pos.x + .5 * (Size.x + 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset, z = 0},
|
||||
size = techButtonSize,
|
||||
name = "Research",
|
||||
imagePath = baseTechPath .. 'robo.jpg',
|
||||
@@ -75,7 +75,7 @@ gui = {
|
||||
trigger = 82,
|
||||
},
|
||||
{
|
||||
pos = {x = Pos.x + Size.x - (margin.right + techButtonSize.x), y = Pos.y + margin.top + heightOffset},
|
||||
pos = {x = Pos.x + Size.x - (margin.right + techButtonSize.x), y = Pos.y + margin.top + heightOffset, z = 0},
|
||||
size = techButtonSize,
|
||||
name = "Research",
|
||||
imagePath = baseTechPath .. 'pct.jpg',
|
||||
@@ -85,7 +85,7 @@ gui = {
|
||||
trigger = 82,
|
||||
},
|
||||
{
|
||||
pos = {x = Pos.x + Size.x - (margin.right + 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset},
|
||||
pos = {x = Pos.x + Size.x - (margin.right + 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset, z = 0},
|
||||
size = techButtonSize,
|
||||
name = "Research",
|
||||
imagePath = baseTechPath .. 'carriers.jpg',
|
||||
@@ -95,7 +95,7 @@ gui = {
|
||||
trigger = 82,
|
||||
},
|
||||
{
|
||||
pos = {x = Pos.x + Size.x - (margin.right + techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset},
|
||||
pos = {x = Pos.x + Size.x - (margin.right + techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset, z = 0},
|
||||
size = techButtonSize,
|
||||
name = "Research",
|
||||
imagePath = baseTechPath .. 'tanks.jpg',
|
||||
|
||||
@@ -5,7 +5,7 @@ sz = {x = Size.x - margin, y = Size.y - margin}
|
||||
|
||||
gui = {
|
||||
{
|
||||
pos = {x = res.x - Size.x, y = res.y - Size.y},
|
||||
pos = {x = res.x - Size.x, y = res.y - Size.y, z = 0},
|
||||
size = sz,
|
||||
name = 'Buy ref',
|
||||
guiType = GuiType.BUTTON,
|
||||
@@ -13,7 +13,7 @@ gui = {
|
||||
trigger = 73,
|
||||
},
|
||||
{
|
||||
pos = {x = res.x - 2 * Size.x, y = res.y - Size.y},
|
||||
pos = {x = res.x - 2 * Size.x, y = res.y - Size.y, z = 0},
|
||||
size = sz,
|
||||
name = 'Sell ref',
|
||||
guiType = GuiType.BUTTON,
|
||||
@@ -21,7 +21,7 @@ gui = {
|
||||
trigger = 79,
|
||||
},
|
||||
{
|
||||
pos = {x = res.x - Size.x, y = res.y - 2 * Size.y},
|
||||
pos = {x = res.x - Size.x, y = res.y - 2 * Size.y, z = 0},
|
||||
size = sz,
|
||||
name = 'Buy rsch',
|
||||
guiType = GuiType.BUTTON,
|
||||
@@ -29,7 +29,7 @@ gui = {
|
||||
trigger = 75,
|
||||
},
|
||||
{
|
||||
pos = {x = res.x - 2 * Size.x, y = res.y - 2 * Size.y},
|
||||
pos = {x = res.x - 2 * Size.x, y = res.y - 2 * Size.y, z = 0},
|
||||
size = sz,
|
||||
name = 'Sell rsch',
|
||||
guiType = GuiType.BUTTON,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
res = graphics.resolution
|
||||
Pos = {x = 10, y = 10}
|
||||
Size = {x = res.x * .8, y = res.y * .8}
|
||||
Pos = {x = 10, y = 10, z = .1}
|
||||
Size = {x = res.x * .8, y = res.y * .8 + 40}
|
||||
buttonSize = {x = 100, y = 20}
|
||||
textboxSize = {x = 200, y = 25}
|
||||
margin = {top = 10, left = 10, right = 10, bottom = 10}
|
||||
@@ -9,7 +9,6 @@ gui = {
|
||||
{
|
||||
guiType = GuiType.GUI_RECTANGLE,
|
||||
pos = Pos,
|
||||
zIndex = .9,
|
||||
size = Size,
|
||||
color = {x = 0, y = 0, z = 0, w = .6}
|
||||
},
|
||||
@@ -18,7 +17,7 @@ gui = {
|
||||
buttonType = ButtonType.ACTIVE_GAME_STATE,
|
||||
name = 'Back',
|
||||
guiScreen = 'activeGameState.lua',
|
||||
pos = {x = Pos.x + Size.x - buttonSize.x - margin.right, y = Pos.y + Size.y - buttonSize.y - margin.bottom},
|
||||
pos = {x = Pos.x + Size.x - buttonSize.x - margin.right, y = Pos.y + Size.y - buttonSize.y - margin.bottom, z = .11},
|
||||
size = buttonSize,
|
||||
trigger = 10
|
||||
},
|
||||
|
||||
@@ -14,9 +14,8 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
name = 'playerName',
|
||||
text = '',
|
||||
pos = {x = Pos.x + margin.left, y = height},
|
||||
zIndex = 0,
|
||||
scale = 1,
|
||||
pos = {x = Pos.x + margin.left, y = height, z = .11},
|
||||
scale = {x = .2, y = .2},
|
||||
font = 'batang.ttf',
|
||||
fontFirstChar = 0,
|
||||
fontLastChar = 256,
|
||||
@@ -26,7 +25,6 @@ gui = {
|
||||
{
|
||||
guiType = GuiType.GUI_RECTANGLE,
|
||||
pos = {x = Pos.x + margin.left + 20, y = height},
|
||||
zIndex = .9,
|
||||
size = Size,
|
||||
color = {x = 0, y = 0, z = 0, w = .6}
|
||||
},
|
||||
@@ -44,7 +42,7 @@ gui = {
|
||||
buttonType = ButtonType.TRADING_SCREEN,
|
||||
name = 'Trade',
|
||||
guiScreen = 'tradingScreen.lua',
|
||||
pos = {x = Pos.x + Size.x - buttonSize.x - margin.right, y = height},
|
||||
pos = {x = Pos.x + Size.x - buttonSize.x - margin.right, y = height, z = .11},
|
||||
size = buttonSize,
|
||||
trigger = 10
|
||||
}
|
||||
|
||||
@@ -11,21 +11,21 @@ buttonSize = {x = 100, y = 20}
|
||||
|
||||
ResourceTrayGuiId = {ICON = 0, TEXTBOX = 1, INCREMENT = 2, DECREMENT = 3}
|
||||
IconPath = {WEALTH = 'Icons/Resources/wealth.jpg', RESEARCH = 'Icons/Resources/research.jpg', REFINEDS = 'Icons/Resources/refineds.jpg', TIME = 'Icons/Resources/time.jpg'}
|
||||
|
||||
function createResourceTrayGui(cpuPlayer, lineId, guiId, imgPath)
|
||||
height = margin.top + lineId * iconSize.y
|
||||
|
||||
if guiId == ResourceTrayGuiId.ICON then
|
||||
guiElPos = {x = Pos.x + (cpuPlayer and margin.left or Size.x -(margin.right + 3 * iconSize.x + textboxSize.x)), y = height}
|
||||
guiElPos = {x = Pos.x + (cpuPlayer and margin.left or Size.x -(margin.right + 3 * iconSize.x + textboxSize.x)), y = height, z = .2}
|
||||
|
||||
return {
|
||||
guiType = GuiType.GUI_RECTANGLE,
|
||||
pos = guiElPos,
|
||||
zIndex = .8,
|
||||
size = iconSize,
|
||||
imagePath = imgPath
|
||||
}
|
||||
elseif guiId == ResourceTrayGuiId.TEXTBOX then
|
||||
guiElPos = {x = Pos.x + (cpuPlayer and margin.left + iconSize.x or Size.x -(margin.right + 2 * iconSize.x + textboxSize.x)), y = height}
|
||||
guiElPos = {x = Pos.x + (cpuPlayer and margin.left + iconSize.x or Size.x -(margin.right + 2 * iconSize.x + textboxSize.x)), y = height, z = .2}
|
||||
|
||||
return {
|
||||
pos = guiElPos,
|
||||
@@ -33,7 +33,7 @@ function createResourceTrayGui(cpuPlayer, lineId, guiId, imgPath)
|
||||
guiType = GuiType.TEXTBOX,
|
||||
}
|
||||
elseif guiId == ResourceTrayGuiId.INCREMENT then
|
||||
guiElPos = {x = Pos.x + (cpuPlayer and margin.left + iconSize.x + textboxSize.x or Size.x -(margin.right + 2 * iconSize.x)), y = height}
|
||||
guiElPos = {x = Pos.x + (cpuPlayer and margin.left + iconSize.x + textboxSize.x or Size.x -(margin.right + 2 * iconSize.x)), y = height, z = .2}
|
||||
|
||||
return {
|
||||
guiType = GuiType.BUTTON,
|
||||
@@ -45,7 +45,7 @@ function createResourceTrayGui(cpuPlayer, lineId, guiId, imgPath)
|
||||
trigger = 10
|
||||
}
|
||||
elseif guiId == ResourceTrayGuiId.DECREMENT then
|
||||
guiElPos = {x = Pos.x + (cpuPlayer and margin.left + 2 * iconSize.x + textboxSize.x or Size.x -(margin.right + iconSize.x)), y = height}
|
||||
guiElPos = {x = Pos.x + (cpuPlayer and margin.left + 2 * iconSize.x + textboxSize.x or Size.x -(margin.right + iconSize.x)), y = height, z = .2}
|
||||
|
||||
return {
|
||||
guiType = GuiType.BUTTON,
|
||||
@@ -64,9 +64,8 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
name = 'P0',
|
||||
text = 'P0',
|
||||
pos = {x = Pos.x + margin.left, y = Pos.y + margin.top},
|
||||
zIndex = 0,
|
||||
scale = 1,
|
||||
pos = {x = Pos.x + margin.left, y = Pos.y + margin.top - 20, z = .2},
|
||||
scale = {x = .5, y = .5},
|
||||
font = 'batang.ttf',
|
||||
fontFirstChar = 0,
|
||||
fontLastChar = 256,
|
||||
@@ -76,14 +75,14 @@ gui = {
|
||||
guiType = GuiType.TEXT,
|
||||
name = 'You',
|
||||
text = 'You',
|
||||
pos = {x = Pos.x + margin.left, y = Pos.y + margin.top},
|
||||
zIndex = 0,
|
||||
scale = 1,
|
||||
pos = {x = Pos.x + Size.x -(margin.right + textboxSize.x + iconSize.x + 50), y = Pos.y + margin.top - 20, z = .2},
|
||||
scale = {x = .5, y = .5},
|
||||
font = 'batang.ttf',
|
||||
fontFirstChar = 0,
|
||||
fontLastChar = 256,
|
||||
color = {x = 1, y = 1, z = 1, w = 1}
|
||||
},
|
||||
|
||||
createResourceTrayGui(true, 0, ResourceTrayGuiId.ICON, IconPath.REFINEDS),
|
||||
createResourceTrayGui(true, 0, ResourceTrayGuiId.TEXTBOX),
|
||||
createResourceTrayGui(true, 0, ResourceTrayGuiId.INCREMENT),
|
||||
@@ -116,12 +115,13 @@ gui = {
|
||||
createResourceTrayGui(false, 3, ResourceTrayGuiId.TEXTBOX),
|
||||
createResourceTrayGui(false, 3, ResourceTrayGuiId.INCREMENT),
|
||||
createResourceTrayGui(false, 3, ResourceTrayGuiId.DECREMENT),
|
||||
|
||||
{
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.PLAYER_TRADE,
|
||||
name = 'Back',
|
||||
guiScreen = 'tradingHub.lua',
|
||||
pos = {x = Pos.x + Size.x - 2 * buttonSize.x - margin.right, y = Pos.y + Size.y - buttonSize.y - margin.bottom},
|
||||
pos = {x = Pos.x + Size.x - 2 * buttonSize.x - margin.right, y = Pos.y + Size.y - buttonSize.y - margin.bottom, z = .2},
|
||||
size = buttonSize,
|
||||
trigger = 10
|
||||
},
|
||||
@@ -129,12 +129,12 @@ gui = {
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.TRADE_OFFER,
|
||||
name = 'Offer',
|
||||
pos = {x = Pos.x + Size.x - buttonSize.x - margin.right, y = Pos.y + Size.y - buttonSize.y - margin.bottom},
|
||||
pos = {x = Pos.x + Size.x - buttonSize.x - margin.right, y = Pos.y + Size.y - buttonSize.y - margin.bottom, z = .2},
|
||||
size = buttonSize,
|
||||
trigger = 10
|
||||
},
|
||||
{
|
||||
pos = {x = Pos.x + margin.left, y = Pos.y + Size.y - textboxSize.y - margin.bottom},
|
||||
pos = {x = Pos.x + margin.left, y = Pos.y + Size.y - textboxSize.y - margin.bottom, z = .2},
|
||||
size = textboxSize,
|
||||
guiType = GuiType.TEXTBOX,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
numGui = 9
|
||||
gui = {
|
||||
{
|
||||
pos = {x = 210, y = 190},
|
||||
pos = {x = 210, y = 190, z = 0},
|
||||
size = {x = 360, y = 20},
|
||||
guiType = GuiType.LISTBOX,
|
||||
listboxType = ListboxType.RESOLUTION,
|
||||
@@ -14,41 +14,41 @@ gui = {
|
||||
}
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 40},
|
||||
pos = {x = 110, y = 40, z = 0},
|
||||
guiType = GuiType.CHECKBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 70},
|
||||
pos = {x = 110, y = 70, z = 0},
|
||||
guiType = GuiType.CHECKBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 100},
|
||||
pos = {x = 110, y = 100, z = 0},
|
||||
guiType = GuiType.CHECKBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 130},
|
||||
pos = {x = 110, y = 130, z = 0},
|
||||
guiType = GuiType.CHECKBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 110, y = 160},
|
||||
pos = {x = 110, y = 160, z = 0},
|
||||
guiType = GuiType.CHECKBOX
|
||||
},
|
||||
{
|
||||
pos = {x = 100, y = 400},
|
||||
pos = {x = 100, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Ok',
|
||||
buttonType = ButtonType.OK
|
||||
},
|
||||
{
|
||||
pos = {x = 260, y = 400},
|
||||
pos = {x = 260, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Restore defaults',
|
||||
buttonType = ButtonType.DEFAULTS
|
||||
},
|
||||
{
|
||||
pos = {x = 420, y = 400},
|
||||
pos = {x = 420, y = 400, z = 0},
|
||||
size = {x = 150, y = 20},
|
||||
guiType = GuiType.BUTTON,
|
||||
name = 'Back',
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace battleship{
|
||||
using namespace vb01Gui;
|
||||
using namespace gameBase;
|
||||
|
||||
ActiveStateButton::ActiveStateButton(Vector2 pos, Vector2 size, string gs, string name, int trigger, string imagePath) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, true, imagePath), guiScreen(gs){
|
||||
ActiveStateButton::ActiveStateButton(Vector3 pos, Vector2 size, string gs, string name, int trigger, string imagePath) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, true, imagePath), guiScreen(gs){
|
||||
StateManager *stateManager = GameManager::getSingleton()->getStateManager();
|
||||
ActiveGameState *activeState = (ActiveGameState*)stateManager->getAppStateByType((int)AppStateType::ACTIVE_STATE);
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class ActiveStateButton : public vb01Gui::Button{
|
||||
public:
|
||||
ActiveStateButton(vb01::Vector2, vb01::Vector2, std::string, std::string, int = -1, std::string = "");
|
||||
ActiveStateButton(vb01::Vector3, vb01::Vector2, std::string, std::string, int = -1, std::string = "");
|
||||
void onClick();
|
||||
private:
|
||||
std::string guiScreen = "";
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ namespace battleship{
|
||||
using namespace vb01;
|
||||
using namespace vb01Gui;
|
||||
|
||||
BackButton::BackButton(Vector2 pos, Vector2 size, string name, string screen) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) {
|
||||
BackButton::BackButton(Vector3 pos, Vector2 size, string name, string screen) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) {
|
||||
this->screen = screen;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class BackButton : public vb01Gui::Button{
|
||||
public:
|
||||
BackButton(vb01::Vector2, vb01::Vector2, std::string, std::string);
|
||||
BackButton(vb01::Vector3, vb01::Vector2, std::string, std::string);
|
||||
void onClick();
|
||||
private:
|
||||
std::string screen;
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ namespace battleship{
|
||||
using namespace vb01Gui;
|
||||
using namespace gameBase;
|
||||
|
||||
BuildButton::BuildButton(Vector2 pos, Vector2 size, string name, int trigger, string imagePath, int uid, int slId) :
|
||||
BuildButton::BuildButton(Vector3 pos, Vector2 size, string name, int trigger, string imagePath, int uid, int slId) :
|
||||
UnitButton(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, imagePath, uid), slotId(slId){}
|
||||
|
||||
void BuildButton::onClick(){
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class BuildButton : public UnitButton{
|
||||
public:
|
||||
BuildButton(vb01::Vector2, vb01::Vector2, std::string, int, std::string, int, int);
|
||||
BuildButton(vb01::Vector3, vb01::Vector2, std::string, int, std::string, int, int);
|
||||
void onClick();
|
||||
private:
|
||||
int slotId;
|
||||
|
||||
+12
-9
@@ -54,12 +54,13 @@ namespace battleship{
|
||||
}
|
||||
|
||||
//TODO refactor player difficulty and faction listbox selection
|
||||
//TODO remove hardcoded font path values
|
||||
Button* ConcreteGuiManager::parseButton(int guiId){
|
||||
sol::state_view SOL_LUA_STATE = generateView();
|
||||
sol::table guiTable = SOL_LUA_STATE["gui"][guiId + 1];
|
||||
|
||||
sol::table posTable = guiTable["pos"];
|
||||
Vector2 pos = Vector2(posTable["x"], posTable["y"]);
|
||||
Vector3 pos = Vector3(posTable["x"], posTable["y"], posTable["z"]);
|
||||
|
||||
sol::table sizeTable = guiTable["size"];
|
||||
Vector2 size = Vector2(sizeTable["x"], sizeTable["y"]);
|
||||
@@ -261,7 +262,7 @@ namespace battleship{
|
||||
sol::table guiTable = SOL_LUA_STATE["gui"][guiId + 1];
|
||||
|
||||
string posTable = "pos";
|
||||
Vector2 pos = Vector2(guiTable[posTable]["x"], guiTable[posTable]["y"]);
|
||||
Vector3 pos = Vector3(guiTable[posTable]["x"], guiTable[posTable]["y"], guiTable[posTable]["z"]);
|
||||
|
||||
string sizeTable = "size";
|
||||
Vector2 size = Vector2(guiTable[sizeTable]["x"], guiTable[sizeTable]["y"]);
|
||||
@@ -392,7 +393,7 @@ namespace battleship{
|
||||
sol::table guiTable = SOL_LUA_STATE["gui"][guiId + 1];
|
||||
|
||||
string posTable = "pos";
|
||||
Vector2 pos = Vector2(guiTable[posTable]["x"], guiTable[posTable]["y"]);
|
||||
Vector3 pos = Vector3(guiTable[posTable]["x"], guiTable[posTable]["y"], guiTable[posTable]["z"]);
|
||||
Checkbox *checkbox = new Checkbox(pos, fontBasePath + "batang.ttf");
|
||||
|
||||
int typeArr[2]{(int)GuiElementType::CHECKBOX, -1};
|
||||
@@ -406,7 +407,7 @@ namespace battleship{
|
||||
sol::table guiTable = SOL_LUA_STATE["gui"][guiId + 1];
|
||||
|
||||
string posTable = "pos", sizeTable = "size";
|
||||
Vector2 pos = Vector2(guiTable[posTable]["x"], guiTable[posTable]["y"]);
|
||||
Vector3 pos = Vector3(guiTable[posTable]["x"], guiTable[posTable]["y"], guiTable[posTable]["z"]);
|
||||
Vector2 size = Vector2(guiTable[sizeTable]["x"], guiTable[sizeTable]["y"]);
|
||||
|
||||
Slider *slider = new Slider(pos, size, guiTable["minValue"], guiTable["maxValue"]);
|
||||
@@ -422,7 +423,7 @@ namespace battleship{
|
||||
sol::table guiTable = SOL_LUA_STATE["gui"][guiId + 1];
|
||||
|
||||
string posTable = "pos", sizeTable = "size";
|
||||
Vector2 pos = Vector2(guiTable[posTable]["x"], guiTable[posTable]["y"]);
|
||||
Vector3 pos = Vector3(guiTable[posTable]["x"], guiTable[posTable]["y"], guiTable[posTable]["z"]);
|
||||
Vector2 size = Vector2(guiTable[sizeTable]["x"], guiTable[sizeTable]["y"]);
|
||||
Textbox *textbox = new Textbox(pos, size, fontBasePath + "batang.ttf");
|
||||
|
||||
@@ -438,6 +439,7 @@ namespace battleship{
|
||||
|
||||
Root *root = Root::getSingleton();
|
||||
Material *mat = new Material(root->getLibPath() + "gui");
|
||||
mat->setTransparent(true);
|
||||
|
||||
string ipk = "imagePath";
|
||||
sol::optional<string> pathOpt = guiTable[ipk];
|
||||
@@ -461,7 +463,7 @@ namespace battleship{
|
||||
quad->setMaterial(mat);
|
||||
|
||||
sol::table posTable = guiTable["pos"];
|
||||
Node *guiRectangle = new Node(Vector3(posTable["x"], posTable["y"], guiTable["zIndex"]));
|
||||
Node *guiRectangle = new Node(Vector3(posTable["x"], posTable["y"], posTable["z"]));
|
||||
guiRectangle->attachMesh(quad);
|
||||
root->getGuiNode()->attachChild(guiRectangle);
|
||||
|
||||
@@ -475,6 +477,7 @@ namespace battleship{
|
||||
sol::state_view SOL_LUA_STATE = generateView();
|
||||
sol::table guiTable = SOL_LUA_STATE["gui"][guiId + 1];
|
||||
sol::table posTable = guiTable["pos"];
|
||||
sol::table scaleTable = guiTable["scale"];
|
||||
|
||||
Root *root = Root::getSingleton();
|
||||
|
||||
@@ -484,11 +487,11 @@ namespace battleship{
|
||||
mat->addVec4Uniform("diffuseColor", Vector4(colorTable["x"], colorTable["y"], colorTable["z"], colorTable["w"]));
|
||||
|
||||
Text *text = new Text(fontBasePath + (string)guiTable["font"], (wstring)guiTable["text"], guiTable["fontFirstChar"], guiTable["fontLastChar"]);
|
||||
text->setScale((float)guiTable["scale"]);
|
||||
text->setMaterial(mat);
|
||||
|
||||
Vector3 pos = Vector3(posTable["x"], posTable["y"], guiTable["zIndex"]);
|
||||
Node *node = new Node(pos, Quaternion::QUAT_W, Vector3::VEC_IJK, guiTable["name"]);
|
||||
Vector3 pos = Vector3(posTable["x"], posTable["y"], posTable["z"]);
|
||||
Vector3 scale = Vector3(scaleTable["x"], scaleTable["y"], 1);
|
||||
Node *node = new Node(pos, Quaternion::QUAT_W, scale, guiTable["name"]);
|
||||
node->addText(text);
|
||||
root->getGuiNode()->attachChild(node);
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ namespace battleship{
|
||||
using namespace vb01;
|
||||
using namespace vb01Gui;
|
||||
|
||||
DefaultsButton::DefaultsButton(Vector2 pos, Vector2 size, string name) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) {}
|
||||
DefaultsButton::DefaultsButton(Vector3 pos, Vector2 size, string name) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) {}
|
||||
|
||||
void DefaultsButton::onClick() {}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class DefaultsButton : public vb01Gui::Button{
|
||||
public:
|
||||
DefaultsButton(vb01::Vector2, vb01::Vector2, std::string);
|
||||
DefaultsButton(vb01::Vector3, vb01::Vector2, std::string);
|
||||
void onClick();
|
||||
private:
|
||||
};
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ using namespace std;
|
||||
using namespace vb01;
|
||||
|
||||
namespace battleship{
|
||||
ExitButton::ExitButton(Vector2 pos, Vector2 size) : Button(pos, size, "Exit", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) {}
|
||||
ExitButton::ExitButton(Vector3 pos, Vector2 size) : Button(pos, size, "Exit", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) {}
|
||||
|
||||
void ExitButton::onClick() {
|
||||
//Root::getSingleton()->set
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
namespace battleship {
|
||||
class ExitButton : public vb01Gui::Button {
|
||||
public:
|
||||
ExitButton(vb01::Vector2, vb01::Vector2);
|
||||
ExitButton(vb01::Vector3, vb01::Vector2);
|
||||
void onClick();
|
||||
};
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ namespace battleship{
|
||||
using namespace vb01Gui;
|
||||
using namespace gameBase;
|
||||
|
||||
ExportButton::ExportButton(Vector2 pos, Vector2 size) : Button(pos, size, "Export", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf"){}
|
||||
ExportButton::ExportButton(Vector3 pos, Vector2 size) : Button(pos, size, "Export", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf"){}
|
||||
|
||||
void ExportButton::onClick(){
|
||||
StateManager *sm = GameManager::getSingleton()->getStateManager();
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class ExportButton : public vb01Gui::Button{
|
||||
public:
|
||||
ExportButton(vb01::Vector2 pos, vb01::Vector2 size);
|
||||
ExportButton(vb01::Vector3 pos, vb01::Vector2 size);
|
||||
void onClick();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace battleship{
|
||||
using namespace vb01Gui;
|
||||
using namespace gameBase;
|
||||
|
||||
GameObjectListbox::GameObjectListbox(bool ul, Vector2 pos, Vector2 size, vector<string> lines, int maxDisplay, string fontPath) : Listbox(pos, size, lines, maxDisplay, fontPath), unitListbox(ul) {}
|
||||
GameObjectListbox::GameObjectListbox(bool ul, Vector3 pos, Vector2 size, vector<string> lines, int maxDisplay, string fontPath) : Listbox(pos, size, lines, maxDisplay, fontPath), unitListbox(ul) {}
|
||||
|
||||
void GameObjectListbox::onClose(){
|
||||
GameObjectFrameController *ufCtr = GameObjectFrameController::getSingleton();
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class GameObjectListbox : public vb01Gui::Listbox{
|
||||
public:
|
||||
GameObjectListbox(bool, vb01::Vector2, vb01::Vector2, std::vector<std::string>, int, std::string);
|
||||
GameObjectListbox(bool, vb01::Vector3, vb01::Vector2, std::vector<std::string>, int, std::string);
|
||||
void onClose();
|
||||
private:
|
||||
bool unitListbox;
|
||||
|
||||
+3
-3
@@ -24,19 +24,19 @@ using namespace std;
|
||||
namespace battleship{
|
||||
using namespace configData;
|
||||
|
||||
InGameAppState::ResumeButton::ResumeButton(Vector2 pos, Vector2 size) : Button(pos, size, "Resume", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) {}
|
||||
InGameAppState::ResumeButton::ResumeButton(Vector3 pos, Vector2 size) : Button(pos, size, "Resume", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) {}
|
||||
|
||||
void InGameAppState::ResumeButton::onClick() {
|
||||
Game::getSingleton()->togglePause();
|
||||
}
|
||||
|
||||
InGameAppState::ConsoleButton::ConsoleButton(Vector2 pos, Vector2 size) : Button(pos, size, "Console", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) { }
|
||||
InGameAppState::ConsoleButton::ConsoleButton(Vector3 pos, Vector2 size) : Button(pos, size, "Console", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) { }
|
||||
|
||||
void InGameAppState::ConsoleButton::onClick() {
|
||||
ConcreteGuiManager::getSingleton()->readLuaScreenScript("console.lua");
|
||||
}
|
||||
|
||||
InGameAppState::ConsoleButton::ConsoleButton::ConsoleCommandEntryButton::ConsoleCommandEntryButton(Textbox *t, Listbox *l, Vector2 pos, Vector2 size, string name) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", 257, true) {
|
||||
InGameAppState::ConsoleButton::ConsoleButton::ConsoleCommandEntryButton::ConsoleCommandEntryButton(Textbox *t, Listbox *l, Vector3 pos, Vector2 size, string name) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", 257, true) {
|
||||
textbox = t;
|
||||
listbox = l;
|
||||
}
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ namespace battleship{
|
||||
public:
|
||||
class ResumeButton : public vb01Gui::Button {
|
||||
public:
|
||||
ResumeButton(vb01::Vector2, vb01::Vector2);
|
||||
ResumeButton(vb01::Vector3, vb01::Vector2);
|
||||
void onClick();
|
||||
private:
|
||||
};
|
||||
@@ -27,14 +27,14 @@ namespace battleship{
|
||||
public:
|
||||
class ConsoleCommandEntryButton : public Button {
|
||||
public:
|
||||
ConsoleCommandEntryButton(vb01Gui::Textbox*, vb01Gui::Listbox*, vb01::Vector2, vb01::Vector2, std::string);
|
||||
ConsoleCommandEntryButton(vb01Gui::Textbox*, vb01Gui::Listbox*, vb01::Vector3, vb01::Vector2, std::string);
|
||||
void onClick();
|
||||
private:
|
||||
vb01Gui::Textbox *textbox;
|
||||
vb01Gui::Listbox *listbox;
|
||||
};
|
||||
|
||||
ConsoleButton(vb01::Vector2, vb01::Vector2);
|
||||
ConsoleButton(vb01::Vector3, vb01::Vector2);
|
||||
void onClick();
|
||||
private:
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace battleship{
|
||||
using namespace vb01Gui;
|
||||
using namespace gameBase;
|
||||
|
||||
LandTextureListbox::LandTextureListbox(Vector2 pos, Vector2 size, vector<string> lines, int maxDisplay, std::string fontPath) : Listbox(pos, size, lines, maxDisplay, fontPath){}
|
||||
LandTextureListbox::LandTextureListbox(Vector3 pos, Vector2 size, vector<string> lines, int maxDisplay, std::string fontPath) : Listbox(pos, size, lines, maxDisplay, fontPath){}
|
||||
|
||||
void LandTextureListbox::onClose(){
|
||||
StateManager *sm = GameManager::getSingleton()->getStateManager();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class LandTextureListbox : public vb01Gui::Listbox{
|
||||
public:
|
||||
LandTextureListbox(vb01::Vector2, vb01::Vector2, std::vector<std::string>, int, std::string);
|
||||
LandTextureListbox(vb01::Vector3, vb01::Vector2, std::vector<std::string>, int, std::string);
|
||||
void onClose();
|
||||
private:
|
||||
};
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ namespace battleship{
|
||||
using namespace vb01Gui;
|
||||
using namespace gameBase;
|
||||
|
||||
LoadMapButton::OkButton::OkButton(vb01::Vector2 pos, vb01::Vector2 size, vb01Gui::Listbox *listbox) : Button(pos, size, "Ok", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf"){ this->listbox = listbox; }
|
||||
LoadMapButton::OkButton::OkButton(vb01::Vector3 pos, vb01::Vector2 size, vb01Gui::Listbox *listbox) : Button(pos, size, "Ok", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf"){ this->listbox = listbox; }
|
||||
|
||||
void LoadMapButton::OkButton::onClick(){
|
||||
StateManager *sm = GameManager::getSingleton()->getStateManager();
|
||||
@@ -20,7 +20,7 @@ namespace battleship{
|
||||
ConcreteGuiManager::getSingleton()->readLuaScreenScript("mapEditor.lua");
|
||||
}
|
||||
|
||||
LoadMapButton::LoadMapButton(Vector2 pos, Vector2 size) : Button(pos, size, "Load map", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf"){}
|
||||
LoadMapButton::LoadMapButton(Vector3 pos, Vector2 size) : Button(pos, size, "Load map", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf"){}
|
||||
|
||||
void LoadMapButton::onClick(){
|
||||
ConcreteGuiManager::getSingleton()->readLuaScreenScript("loadMap.lua");
|
||||
|
||||
+2
-2
@@ -12,13 +12,13 @@ namespace battleship{
|
||||
public:
|
||||
class OkButton : public vb01Gui::Button{
|
||||
public:
|
||||
OkButton(vb01::Vector2, vb01::Vector2, vb01Gui::Listbox*);
|
||||
OkButton(vb01::Vector3, vb01::Vector2, vb01Gui::Listbox*);
|
||||
void onClick();
|
||||
private:
|
||||
vb01Gui::Listbox *listbox;
|
||||
};
|
||||
|
||||
LoadMapButton(vb01::Vector2, vb01::Vector2);
|
||||
LoadMapButton(vb01::Vector3, vb01::Vector2);
|
||||
void onClick();
|
||||
private:
|
||||
};
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ namespace battleship{
|
||||
using namespace vb01;
|
||||
using namespace vb01Gui;
|
||||
|
||||
MainMenuButton::MainMenuButton(Vector2 pos, Vector2 size, string name) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true){}
|
||||
MainMenuButton::MainMenuButton(Vector3 pos, Vector2 size, string name) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true){}
|
||||
|
||||
void MainMenuButton::onClick(){
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class MainMenuButton : public vb01Gui::Button{
|
||||
public:
|
||||
MainMenuButton(vb01::Vector2, vb01::Vector2, std::string);
|
||||
MainMenuButton(vb01::Vector3, vb01::Vector2, std::string);
|
||||
void onClick();
|
||||
private:
|
||||
};
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
namespace battleship{
|
||||
class MapEditorButton : public vb01Gui::Button{
|
||||
public:
|
||||
MapEditorButton(vb01::Vector2 pos, vb01::Vector2 size) : vb01Gui::Button(pos, size, "Map editor", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf"){}
|
||||
MapEditorButton(vb01::Vector3 pos, vb01::Vector2 size) : vb01Gui::Button(pos, size, "Map editor", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf"){}
|
||||
void onClick();
|
||||
private:
|
||||
};
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ namespace battleship{
|
||||
using namespace vb01Gui;
|
||||
using namespace gameBase;
|
||||
|
||||
NewMapButton::OkButton::OkButton(vb01::Vector2 pos, vb01::Vector2 size, vb01Gui::Textbox *name, vb01Gui::Textbox *sx, vb01Gui::Textbox *sy) : Button(pos, size, "Ok", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true){
|
||||
NewMapButton::OkButton::OkButton(vb01::Vector3 pos, vb01::Vector2 size, vb01Gui::Textbox *name, vb01Gui::Textbox *sx, vb01Gui::Textbox *sy) : Button(pos, size, "Ok", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true){
|
||||
this->name = name;
|
||||
this->sizeX = sx;
|
||||
this->sizeY = sy;
|
||||
@@ -31,7 +31,7 @@ namespace battleship{
|
||||
ConcreteGuiManager::getSingleton()->readLuaScreenScript("mapEditor.lua");
|
||||
}
|
||||
|
||||
NewMapButton::NewMapButton(Vector2 pos, Vector2 size) : Button(pos, size, "New map", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf"){}
|
||||
NewMapButton::NewMapButton(Vector3 pos, Vector2 size) : Button(pos, size, "New map", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf"){}
|
||||
|
||||
void NewMapButton::onClick(){
|
||||
ConcreteGuiManager::getSingleton()->readLuaScreenScript("newMap.lua");
|
||||
|
||||
+2
-2
@@ -12,13 +12,13 @@ namespace battleship{
|
||||
public:
|
||||
class OkButton : public vb01Gui::Button{
|
||||
public:
|
||||
OkButton(vb01::Vector2, vb01::Vector2, vb01Gui::Textbox*, vb01Gui::Textbox*, vb01Gui::Textbox*);
|
||||
OkButton(vb01::Vector3, vb01::Vector2, vb01Gui::Textbox*, vb01Gui::Textbox*, vb01Gui::Textbox*);
|
||||
void onClick();
|
||||
private:
|
||||
vb01Gui::Textbox *name, *sizeX, *sizeY;
|
||||
};
|
||||
|
||||
NewMapButton(vb01::Vector2, vb01::Vector2);
|
||||
NewMapButton(vb01::Vector3, vb01::Vector2);
|
||||
void onClick();
|
||||
private:
|
||||
};
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ namespace battleship{
|
||||
using namespace vb01Gui;
|
||||
using namespace gameBase;
|
||||
|
||||
OfferButton::OfferButton(Vector2 pos, Vector2 size, int plId, string name, int trigger, string imagePath) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, true, imagePath), playerId(plId){}
|
||||
OfferButton::OfferButton(Vector3 pos, Vector2 size, int plId, string name, int trigger, string imagePath) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, true, imagePath), playerId(plId){}
|
||||
|
||||
void OfferButton::onClick(){
|
||||
ConcreteGuiManager *guiManager = ConcreteGuiManager::getSingleton();
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class OfferButton : public vb01Gui::Button{
|
||||
public:
|
||||
OfferButton(vb01::Vector2, vb01::Vector2, int, std::string, int, std::string);
|
||||
OfferButton(vb01::Vector3, vb01::Vector2, int, std::string, int, std::string);
|
||||
void onClick();
|
||||
inline void setPlayerId(int plId){playerId = plId;}
|
||||
private:
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ namespace battleship{
|
||||
using namespace vb01;
|
||||
using namespace vb01Gui;
|
||||
|
||||
OkButton::OkButton(Vector2 pos, Vector2 size, string name) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) {}
|
||||
OkButton::OkButton(Vector3 pos, Vector2 size, string name) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) {}
|
||||
|
||||
void OkButton::onClick() {}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class OkButton : public vb01Gui::Button{
|
||||
public:
|
||||
OkButton(vb01::Vector2, vb01::Vector2, std::string);
|
||||
OkButton(vb01::Vector3, vb01::Vector2, std::string);
|
||||
void onClick();
|
||||
private:
|
||||
};
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ using namespace vb01;
|
||||
using namespace std;
|
||||
|
||||
namespace battleship{
|
||||
OptionsButton::OptionsButton(Vector2 pos, Vector2 size, string name, bool separate) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, separate) {}
|
||||
OptionsButton::OptionsButton(Vector3 pos, Vector2 size, string name, bool separate) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, separate) {}
|
||||
|
||||
void OptionsButton::onClick() {
|
||||
ConcreteGuiManager::getSingleton()->readLuaScreenScript("options.lua");
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
namespace battleship {
|
||||
class OptionsButton : public vb01Gui::Button {
|
||||
public:
|
||||
OptionsButton(vb01::Vector2, vb01::Vector2, std::string, bool);
|
||||
OptionsButton(vb01::Vector3, vb01::Vector2, std::string, bool);
|
||||
virtual void onClick();
|
||||
};
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ namespace battleship{
|
||||
using namespace vb01Gui;
|
||||
using namespace gameBase;
|
||||
|
||||
PlayButton::PlayButton(vector<Listbox*> difficulties, vector<Listbox*> factions, Listbox *mapListbox, Vector2 pos, Vector2 size, string name, bool separate) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", GLFW_KEY_P, separate) {
|
||||
PlayButton::PlayButton(vector<Listbox*> difficulties, vector<Listbox*> factions, Listbox *mapListbox, Vector3 pos, Vector2 size, string name, bool separate) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", GLFW_KEY_P, separate) {
|
||||
difficultiesListboxes = difficulties;
|
||||
factionsListboxes = factions;
|
||||
this->mapListbox = mapListbox;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ namespace vb01Gui{
|
||||
namespace battleship{
|
||||
class PlayButton : public vb01Gui::Button {
|
||||
public:
|
||||
PlayButton(std::vector<vb01Gui::Listbox*>, std::vector<vb01Gui::Listbox*>, vb01Gui::Listbox*, vb01::Vector2, vb01::Vector2, std::string, bool);
|
||||
PlayButton(std::vector<vb01Gui::Listbox*>, std::vector<vb01Gui::Listbox*>, vb01Gui::Listbox*, vb01::Vector3, vb01::Vector2, std::string, bool);
|
||||
void onClick();
|
||||
private:
|
||||
std::vector<vb01Gui::Listbox*> difficultiesListboxes, factionsListboxes;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace battleship{
|
||||
using namespace vb01Gui;
|
||||
using namespace gameBase;
|
||||
|
||||
PlayerTradeButton::PlayerTradeButton(Vector2 pos, Vector2 size, string gs, string name, int trigger, string imagePath) : ActiveStateButton(pos, size, gs, name, trigger, imagePath){}
|
||||
PlayerTradeButton::PlayerTradeButton(Vector3 pos, Vector2 size, string gs, string name, int trigger, string imagePath) : ActiveStateButton(pos, size, gs, name, trigger, imagePath){}
|
||||
|
||||
void PlayerTradeButton::onClick(){
|
||||
ActiveStateButton::onClick();
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class PlayerTradeButton : public ActiveStateButton{
|
||||
public:
|
||||
PlayerTradeButton(vb01::Vector2, vb01::Vector2, std::string, std::string, int, std::string);
|
||||
PlayerTradeButton(vb01::Vector3, vb01::Vector2, std::string, std::string, int, std::string);
|
||||
void onClick();
|
||||
private:
|
||||
};
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ namespace battleship{
|
||||
using namespace vb01;
|
||||
using namespace std;
|
||||
|
||||
ResearchButton::ResearchButton(Vector2 pos, Vector2 size, string name, int trigger, string imagePath, int uid, int tid) :
|
||||
ResearchButton::ResearchButton(Vector3 pos, Vector2 size, string name, int trigger, string imagePath, int uid, int tid) :
|
||||
UnitButton(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, imagePath, uid), techId(tid){
|
||||
Root *root = Root::getSingleton();
|
||||
Material *mat = new Material(root->getLibPath() + "gui");
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class ResearchButton : public UnitButton{
|
||||
public:
|
||||
ResearchButton(vb01::Vector2, vb01::Vector2, std::string, int, std::string, int, int);
|
||||
ResearchButton(vb01::Vector3, vb01::Vector2, std::string, int, std::string, int, int);
|
||||
~ResearchButton();
|
||||
void onClick();
|
||||
void update();
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace battleship{
|
||||
using namespace vb01;
|
||||
using namespace vb01Gui;
|
||||
|
||||
ResourceAmmountButton::ResourceAmmountButton(Vector2 pos, Vector2 size, string name, int amm, int trigger, string imagePath) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, true, imagePath), ammount(amm) {
|
||||
ResourceAmmountButton::ResourceAmmountButton(Vector3 pos, Vector2 size, string name, int amm, int trigger, string imagePath) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, true, imagePath), ammount(amm) {
|
||||
ConcreteGuiManager *guiManager = ConcreteGuiManager::getSingleton();
|
||||
int numTextboxes = guiManager->getTextboxes().size();
|
||||
textbox = guiManager->getTextboxes()[numTextboxes - 1];
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace vb01Gui{
|
||||
namespace battleship{
|
||||
class ResourceAmmountButton : public vb01Gui::Button{
|
||||
public:
|
||||
ResourceAmmountButton(vb01::Vector2, vb01::Vector2, std::string, int, int, std::string);
|
||||
ResourceAmmountButton(vb01::Vector3, vb01::Vector2, std::string, int, int, std::string);
|
||||
void onClick();
|
||||
private:
|
||||
vb01Gui::Textbox *textbox = nullptr;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace battleship{
|
||||
using namespace vb01;
|
||||
using namespace vb01Gui;
|
||||
|
||||
SinglePlayerButton::SinglePlayerButton(Vector2 pos, Vector2 size, string name) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", GLFW_KEY_S, true) {}
|
||||
SinglePlayerButton::SinglePlayerButton(Vector3 pos, Vector2 size, string name) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", GLFW_KEY_S, true) {}
|
||||
|
||||
void SinglePlayerButton::onMouseOver(){
|
||||
setColor(Vector4(.8, .8, .8, 1));
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
namespace battleship{
|
||||
class SinglePlayerButton : public vb01Gui::Button {
|
||||
public:
|
||||
SinglePlayerButton(vb01::Vector2, vb01::Vector2, std::string);
|
||||
SinglePlayerButton(vb01::Vector3, vb01::Vector2, std::string);
|
||||
void onClick();
|
||||
void onMouseOver();
|
||||
void onMouseOff();
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace battleship{
|
||||
using namespace vb01Gui;
|
||||
using namespace gameBase;
|
||||
|
||||
SkyboxTextureListbox::SkyboxTextureListbox(Vector2 pos, Vector2 size, vector<string> lines, int maxDisplay, string fontPath) : Listbox(pos, size, lines, maxDisplay, fontPath){}
|
||||
SkyboxTextureListbox::SkyboxTextureListbox(Vector3 pos, Vector2 size, vector<string> lines, int maxDisplay, string fontPath) : Listbox(pos, size, lines, maxDisplay, fontPath){}
|
||||
|
||||
void SkyboxTextureListbox::onClose(){
|
||||
Root *root = Root::getSingleton();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class SkyboxTextureListbox : public vb01Gui::Listbox{
|
||||
public:
|
||||
SkyboxTextureListbox(vb01::Vector2, vb01::Vector2, std::vector<std::string>, int, std::string);
|
||||
SkyboxTextureListbox(vb01::Vector3, vb01::Vector2, std::vector<std::string>, int, std::string);
|
||||
void onClose();
|
||||
private:
|
||||
};
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ namespace battleship{
|
||||
using namespace vb01;
|
||||
using namespace gameBase;
|
||||
|
||||
StatsButton::StatsButton(Vector2 pos, Vector2 size, string name, int trigger, string imagePath) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, true, imagePath){}
|
||||
StatsButton::StatsButton(Vector3 pos, Vector2 size, string name, int trigger, string imagePath) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, true, imagePath){}
|
||||
|
||||
void StatsButton::addPlayerDataGuiElements(int playerId){
|
||||
const int numPairs = 7;
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship {
|
||||
class StatsButton : public vb01Gui::Button{
|
||||
public:
|
||||
StatsButton(vb01::Vector2, vb01::Vector2, std::string, int, std::string);
|
||||
StatsButton(vb01::Vector3, vb01::Vector2, std::string, int, std::string);
|
||||
void onClick();
|
||||
private:
|
||||
void addPlayerDataGuiElements(int);
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ namespace battleship{
|
||||
using namespace vb01;
|
||||
using namespace vb01Gui;
|
||||
|
||||
TabButton::TabButton(Vector2 pos, Vector2 size, string name, string screenScript) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) {
|
||||
TabButton::TabButton(Vector3 pos, Vector2 size, string name, string screenScript) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) {
|
||||
this->screenScript = screenScript;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class TabButton : public vb01Gui::Button{
|
||||
public:
|
||||
TabButton(vb01::Vector2, vb01::Vector2, std::string, std::string);
|
||||
TabButton(vb01::Vector3, vb01::Vector2, std::string, std::string);
|
||||
void onClick();
|
||||
private:
|
||||
std::string screenScript;
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ namespace battleship{
|
||||
using namespace vb01;
|
||||
using namespace gameBase;
|
||||
|
||||
TradeButton::TradeButton(Vector2 pos, Vector2 size, string name, int trigger, string imagePath, int uid, Type t) : UnitButton(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, imagePath, uid), type(t){}
|
||||
TradeButton::TradeButton(Vector3 pos, Vector2 size, string name, int trigger, string imagePath, int uid, Type t) : UnitButton(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, imagePath, uid), type(t){}
|
||||
|
||||
void TradeButton::onClick(){
|
||||
ActiveGameState *activeState = (ActiveGameState*)(GameManager::getSingleton()->getStateManager()->getAppStateByType((int)AppStateType::ACTIVE_STATE));
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ namespace battleship{
|
||||
public:
|
||||
enum class Type{BUY_REFINEDS, SELL_REFINEDS, BUY_RESEARCH, SELL_RESEARCH};
|
||||
|
||||
TradeButton(vb01::Vector2, vb01::Vector2, std::string, int, std::string, int, Type);
|
||||
TradeButton(vb01::Vector3, vb01::Vector2, std::string, int, std::string, int, Type);
|
||||
void onClick();
|
||||
private:
|
||||
Type type;
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace battleship{
|
||||
using namespace vb01;
|
||||
using namespace vb01Gui;
|
||||
|
||||
TradingScreenButton::TradingScreenButton(Vector2 pos, Vector2 size, int plId, string gs, string name, int trigger, string imagePath) : ActiveStateButton(pos, size, gs, name, trigger, imagePath), playerId(plId){}
|
||||
TradingScreenButton::TradingScreenButton(Vector3 pos, Vector2 size, int plId, string gs, string name, int trigger, string imagePath) : ActiveStateButton(pos, size, gs, name, trigger, imagePath), playerId(plId){}
|
||||
|
||||
//TODO add method to get buttons by name
|
||||
void TradingScreenButton::onClick(){
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class TradingScreenButton : public ActiveStateButton{
|
||||
public:
|
||||
TradingScreenButton(vb01::Vector2, vb01::Vector2, int, std::string, std::string, int, std::string);
|
||||
TradingScreenButton(vb01::Vector3, vb01::Vector2, int, std::string, std::string, int, std::string);
|
||||
void onClick();
|
||||
private:
|
||||
int playerId;
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ namespace battleship{
|
||||
using namespace vb01;
|
||||
using namespace gameBase;
|
||||
|
||||
TrainButton::TrainButton(Vector2 pos, Vector2 size, string name, int trigger, string imagePath, int uid, int slId) :
|
||||
TrainButton::TrainButton(Vector3 pos, Vector2 size, string name, int trigger, string imagePath, int uid, int slId) :
|
||||
UnitButton(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, imagePath, uid),
|
||||
slotId(slId) {}
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
namespace battleship{
|
||||
class TrainButton : public UnitButton{
|
||||
public:
|
||||
TrainButton(vb01::Vector2, vb01::Vector2, std::string, int, std::string, int, int);
|
||||
TrainButton(vb01::Vector3, vb01::Vector2, std::string, int, std::string, int, int);
|
||||
void onClick();
|
||||
private:
|
||||
int slotId;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ namespace battleship{
|
||||
using namespace vb01Gui;
|
||||
using namespace gameBase;
|
||||
|
||||
UnitButton::UnitButton(Vector2 pos, Vector2 size, string name, string fontPath, int trigger, string imagePath, int uid) : Button(pos, size, name, fontPath, trigger, true, imagePath), unitId(uid){
|
||||
UnitButton::UnitButton(Vector3 pos, Vector2 size, string name, string fontPath, int trigger, string imagePath, int uid) : Button(pos, size, name, fontPath, trigger, true, imagePath), unitId(uid){
|
||||
StateManager *stateManager = GameManager::getSingleton()->getStateManager();
|
||||
ActiveGameState *activeState = (ActiveGameState*)stateManager->getAppStateByType((int)AppStateType::ACTIVE_STATE);
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ namespace battleship{
|
||||
|
||||
class UnitButton : public vb01Gui::Button{
|
||||
public:
|
||||
UnitButton(vb01::Vector2, vb01::Vector2, std::string, std::string, int, std::string, int);
|
||||
UnitButton(vb01::Vector3, vb01::Vector2, std::string, std::string, int, std::string, int);
|
||||
protected:
|
||||
int unitId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user