View Full Version : Is it possible to place a button on an image?
11-08-2005, 06:25 AM
What I'd like to do is create a form layout, and place an image on it, then directly on top of that image, make an invisible button that when pressed, will change the image underneath.
Now because the button is invisible it'll look like your pressing the image. I have been able to get the button on top of the image but anywhere that the bounding box of the image underneath exists, the button cannot be pressed. I think Maya gets confused with which is on top or something.
Is there a way around this? I haven't found an image command with an on mouseclick script. Can anyone help?
11-08-2005, 06:58 AM
I think you may be better off making a mini-webpage you call from within Maya and having everything run off of mel:// commands. This is assuming you are running 6.0 or above (I think 6.0 is where they debuted web browsing).
11-08-2005, 07:00 AM
Take a look at the iconTextButton command. You can use an image for the button and size the botton to match the size of the image. Query the image to swap them out. That help ya?
Webpage could also work too? But you run the hassle if a server is down.
11-08-2005, 11:01 PM
Yeah almost. It just doesn't display the image no matter what I do. I've tried resizing the whole button but that doesn't help either. I'm trying to display a .jpg image which works with an `image` command, but it doesn't work with the iconTextButton command.
11-09-2005, 12:31 AM
11-09-2005, 04:47 AM
The symbolButton will work however you can't have a control on top of that and be able to click both. At least my test did not work doing that. But if all you want is a button that just swaps an image then symbolButton should work. It works for .bmp and .xpm format. Just make the button the same size as your image.
11-09-2005, 04:47 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.