Quick Sign In:  

Forum: VirtualDJ Skins

Topic: placeholder question
locoDogPRO InfinityModeratorMember since 2013
This is pretty stock I added rclksel as a placeholder, but the whole thing feels like it's been done unintuitive to how I understand placeholders

TL:DR version the actual placement explains how I thought it could work
but I get literal "effect_active [SLOT]" as my command

<define class="fxdropshort" placeholders="action1,action2,textaction,rclksel">
<button x="+0" y="+0" action="[ACTION1]" rightclick="temporary" scroll="[ACTION2]">
<size width="132-40" height="26"/>
<off color="dropdown" shape="square" border="bordercolor" border_size="1"/>
<over color="dark" shape="square" border="bordercolor" border_size="1"/>
<on color="buttonon" shape="square" border="bordercolor" border_size="1"/>
<text color="textoff3" colorover="textover" colorselected="texton" dx="5" width="131-40-5-5-26" fontsize="11" align="left" weight="" action="[TEXTACTION]" important="true"/>
</button>
<button x="+132-40-26" y="+0" action="[ACTION2]" rightclick="[RCLKSEL]" novisibility="[ACTION1]">
<size width="26" height="26"/>
<icon sysicon="chevrondown" coloroff="textdarker" colorselected="texton" colorover="textover" colordown="texton" width="16" height="16" important="important"/>
</button>
<button x="+132-40-26" y="+0" action="[ACTION2]" rightclick="[RCLKSEL]" visibility="[ACTION1]">
<size width="26" height="26"/>
<icon sysicon="chevrondown" coloroff="texton" colorselected="textover" colorover="textover" colordown="texton" width="16" height="16" important="important"/>
</button>
<line color="bordercolor3" x="+132-40-26" y="+0" width="1" height="26" novisibility="[ACTION1]"/>
<line color="darker" x="+132-40-26" y="+0" width="1" height="26" visibility="[ACTION1]"/>
</define>


<panel class="fxdropshort" x="+34" y="+50-13-37" rclksel="effect_show_gui 1" action1="effect_active 1" action2="effect_select 1" textaction="get_effect_name 1 & param_uppercase"/>


Why isn't this how it's done


<define class="fxdropshort" placeholders="slot">
<button x="+0" y="+0" action="effect_active [SLOT] " rightclick="temporary" scroll="effect_select [SLOT] ">
<size width="132-40" height="26"/>
<off color="dropdown" shape="square" border="bordercolor" border_size="1"/>
<over color="dark" shape="square" border="bordercolor" border_size="1"/>
<on color="buttonon" shape="square" border="bordercolor" border_size="1"/>
<text color="textoff3" colorover="textover" colorselected="texton" dx="5" width="131-40-5-5-26" fontsize="11" align="left" weight="" action="get_effect_name [SLOT] & param_uppercase" important="true"/>
</button>
<button x="+132-40-26" y="+0" action="effect_select [SLOT] " rightclick="effect_show gui [SLOT]" novisibility="effect_active [SLOT]">
<size width="26" height="26"/>
<icon sysicon="chevrondown" coloroff="textdarker" colorselected="texton" colorover="textover" colordown="texton" width="16" height="16" important="important"/>
</button>
<button x="+132-40-26" y="+0" action="effect_select [SLOT]" rightclick="effect_show_gui [SLOT]" visibility="effect_active [SLOT]">
<size width="26" height="26"/>
<icon sysicon="chevrondown" coloroff="texton" colorselected="textover" colorover="textover" colordown="texton" width="16" height="16" important="important"/>
</button>
<line color="bordercolor3" x="+132-40-26" y="+0" width="1" height="26" novisibility="effect_active [SLOT]"/>
<line color="darker" x="+132-40-26" y="+0" width="1" height="26" visibility="effect_active [SLOT]"/>
</define>



<panel class="fxdropshort" x="+34" y="+50-13-37" slot="1"/>
 

geposted Wed 18 Oct 23 @ 7:23 pm
locoDogPRO InfinityModeratorMember since 2013
Edit, oh it's missing a *, it can work like I thought.
 

geposted Wed 18 Oct 23 @ 8:04 pm
locoDogPRO InfinityModeratorMember since 2013
Well that leads me to another question.
I see bits of default pro that could have leaned into placeholders a lot more and it would save a lot
like
knob_modern_small & knoboff_modern_small, for FX are always placed as a pair so I wrote a parent class to call the two with all the actions defined
<define class="knob_modern_small_fx" placeholders="*slot,*dial">
...knob_modern_small stuff...
...knoboff_modern_small stuff...
</define>

Then calling is a single line
<panel class="knob_modern_small_fx" x="+132" y="-3" slot="1" dial="1"/>

Is there any performance difference? or maybe it was wrote as it is now for a reason not performance related; easier to write with macros, regex , or maybe just written so working out a skin isn't a class in a class in a class confusion for users like me.
 

geposted Wed 18 Oct 23 @ 10:17 pm