Jump to content

Hi Guys..


Recommended Posts

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

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 by Swift
Link to comment
Share on other sites

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.

Oh okay.. It works great now. Thank you very much

code
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...