Connexion rapide:  

Forum: VirtualDJ Skins

Sujet Using effect_active and variables....
I know how to use action="effect_active 2" where 2 denotes the slot number... but can I use a variable instead?

I was hoping to use something like action="effect_active '$slot'" but it doesn't work. The variable has been set from a set of four buttons and is working ok.

My question is therefore... can I substitute the slot number (or parameter number) for a variable?

 

Posté Sun 08 Jan 23 @ 7:50 pm
locoDogPRO InfinityModeratorMember since 2013
set a 3 & get_var a & param_cast & effect_active
 

Posté Sun 08 Jan 23 @ 10:29 pm
Thank you Locodog, I shall try that tomorrow after work and report back!
 

Posté Sun 08 Jan 23 @ 10:48 pm
So....

<button class="button_main" width="100" height="60" x="+0" y="+50" action="get_var '$slot' & param_cast & effect_active" text="ON" />

Works as expected, but the selected/on graphic for the button doesn't show, even though the button and effect is definitely on.

<button class="button_main" width="100" height="30" x="+0" y="+150" action="get_var '$slot' & param_cast & effect_button 1" visibility="get_var '$slot' & param_cast & effect_has_button 1">
<text action="get_effect_button_name 1" scroll="yes"/>
</button>

does not work.....any suggestions?
Thanks!
 

Posté Mon 09 Jan 23 @ 6:58 pm
locoDogPRO InfinityModeratorMember since 2013
the script used will mess up auto query, add a query="" to your button
erm the query being... erm

var '$slot' 1 ? effect_active 1 on ? on : off : var '$slot' 2 ? effect_active 2 on ? on : off : var '$slot' 3 ? effect_active 3 on ? on : off : 


something like that.
 

Posté Mon 09 Jan 23 @ 8:48 pm
Thank you Locodog, worked a treat! :D

Forgive me if I'm asking too many questions, but you are obviously the guru who can help me regain some of my sanity (and time)....

In the same way that one ON button changes as I modify the slot I would like to assign three buttons and five parameter knobs which are visible when the slot changes. I had some success creating a separate skin_panel for each slot, but ran into a problem as I couldn't work out how to switch off the panel when I changed the area to using pads (I have modified the pads area to toggle between pads and FX as screen space is limited).
I tried to change the variable I set for the skin panel visibility to make it invisible ready to display the pads when I switched the tab to pads, but had no success (hence my current idea).

 

Posté Tue 10 Jan 23 @ 7:03 pm
locoDogPRO InfinityModeratorMember since 2013
I'll think on it, I think it's a straight forward panel group problem, but I'll think on it anyway
 

Posté Tue 10 Jan 23 @ 7:38 pm
locoDogPRO InfinityModeratorMember since 2013
came back to his thread, just skin_panel_group your panels, turning one on will turn the others off.
 

Posté Sat 14 Jan 23 @ 8:34 pm
Thank you for the help Locodog, all is working great now. I have reverted to the original plan and have a separate panel displayed at the same location for each slot. It's a lot of duplicated code but works! I have retained the ON button as you suggested. It turns out that I was trying to set up an unneccesary layer of variables....

I had a weird issue though...
The pads/fx areas are defined on left and right decks, but when I switched to 4 deck mode the slots were not populated with any data on decks C and D (and I couldn't select anything either). After much head scratching I solved it by loading a default skin then switching back. It hasn't happened since, but I have no idea why it happened. I probably need to set up some INIT variables?
 

Posté Wed 18 Jan 23 @ 11:46 am