diff options
-rw-r--r-- | GUI/InGame.lua | 52 |
1 files changed, 41 insertions, 11 deletions
diff --git a/GUI/InGame.lua b/GUI/InGame.lua index 1908894..17b1ffd 100644 --- a/GUI/InGame.lua +++ b/GUI/InGame.lua @@ -34,30 +34,60 @@ end function InGame.loadInterface() love.graphics.setBackgroundColor(0, 0, 0) - -- Inner Window border + -- Inner window border table.insert(InGame.Polygons, { Type = "rectangle", DrawMode = "line", LineWidth = 0.005, Position = { x = 0.005, y = 0.005}, Dimension = {width = 0.99, height = 0.99}, Colors = {0, 0, 171, 255} }) -- Background for i = 0, 5 do - table.insert(InGame.Polygons, { Type = "polygon", DrawMode = "fill", Position = { x1 = 0.01, y1 = 0.02+0.02*i, x2 = 0.02+0.02*i, y2 = 0.01, x3 = 0.03+0.02*i, y3 = 0.01, x4 = 0.01, y4 = 0.03+0.02*i}, Colors = {0, 0, 171, 255} }) - table.insert(InGame.Polygons, { Type = "polygon", DrawMode = "fill", Position = { x1 = 0.99, y1 = 0.98-0.02*i, x2 = 0.98-0.02*i, y2 = 0.99, x3 = 0.97-0.02*i, y3 = 0.99, x4 = 0.99, y4 = 0.97-0.02*i}, Colors = {0, 0, 171, 255} }) + table.insert(InGame.Polygons, { Type = "polygon", DrawMode = "fill", Position = { x1 = 0.01, y1 = 0.02+0.02*i, x2 = 0.02+0.02*i, y2 = 0.01, x3 = 0.03+0.02*i, y3 = 0.01, x4 = 0.01, y4 = 0.03+0.02*i}, Colors = {0, 0, 171, 255} }) -- 6 barres en diagonales en haut. + table.insert(InGame.Polygons, { Type = "polygon", DrawMode = "fill", Position = { x1 = 0.99, y1 = 0.98-0.02*i, x2 = 0.98-0.02*i, y2 = 0.99, x3 = 0.97-0.02*i, y3 = 0.99, x4 = 0.99, y4 = 0.97-0.02*i}, Colors = {0, 0, 171, 255} }) -- 6 barres en diagonales en bas. end -- Left box - table.insert(InGame.Polygons, { Type = "rectangle", DrawMode = "fill", Position = { x = 0.05, y = 0.05}, Dimension = {width = 0.35, height = 0.90}, Colors = {0, 0, 0, 255} }) - table.insert(InGame.Polygons, { Type = "rectangle", DrawMode = "line", Position = { x = 0.05, y = 0.05}, Dimension = {width = 0.35, height = 0.90}, Colors = {0, 0, 171, 255} }) - table.insert(InGame.Polygons, { Type = "line", Position = { x1 = 0.05, y1 = 0.1, x2 = 0.4, y2 = 0.1}, Colors = {0, 0, 171, 255} }) + table.insert(InGame.Polygons, { Type = "rectangle", DrawMode = "fill", Position = { x = 0.05, y = 0.05}, Dimension = {width = 0.35, height = 0.90}, Colors = {0, 0, 0, 255} }) -- Rectangle plein (noir) permettant de cacher les barres diagonales. + table.insert(InGame.Polygons, { Type = "rectangle", DrawMode = "line", Position = { x = 0.05, y = 0.05}, Dimension = {width = 0.35, height = 0.90}, Colors = {0, 0, 171, 255} }) -- Rectangle de la partie gauche. + table.insert(InGame.Polygons, { Type = "line", Position = { x1 = 0.05, y1 = 0.1, x2 = 0.4, y2 = 0.1}, Colors = {0, 0, 171, 255} }) -- Ligne séparant le rectangle précédent en 2 partie. -- Left box buttons - table.insert(InGame.Polygons, { Type = "rectangle", DrawMode = "line", Position = { x = 0.075, y = 0.875}, Dimension = {width = 0.125, height = 0.05}, Colors = {0, 0, 171, 255} }) - table.insert(InGame.Polygons, { Type = "rectangle", DrawMode = "line", Position = { x = 0.25, y = 0.875}, Dimension = {width = 0.125, height = 0.05}, Colors = {0, 0, 171, 255} }) + table.insert(InGame.Polygons, { Type = "rectangle", DrawMode = "line", Position = { x = 0.075, y = 0.875}, Dimension = {width = 0.125, height = 0.05}, Colors = {0, 0, 171, 255} }) -- Rectangle du boutton "Reset". + table.insert(InGame.Polygons, { Type = "print", Text = "Reset", Position = { x = 0.075+0.035, y = 0.875+0.01 }, Colors = { 255, 255, 255, 255}}) + table.insert(InGame.Polygons, { Type = "rectangle", DrawMode = "line", Position = { x = 0.25, y = 0.875}, Dimension = {width = 0.125, height = 0.05}, Colors = {0, 0, 171, 255} }) -- Rectangle du boutton "Valider" + table.insert(InGame.Polygons, { Type = "print", Text = "Valider", Position = { x = 0.25+0.035, y = 0.875+0.01 }, Colors = { 255, 255, 255, 255}}) -- Left box content - table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.01, Position = { x1 = 0.375, y1 = 0.15-0.005, x2 = 0.375, y2 = 0.75}, Colors = {0, 0, 171, 255} }) + table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.01, Position = { x1 = 0.375, y1 = 0.15-0.005, x2 = 0.375, y2 = 0.75+0.005}, Colors = {0, 0, 171, 255} }) -- Grande barre verticale à droite. + table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.01, Position = { x1 = 0.06+0.0025, y1 = 0.15, x2 = 0.08, y2 = 0.15}, Colors = {0, 0, 171, 255} }) -- Petite barre horizontale à gauche du dernier grand carré du haut (plus petite que les autres sinon elle dépassait de la case). + for i = 0, 3 do + table.insert(InGame.Polygons, { Type = "rectangle", LineWidth = 0.01, DrawMode = "line", Position = { x = 0.08+i*0.075, y = 0.12}, Dimension = {width = 0.045, height = 0.05}, Colors = {0, 0, 171, 255} }) -- 4 grands carrés du haut. + table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.01, Position = { x1 = 0.35-i*0.075, y1 = 0.15, x2 = 0.38-i*0.075-0.0025, y2 = 0.15}, Colors = {0, 0, 171, 255} }) -- 4 barres reliant les 4 grands carrés du haut. + end + + for m = 0, 1 do + table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.005, Position = { x1 = 0.065, y1 = 0.15+m*0.2-0.0025, x2 = 0.065, y2 = 0.25+0.0025+m*0.2}, Colors = {0, 0, 171, 255} }) -- 2 barres verticales reliant, le grand carré du haut avec le premier groupe, et le troisième groupe avec le cinquième. + table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.005, Position = { x1 = 0.305, y1 = 0.25+m*0.2-0.0025, x2 = 0.305, y2 = 0.35+0.0025+m*0.2}, Colors = {0, 0, 171, 255} }) -- 2 barres verticales reliant, le deuxième groupe avec le troisième groupe, et le sixième groupe avec le dernier groupe. + table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.005, Position = { x1 = 0.21+m*0.075, y1 = 0.525-0.001, x2 = 0.21+m*0.075, y2 = 0.575-0.001}, Colors = {0, 0, 171, 255} }) -- 2 barres verticales encadrant le dernier groupe. + table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.005, Position = { x1 = 0.19+m*0.095, y1 = 0.55, x2 = 0.21+m*0.095, y2 = 0.55}, Colors = {0, 0, 171, 255} }) -- 2 barres horizontales encadrant le dernier groupe. + for j = 0, 2 do + table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.01, Position = { x1 = 0.18, y1 = 0.25+j*0.1, x2 = 0.19, y2 = 0.25+j*0.1}, Colors = {0, 0, 171, 255} }) -- 3 petites barres épaisses entre les 6 premiers groupes. + for k = 0, 1 do + table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.005, Position = { x1 = 0.085+k*0.075+m*0.125, y1 = 0.225+j*0.1-0.001, x2 = 0.085+k*0.075+m*0.125, y2 = 0.275+j*0.1-0.001}, Colors = {0, 0, 171, 255} }) -- 12 barres verticales encadrant les 6 premiers groupes. + table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.005, Position = { x1 = 0.065+k*0.095+m*0.125, y1 = 0.25+j*0.1, x2 = 0.085+k*0.095+m*0.125, y2 = 0.25+j*0.1}, Colors = {0, 0, 171, 255} }) -- 12 barres horizontales encadrant les 6 premiers groupes. + table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.0025, Position = { x1 = 0.21+j*0.0325, y1 = 0.525+k*0.0475, x2 = 0.22+j*0.0325, y2 = 0.525+k*0.0475}, Colors = {0, 0, 171, 255} }) -- 6 barres reliant les 4 petits carrés du dernier groupe entre eux. + for l = 0, 1 do + table.insert(InGame.Polygons, { Type = "rectangle", LineWidth = 0.0025, DrawMode = "line", Position = { x = 0.095+k*0.0325+m*0.125, y = 0.22+l*0.0325+j*0.1}, Dimension = {width = 0.0225, height = 0.025}, Colors = {0, 0, 171, 255} }) -- 6 premiers groupes de 4 petits carrés. + table.insert(InGame.Polygons, { Type = "rectangle", LineWidth = 0.0025, DrawMode = "line", Position = { x = 0.22+k*0.0325, y = 0.52+l*0.0325}, Dimension = {width = 0.0225, height = 0.025}, Colors = {0, 0, 171, 255} }) -- dernier groupe de 4 petits carré. + end + for n = 0, 2 do + table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.0025, Position = { x1 = 0.085+m*0.125+n*0.0325, y1 = 0.225+j*0.1+k*0.0475, x2 = 0.095+m*0.125+n*0.0325, y2 = 0.225+j*0.1+k*0.0475}, Colors = {0, 0, 171, 255} }) -- 6 barres reliant les 4 petits carrés des 6 premiers groupes entre eux. + end + end + end + end + -- Right top box - table.insert(InGame.Polygons, { Type = "rectangle", LineWidth = 0.005, DrawMode = "line", Position = { x = 0.45, y = 0.05}, Dimension = {width = 0.50, height = 0.75}, Colors = {0, 0, 171, 255} }) - table.insert(InGame.Polygons, { Type = "line", Position = { x1 = 0.45, y1 = 0.1, x2 = 0.95, y2 = 0.1}, Colors = {0, 0, 171, 255} }) + table.insert(InGame.Polygons, { Type = "rectangle", LineWidth = 0.005, DrawMode = "line", Position = { x = 0.45, y = 0.05}, Dimension = {width = 0.50, height = 0.75}, Colors = {0, 0, 171, 255} }) -- Rectangle supérieur de la partie droite. + table.insert(InGame.Polygons, { Type = "line", Position = { x1 = 0.45, y1 = 0.1, x2 = 0.95, y2 = 0.1}, Colors = {0, 0, 171, 255} }) -- Ligne séparant le rectangle précédent en 2 partie. -- Right top box content table.insert(InGame.Polygons, { Type = "line", LineWidth = 0.01, Position = { x1 = 0.375-0.0025, y1 = 0.75, x2 = 0.52+5*0.075+0.0025, y2 = 0.75}, Colors = {0, 0, 171, 255} }) |