Game Development Community

Mouse events for an invisible sprite

by Jonathan Mendenhall · in Torque Game Builder · 12/22/2009 (2:51 pm) · 2 replies

I has seen similar issues brought up before, but I have not found an answer. I have a button that switches between visible and invisible, I need to to register mouse events in both states. Is this possible? Currently whenever I set it to invisible it seems to become entirely deactivated. Thanks in advance for any help.

#1
12/22/2009 (7:00 pm)
You might try setting the alpha to be completely transparent. I have not tried it, but it seems like it should work.
#2
12/23/2009 (2:40 pm)
Kenneth is right. If you set the button to be transparent via something like "MyButton.setBlendAlpha(0);", it will still register mouse events.