- made program exit on pressing red button by having a JOptionPane pop up
- made a second gamePane to make a second BorderLayout
- second BorderLayout will act as a menu for the user with "quit", "instructions", and "map" (maybe)
- the 1st BorderLayout goes into the 2nd BorderLayout
Everything of that works fine and awesome after I fiddled with some things. Now my issue is how to use the booleans to make the rooms clickable or not. Because at the moment, this is working:
if(whatClicked.getButton()==whatClicked.BUTTON1)
{
if(roomArray[cRow][cCol]==roomArray[2][0])
{
prev=false;
}
else
{
prev=true;
}
if(roomArray[cRow][cCol]!=roomArray[2][0])
{
cRow++;
if(tracing)
{
System.out.println("CHARACTER HAS ENTERED PREVIOUS ROOM");
}
}
}
What's not working, is if I replace if(roomArray[cRow][cCol]!=roomArray[2][0]) with if(prev=true);
Which I think should work unless I'm missing something very obvious, which I probably am, but it really looks like it should work. I don't get why it won't work. My computer crashes when I try to use if(prev=true);.
So. I got a back to menu button, plus an "exit screen" of sorts, but this part, which I was actually supposed to do today, won't work.
Nice.