Game Development Community

Gui image and child buttons. (noob problem?)

by Dean · in Torque Game Engine · 07/02/2007 (8:00 pm) · 1 replies

I have a gui image that serves as the background for some buttons. the image is the parent so i can move the image, and the buttons move with it. the buttons are there to change the image on their parent, and its not working like i would hope. the problem is that the buttons change the image, but if i move the cursor so it's on top of the parent, the image always reverts to what it was originally. if i move the cursor off of the parent, or onto one of the buttons, the image changes back to what the button changed it to. I'm using this command for my buttons:

Command = "ParentImage.setBitmap(\"gameproj/client/ui/gfx/statsscreen.png\");";

Like I said, the command WORKS, but whenever the cursor is on top of the parent, the image always reverts to what it was originally. Any idea why it's doing this?



Edit: Also, I've got a gui image/icon of a sword with transparency and I want it to only activate a command when the mouse is on the actual image, and not in the transparent area inside the image's bounding box. Is there a way to do that?

#1
07/03/2007 (1:35 pm)
Ah i didnt know i had to deal with the different images for different states separately. i told you it was a noob problem. :p