View Full Version : Character selector
10-05-2003, 11:17 PM
"Hi, guys! I'm trying to build a "Setup-selector" for MAX, via MaxScript,
and I am finding some problems with it. I want the image it's down here to
be "interactive", you know, each point corresponds bone or a dummie, like MotionBuilder,
or BipedWorker, a excellent script that does the same I want to. The problem comes with the script UI: I don't know exactly how to do build the buttons.
What kind of button may I use?
A GIF? JPG? BMP with its alpha-copy?
Hope you can give me a hand. Thanks!
10-06-2003, 07:53 AM
Check out the imgTag UI control in the Maxscript docs. It's exactly what you're looking for:)
10-06-2003, 11:20 AM
ohoohohohoho:applause: thanks. But....
Could you write me a example,please?. I donīt understand the rout of the button.
Thanks for all.:thumbsup:
10-06-2003, 08:52 PM
Okay, here's what I was thinking. imgTag's are like a hotspot control - they wait for mouse interaction and perform whatever you place in the appropriate event handler. They're designed so that you can use an image as the hotspot, but the transparency feature never looks good except on solid backgrounds. So I would just use the bitmap you've already got, and place "empty" imgTag controls over where the selector cells are on the image. Here's a really basic example of how to place an imgTag control and handle a few callbacks:
rollout rlt_hotspot "Hotspot Test"
imgTag tag1 pos:[8,8] width:150 height:50 tooltip:"this is tag1"
imgTag tag2 pos:[8,58] width:150 height:50 tooltip:"this is tag2"
on tag1 mouseover do pushprompt "this is tag1"
on tag2 mouseover do pushprompt "this is tag2"
on tag1 mouseout do pushprompt ""
on tag2 mouseout do pushprompt ""
on tag1 mouseup do messageBox "You hit tag1!" title:"Hotspot"
on tag2 mouseup do messageBox "You hit tag2!" title:"Hotspot"
createDialog rlt_hotspot 160 110
That should give you some ideas. You'll need to do some initial brainwork to figure out where to place the tags to get them to line up with the selector cells in your bitmap, but once you've got that figured out the rest is a piece of cake:)
10-06-2003, 11:33 PM
Firstly, thanks a lot for your amazing explanation. But because of my stupidity (sigh!) I can't understand the concept totally.
I'm going to show you a little pic to clear up the things, for you to know what I'm trying to explain.
Is imgTag supposed to be like a "invisible button"?
It's like a "section-you-can-click" in a webpage pic?
If it is, it's what I've been looking for. Now I must build the code to put the bitmaps in the pic.
10-07-2003, 09:02 AM
Well, like I said, imgTag's are designed to be used with an image like you have illustrated. But they can also be used as an invisible hotspot. If you want highlighting cells like that, you can just use a bitmap for the imgTag and swap out the "active" and "inactive" versions in the appropriate event handler(s). The only disadvantage that I've found in using masked bitmaps with imgTag's is that the transparency isnt of the highest quality. But it does get the job done:shrug:
Let me know if you need further examples, for instance on how to set the bitmap image and transparcy of the imgTag.
01-16-2006, 07:00 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.