Issue with while

Started by FusionTech, September 10, 2013, 22:22:45

Previous topic - Next topic

FusionTech

public static void ListenMenuAction(){
		    if(Mouse.getX() >= 47 && Mouse.getX() <= 147){
				if(Mouse.getY() >= 50 && Mouse.getY() <= 350){
					Render.menu1Selected = true;
					}
				}
			}
		}


If I change the ifs to whiles, the quad that worked with the if won't show, and the it gets labeled not responding

Fool Running

1) Why do you even want to make them while loops?
2) The mouse data does not update without calling Mouse.poll() or Display.update().
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

quew8

It is shown as not responding because you've put it into an infinite while loop. You haven't understood the game loop concept. Read how it is done here: http://www.lwjgl.org/wiki/index.php?title=LWJGL_Basics_2_(Input). While you're there, read the rest of the basic tutorials before you ask more stupid questions.