1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
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);
}
|