Accesso rapido:  

Forum: VirtualDJ Skins

Topic: textzone computed pos with placeholders

Questo argomento è obsoleto e potrebbe contenere informazioni obsolete o errate.

NicotuxHome userMember since 2014
placeholders computing in position parameters of a textzone :
Syntax looks correct but skin will not load

<define class="textbox" placeholders="*index,*label">
<textzone x="+74" y="+40*[INDEX]+30" width="80" height="33">
<text format="[LABEL]" align="left" color="white" size="20"/>
</textzone>
</define>

This one work but textzone is embedded in an extra panel to workaround:

<define class="textbox" placeholders="*index,*label">
<panel y="+40*[INDEX]+30">
<textzone x="+74" width="80" height="33">
<text format="[LABEL]" align="left" color="white" size="20"/>
</textzone>
</panel>
</define>


This indicates computing stems is not allowed in y (and x) parameters of a textzone

 

Inviato Sun 21 Mar 21 @ 1:16 pm
How do you call the first code example ?
I guess you call it as a panel, right ?
If so, you forgot to pass the placeholders from the panel, to the textzone:


<define class="textbox" placeholders="*index,*label">
<textzone placeholders="*index,*label" x="+74" y="+40*[INDEX]+30" width="80" height="33">
<text format="[LABEL]" align="left" color="white" size="20"/>
</textzone>
</define>
 

Inviato Sun 21 Mar 21 @ 10:23 pm
NicotuxHome userMember since 2014
Yes called from panels. In reality these are set of checkboxes (exactly the same that exist in "stems controllers" remote skin, but computed and drawn instead of bitmap in place)

<define class="checkbox" placeholders="*index,*setting,*label=[SETTING]">
<button x="+31" y="+40*[INDEX]+30" width="33" height="33" action="setting resetStemsOnLoad '[SETTING]'">
<off shape="square" border="gray" border_size="2" color="white"/>
<textselected fontsize="22" color="black" text="✔"/>
</button>
<panel y="+40*[INDEX]+30">
<textzone x="+74" width="80" height="33"><text format="[LABEL]" align="left" color="white" size="20"/></textzone>
</panel>
</define>
...
<panel class="checkbox" index="0" setting="All"/>
<panel class="checkbox" index="1" setting="pads" label="Pads Only"/>
<panel class="checkbox" index="2" setting="No"/>

using directly <textzone x="+74" y="+40*[INDEX]+30"...
simply makes the skin not loading; if a parameter was missing it would just display wrongly

what is strange : because you tell me "you forgot to pass the placeholders from the panel" even it's not the case it make me think about something : maybe the value is the problem
Adding a default value (unused though) to "index" placeholder fixed the issue ^^
(maybe the word "index" is an unexposed existing parameter or keyword)

placeholders="*index=0,*setting,*label=[SETTING]"


anyway thanks, i found a solution :)

As you can see, exact same sequence is used in button just above, where it was working correctly
(just remove the textzone and the skin loads so that "index" may not be the reason)
 

Inviato Sun 21 Mar 21 @ 11:25 pm
AdionPRO InfinityCTOMember since 2006
Perhaps you used the class somewhere without adding index then?
(Since without default value and without being defined when applying the class, it would not be replaced by 0 but by nothing, ending up with y="+40*+30" for example)
 

Inviato Mon 22 Mar 21 @ 7:05 am


(Vecchi argomenti e forum sono automaticamente chiusi)