experimenting with colors + changed main menu to change based on size
This commit is contained in:
10
web/game.js
10
web/game.js
@@ -3,6 +3,8 @@
|
||||
const width = 1260;
|
||||
const height = 620;
|
||||
let requesteddata = [];
|
||||
let buttonWidth = width/ 6
|
||||
let buttonHeight = buttonWidth/5
|
||||
// Menu variables
|
||||
let letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
|
||||
let currentIndex = [0, 0, 0];
|
||||
@@ -321,7 +323,7 @@ function draw() {
|
||||
stroke(205, 205, 205)
|
||||
strokeWeight(2)
|
||||
fill(0, 0, 0, 0)
|
||||
rect(width / 2, height / 2, 200, 40)
|
||||
rect(width / 2, height / 2, buttonWidth, buttonHeight)
|
||||
pop()
|
||||
}
|
||||
if (buttonSelectHome == 1) {
|
||||
@@ -329,7 +331,7 @@ function draw() {
|
||||
stroke(205, 205, 205)
|
||||
strokeWeight(2)
|
||||
fill(0, 0, 0, 0)
|
||||
rect(width / 2, height / 2 + 50, 200, 40)
|
||||
rect(width / 2, height / 2 + height/12, buttonWidth, buttonHeight)
|
||||
pop()
|
||||
}
|
||||
}
|
||||
@@ -349,7 +351,7 @@ function draw() {
|
||||
strokeWeight(2)
|
||||
fill(0, 0, 0, 0)
|
||||
rectMode(CENTER);
|
||||
rect(width / 2, height / 2, 200, 40)
|
||||
rect(width / 2, height / 2, buttonWidth, buttonHeight)
|
||||
pop()
|
||||
}
|
||||
if (buttonSelectPause == 1) {
|
||||
@@ -358,7 +360,7 @@ function draw() {
|
||||
strokeWeight(2)
|
||||
fill(0, 0, 0, 0)
|
||||
rectMode(CENTER);
|
||||
rect(width / 2, height / 2 + 50, 200, 40)
|
||||
rect(width / 2, height / 2 + height/12, buttonWidth, buttonHeight)
|
||||
pop()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user