DexterMorgan Posted March 21, 2008 Share Posted March 21, 2008 As you all know i am currently making a game But i ran into another problem: I have a picture on a Gui that moves; and i want to exit the game if you click on the picture. Is this possible I tried to search the forum couldn't find anything Please help Me Thank you!! code Link to comment Share on other sites More sharing options...
Swift Posted March 21, 2008 Share Posted March 21, 2008 (edited) Like this? $Pic = GUICtrlCreatePic() ; put your pic here...etc $GUIMsg = GUIGetMsg() Switch $GUIMsg Case $Pic Exit Endswitch Just have a case inside your script like so...so if it's clicked, it will exit. Edited March 21, 2008 by Swift Link to comment Share on other sites More sharing options...
DexterMorgan Posted March 21, 2008 Author Share Posted March 21, 2008 Like this?$Pic = GUICtrlCreatePic() ; put your pic here...etc$GUIMsg = GUIGetMsg()Switch $GUIMsgCase $PicExitEndswitchJust have a case inside your script like so...so if it's clicked, it will exit.Oh okay.. It works great now. Thank you very much code Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now