hide/show UI elements
I'm working on a promotion software showing a live video (modified in realtime, like Apples Photo Booth) and some user interactions. My problem is that I want to change the UI in runtime.
Is it possible to hide and show UI Elements in runtime (especially pwindows and buttons)? If not, does anyone knows some useful Max Objects? Or are there some tricks to get to the same result (e. g. set the x or y position)?
I'm using Max 5.0.4 on Mac OS X 10.5.4. I hope someone can help me with this problem.
Thanks in advance...
freeze
look into scripting. it's a very powerful tool.
one way of doing it would be something like this: (I think that's what you were getting at)
good luck
Hi MIB,
that looks great! I think your example shows exactly what I need. Thank you!
On 8 sept. 08, at 11:03, Al Dhanab wrote:
> that looks great! I think your example shows exactly what I need.
> Thank you!
You may also want to have a look to Bpatcher, which is a great way of
grouping UI elements together, in order to control them as one.
Best,
ej
Hi EJ,
yes I tried that but I had problems with switching to the presentation mode because the included bpatcher objects itself won't change to presentation mode. Perhaps I need more practice to use it correctly.
I searched the Max help but I couldn't find descriptions about the powerful scripting functionality. Where do I find tutorials or a syntax reference? Has anyone experiences with that?
Thanks a lot...
freeze
On 8 sept. 08, at 12:02, Al Dhanab wrote:
> Hi EJ,
>
> yes I tried that but I had problems with switching to the
> presentation mode because the included bpatcher objects itself won't
> change to presentation mode. Perhaps I need more practice to use it
> correctly.
You need to check "Open in Presentation" option in the bpatcher's
patcher.
> I searched the Max help but I couldn't find descriptions about the
> powerful scripting functionality. Where do I find tutorials or a
> syntax reference? Has anyone experiences with that?
thispatcher help file is the first place to look at. There's a few
examples flying around in the examples folder of Max I think. In the
online tutorial about pluggo->poly~ there's also some examples:
HTH,
ej
yep, you can show/hide any UI object, and resize many of them, by scripting commands to thispatcher. If you're going to have a long row of similar elements to control, such as a row of 8 faders, give the first one a scripting name like
fader[1]
Then when you duplicate by alt-dragging (or option-drag on Mac), the new ones will automatically be
fader[2]
fader[3]
etc. Then you can tell them to all hide/show at once: uzi right outlet-->sprintf script show fader[%ld] -->thispatcher
[%ld] becomes the # that the uzi sends out.
I often use show/hide for optimization, like if I have multisliders that are displaying information. Seems to help somewhat, though probably gating the data would be better.