DigitalHax Posted March 15, 2012 Share Posted March 15, 2012 Hey, I have been setting up a menu system, but and I want the mouse to dissapear when you hit esc. But I tried to refine my code, but in my code the mouse flickers and doesn't work. The basic concept of my code is, //Main Loop { If(menval == 0 { if keyhit esc { menval = 1 Menu = 1 } } else { If keyhit esc { Menval = 0 menu = 0 } if menu = 0 { //main code Hide the mouse } else { //menu code Show the mouse } } I hope someone understands what I'm doing wrong... Quote Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5. Life is too short to remove USB safely. Link to comment Share on other sites More sharing options...
AggrorJorn Posted March 15, 2012 Share Posted March 15, 2012 Try this. bool mouse = true; //in the main loop: { if(KeyHit(KEY_ESCAPE)) { if(mouse ) { HideMouse(); mouse = !mouse; } else { ShowMouse(); mouse = !mouse; } } } Quote Link to comment Share on other sites More sharing options...
DigitalHax Posted March 15, 2012 Author Share Posted March 15, 2012 I'll try that. I also want to have a spot to fit in my main code, so it disables all the control also. Not so sure about that part Quote Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5. Life is too short to remove USB safely. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.