My HumanUI script currently has the “Set” warning because the selection of Metric or Imperial Units is driving which slider shows in the interface…any insight on how i’m using the Set components improperly in order to fix? i’m sure i could just change to a Text Block that updates but wanted to see if there was a solution for this setup first. thanks in advance!
You are getting the warning not because of the Set Slider component but because you are using a programmatic variable to switch beween the Slider sources (which are connected directly to the Add Elements input). This causes the entire UI to refresh when that ListBox value changes.
There are two ways (minimum) to accomplish what you want, with different trade-offs:
- Connect both sliders directly to the Merge component here, and then use the Index value from the ListBox to control a “Show/Hide” component, only showing the relevant slider in the UI as appropriate. This has the advantage of keeping separate instances of the slider components which will maintain their own state histories.
- Connect a single slider to the Merge component, and then use the Index value to pick beween two different values that represent the slider extents as well as the value. This can be accomplished using MetaHopper to extract the relevant slider information from two different sliders (unconnected to HUI). This has the advantage of reducing the number of components you have to create in the UI itself (which may be an advantage in large UI definitions, from a loading perspective) but you are constantly repopulating the same slider so you only have one slider state and won’t be able to maintain states across ListBox selections.
I personally would go with the first one for your use case.
Thanks Marc! I ended up going with your first recommendation…I think the show/hide is a good idea…thanks for your help!
using the screenshot i provided above, to add another tab, you need to add an input to the TABS component (circled in red)…click the + when you zoom in and a T1 input will be added…all the 2nd tab elements connect to this input. Next you need to give the 2nd tab name, so edit the N input to the TABS component to included a multi-line input for your tab names, such as…