Sign in to follow this  
Followers 0
TheGrayMan

Clicking on Marquee (another newbie question)

4 posts in this topic

This relates to the same code as referred to in a separate post (), but I thought I'd start a different post for a different question about it. I think this one should be fairly simple.

Control of the marquee (which is based on Melba23's code) is currently done by right clicking on the tray icon (using TrayItemSetOnEvent calls). I'm trying to work out the best way of responding to clicks on the marquee GUI itself (for example, clicking on the GUI to hide it). Is there a nifty built-in function like TrayItemSetOnEvent that is the equivalent for GUI objects? I found GUIGetMsg, but I'm not sure if that's the right thing to use, or where it would go in my code. Advice, please?

Thanks,

Ian

Share this post


Link to post
Share on other sites



GuiSetState will show or hide a gui. Maybe that is what you are looking for?

Not quite. I know how to make the GUI disappear and appear - what I'm looking for is how to identify the fact that a user has clicked on the GUI, so that I can then use GUISetState (or whatever).

Ian

Share this post


Link to post
Share on other sites

You can store the position of the marquee in a variable

then in your msg loop you can look for $GUI_EVENT_PRIMARYDOWN or $GUI_EVENT_SECONDARYDOWN, compair the current mouse position to the position of the marquee to see if the mouse is over it.


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
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
Sign in to follow this  
Followers 0