I am making a game that involves clicking many buttons with if statements and assorted loops. However, I have run into a problem. I use Codewarrior C++ and CMU Graphics Lab, and if you do, then please shoot me a PM and lend me a hand.
if (iX>=100 && iY>=45 && iX<=300 && iY<=160)
// Coordinates of a button I have that if clicked draws "(-1,0)" and simulates moving east. The (-//1,0) is a means for me to organize the game. It resembles the 2nd quadrant of a coordinate //plant.
{
// East Area (-1,0)
testWindow.DrawString(220,300, "(-1,0)");
testWindow.DrawRectangle(0, 0,600, 440);
testWindow.SetPen(WHITE, 0);
testWindow.SetBrush(WHITE);
if (iX>=100 && iY>=45 && iX<=300 && iY<=160)
// This is where my problem is. It is supposed to go to that screen and let the user choose the //option of where to go, Instead, when I click on the first button, it will automatically come down //to here and draws "(-2,0)" How do I fix this?
// East Area (-2,0)
testWindow.DrawString(220,300, "(-2,0)");
testWindow.DrawRectangle(0, 0,600, 440);
testWindow.SetPen(WHITE, 0);
testWindow.SetBrush(WHITE);
}
Guys, sorry for posting 2 threads. I didn't see the "Wait for moderator approval" message until the second time submitting the thread. The first, I thought I did something stupid and somehow didn't get the thread through.
Bookmarks