This doesn’t work for mine project.
I have a variable that I can change during the start menu that determines how many mines will be drawn.
It can vary from 0 to 10, If set to 0 It will drawn none and if set to 5 it will drawn for example 5.
However my issue at the moment right now is that I can’t set the mines in the start menu because it keeps the value that is given before running the program.
E.G : Mines is set as int mines = 1
I use a - and + button,
if (mouseX > 360 && mouseX < 360 + buttonsize && mouseY > yloc && mouseY < yloc + buttonsize) {
mines = mines - 1;
}
if (mouseX > 460 && mouseX < 460 + buttonsize && mouseY > yloc && mouseY < yloc + buttonsize) {
mines = mines + 1;
}
This is how my start menu looks (Treasures is not important for now). I have for example added mines up to 5 with the button as a test however when I go to the next screen it still draw 1 red circles instead of 5.