Quick Sign In:  

Forum: VirtualDJ Skins

Topic: How to make round sliders knobs really act like rotating knobs

Dieses Thema ist veraltet und kann veraltete oder falsche Informationen enthalten.

NicotuxHome userMember since 2014
As round sliders are working as horizontal + vertical sliders, not the natural way, I found it usefull to simulate it.
This woking mode was removed some years ago, and will badly not affect sliders in effect GUIs
IMO this would at least be an option to round sliders, double linear slider instead of a circular one is not easy to use, specially with touch screens

Circular sliders are already working this way thus simply display the round one and take the action from the circular one.
the script takes knob from default skin as an example, may have to adjust
Of course, as in old skin, slider have to define twice:

<panel class="knob" x="+0" y="+0">
<!-- add this one - no need clicks they are ignored -->
<slider action="gain" frommiddle="true"/>
<slider action="gain" dblclick="gain 50%" rightclick="match_gain" frommiddle="true"/>
<textzone><text action="gain_label"/></textzone>
</panel>

there are better ways ... specially using placeholders in a way to prevent double call, fixes and optimization are welcome

the code:

<define class="knob" placeholders="textsize=11,textbelow=+43,textleft=-5,textwidth=56>
<!--slider orientation="round" - MADE INACTIVE -->
<slider orientation="round" clickthrough="true" >
<pos x="+0" y="+0"/>
<size width="46" height="46"/>
<off width="38" height="38" shape="circle" color="knobcolor1" color2="knobcolor2" gradient="vertical" border="bordercolor" border_size="2"/>
<fader color="#848484" width="2" height="15" radius="2" anglemin="-130" anglemax="130"/>
<fill width="46" height="46" radius="18" color="knobfill" backcolor="faderback"/>
</slider>
<!-- added to mimic knob -->
<slider orientation="circle" relative="no">
<pos x="+0" y="+0"/>
<circle direction="cw" anglemin="-135" anglemax="135" />
<size width="46" height="46"/>
</slider>
<!-- end of hack -->
<textzone>
<pos x="[TEXTLEFT]" y="[TEXTBELOW]"/>
<size width="[TEXTWIDTH]" height="15"/>
<text fontsize="[TEXTSIZE]" weight="" color="textoff3" align="center" important="true"/>
</textzone>
</define>

 

geposted Tue 15 Oct 19 @ 3:33 pm


(Alte Themen und Foren werden automatisch geschlossen)