Sign In:     


Forum: VirtualDJ Skins

Topic: Skin text action; visibility or visual?
Hi,

Making progress and having fun with skin design. I have a complex little visual to make.

A text the is poping up when deck 1 is playing.
The text is show the BPM value.
The text is white when the deck is not in master mode.
The text is orange when the deck is in master mode.
The text is off when deck 1 is not loaded (is this a visual or a visibility?)
(in the SDK text is not mentioned under the visual)
The text has an orange square behind it when deck 1 is playing.

Can this al be made with 1 element?

mvg,
Marcel
 

Posted 2 days ago @ 6:52 pm
Sounds possible as a button.
 

yes, i have seen it as button, but there is no action performed by this visual box.

I can make this out a few elements with the option visibility, but the SDK manual dont mentioned this
as preferred. (i should use a visual element).
 

your button could have action="nothing" and then have query="..." to trigger on/off logic. Whole thing having visibility="loaded"
 

Thnx loco,

I am also trying to show a text on the skin when a button is clicked and a other text when the button is
clicked once again. Cycle with a button to time remain vs. time elapsed.

This is my code, but don`t work. (First time fiddling out with variables)

<button action ="toggle '$timedisplay'">
<pos x="10" y="1590-10-230+80"/>
<size width="260" height="150"/>
</button>
<textzone visibility="var_equal '$timedisplay'">
<pos x="20" y="1590-10-230+90"/>
<size width="110" height="40"/>
<text fontsize="30" color="#ffffff" align="right" weight="bold" text="REMAIN"/>
</textzone>
<textzone visibility="var_not_equal '$timedisplay'">
<pos x="20" y="1590-10-230+90"/>
<size width="110" height="40"/>
<text fontsize="30" color="#ffffff" align="right" weight="bold" text="ELAPSED"/>
</textzone>

any clue?
 

For your original request...
Use a button with action="play" (or action="nothing" and query="play" if you dont want this clickable)
With this ^, you can have <off> graphics with white border and <on> graphics with orange border.

For texts, you can use <text> with some pre-defined color and <textselected> with some other pre-defined color>, but i would suggest a single <text> with a color="" having an action.



<button action="nothing" query="play" >
<off color="black" border_size="1" border="white"/>
<on color="black" border_size="1" border="orange"/>
<text .... color="`masterdeck ? color 'orange' : color 'white'`" action="get_bpm" /> <!-- Notice the use of backtilts to include an action instead of text/pre-defined colors -->
</button>
 

Perhaps you could tell us what you want to achieve, because it would be easier for us to assist.
In your Elapsed/Remain code above, i see the button overlapping the textzone.
Is the Pioneer Time Display style you want ?

If so, put the <textzones> first in your code, then follow with a <button> (without graphics) and just an action to toggle elapsed/remain

Also, the 2 textzones can be a single one, if you just change the "static" text="" with an action, like
<text .. action="var '$timedisplay' ? get_text 'ELAPSED' : get_text 'REMAIN'"/>


Also you can combine a button without graphics and a textzone, by either using a <textzone with action="toggle Z " or a single button with the same action and as above have an action="" inside the <text>
 

Yes indeed the Pioneer time display. The image is what i have make so far.
My idea was to overlay a transparant button over the time display so i can click it to show
Remain or Elapsed. I tought i had to do this with variables.

 

Tip : avoid to toggle a variable and use action="display_time 'remain,elapsed'" instead.

Put your textzones for ELAPSED/REMAIN/TIME etc using visibility or query display_time 'elapsed' or [code]display_time 'remain'[/script]
For your ELapsed/Remain Time textzone, just use get_time

then after the textzones, add a button covering the entire area (texts, times etc) with action="display_time 'remain,elapsed'" without any graphics
 

djdad wrote :
Tip : avoid to toggle a variable and use action="display_time 'remain,elapsed'" instead.

Put your textzones for ELAPSED/REMAIN/TIME etc using visibility or query display_time 'elapsed' or [code]display_time 'remain'[/script]
For your ELapsed/Remain Time textzone, just use get_time

then after the textzones, add a button covering the entire area (texts, times etc) with action="display_time 'remain,elapsed'" without any graphics


Hi this code did the job for me.

But a question i.r.t. to get used to verbs.

What is the reason that my code don`t work with variables? In general wheater i use toggle, cycle or set; is the scripting with the verbs not correct?

Why its better to not use toggle with verbs?


Thnx. Gr. marcel
 

Wrong tool for the job, you can dig a hole with a spoon but it's not the best way.
As a scripter I dislike the overuse of vars in skins, exactly the same thing can be done with skin_panel queries with persistence, without populating the var_list
 

locoDog wrote :
Wrong tool for the job, you can dig a hole with a spoon but it's not the best way.
As a scripter I dislike the overuse of vars in skins, exactly the same thing can be done with skin_panel queries with persistence, without populating the var_list


Ok, by this you mean you are breaking the skin up in as many panels you can by grouping things/elements in your design?

But verbs work good with controller/keyboard scripting?


 

djdad wrote :
For your original request...
Use a button with action="play" (or action="nothing" and query="play" if you dont want this clickable)
With this ^, you can have <off> graphics with white border and <on> graphics with orange border.

For texts, you can use <text> with some pre-defined color and <textselected> with some other pre-defined color>, but i would suggest a single <text> with a color="" having an action.



<button action="nothing" query="play" >
<off color="black" border_size="1" border="white"/>
<on color="black" border_size="1" border="orange"/>
<text .... color="`masterdeck ? color 'orange' : color 'white'`" action="get_bpm" /> <!-- Notice the use of backtilts to include an action instead of text/pre-defined colors -->
</button>


Very valuable instruction!!

 

Marcel mdg wrote :
djdad wrote :
For your original request...
Use a button with action="play" (or action="nothing" and query="play" if you dont want this clickable)
With this ^, you can have <off> graphics with white border and <on> graphics with orange border.

For texts, you can use <text> with some pre-defined color and <textselected> with some other pre-defined color>, but i would suggest a single <text> with a color="" having an action.



<button action="nothing" query="play" >
<off color="black" border_size="1" border="white"/>
<on color="black" border_size="1" border="orange"/>
<text .... color="`masterdeck ? color 'orange' : color 'white'`" action="get_bpm" /> <!-- Notice the use of backtilts to include an action instead of text/pre-defined colors -->
</button>


Very valuable instruction!!