Ingreso rápido:  

Forum: VirtualDJ Skins

Tema: Call controller var from skin
Hi,

I'm working on a custom mapping for a controller (Launch Pad X) and a custom skin.
Now I would like to use a button in my mapping to manipulate elements in my skin.
Specifically, I want to use a button on my Launch Pad to quickly switch the browser on and off.

I am able to toggle a var (1/0) from the Launch Pad, but I'm not sure how to check this var from my skin. I'm not even sure if this is something that would be possible in the first place..

Controller:
var_equal '$myVar' 1 ? set '$myVar' 0 : set '$myVar' 1

Skin:
<browser visibility="`var_equal '$myVar' 1 ? 100% : 0%`">

Maybe I need so some sort of in-between logic to call this conrtoller var from my skin?

Thanks in advance!
 

Mensajes Sun 31 Jul 22 @ 10:10 am
AdionPRO InfinityCTOMember since 2006
<browser visibility="var '$myVar'">

should work I think

(and you can also use toggle to switch a var between on and off for easier use)
toggle '$myVar'


visibility does not require backtics (`) to use actions, but it may have been thrown off by the 100% inside to think that it was a simple fixed value instead of a script
 

Mensajes Sun 31 Jul 22 @ 10:17 am
Cool, thanks! Works indeed.
In the meantime I found skin_panel to toggle an entire panel, but your solution is much more flexible.
 

Mensajes Sun 31 Jul 22 @ 10:41 am