Ingreso rápido:  

Forum: VirtualDJ Skins

Tema: get_sample_color help

Este tópico es antiguo y puede contener información incorrecta para la nueva versión.

djkrysrPRO InfinityMember since 2010
Hi
I am trying to do a remote skin with sample buttons and am trying to get the button to be the color assigned to the sample but can't work out what I am doing wrong.

I have defined a basic class
<define class="samplepad" >
<visual type="color">
<pos x="+0" y="+0"/>
<size width="150" height="120"/>
</visual>
<button >
<pos x="+0" y="+0"/>
<size width="150" height="120"/>
</button>
<textzone>
<pos x="+10" y="+55"/>
<size width="130" height="20"/>
<text size="20" align="center" weight="bold"/>
</textzone>
</define>

then use it like this
<panel class="samplepad" x="+0" y="+0">
<visual source="sampler_loaded 1 ? get_sample_color 1 : constant '#888888'"></visual>
<button action="sampler_pad 1"></button>
<textzone><text action="get_sample_name 1"/></textzone>
</panel>

but the button background is always black (I have also tried just 'sampler_color 1' but that has the same result.

Any help would be greatly appreciated.
 

Mensajes Wed 19 Sep 18 @ 5:42 pm
Basically you draw your button on top of your visual with the exact same position and dimensions.
This means that the button graphics will always hide your color visual.
You need to either reverse the drawing order (so that the visual draws on top of the button) or adjust the position and size of each element so that they don't overlap (or at least don't overlap completely)
 

Mensajes Fri 21 Sep 18 @ 11:45 am
djdadPRO InfinityDevelopment ManagerMember since 2005
Hmm, not sure about this.. the button doesn't have any graphics, so it shouldn't overlap the visual. Do you get the color if you remove the button ?
Can you try sampler_color 1 a instead of get_sample_color 1 ?
You can also troubleshoot by changing
<textzone><text action="get_sample_name 1"/></textzone>
with
<textzone><text action="get_sample_color 1"/></textzone>
and see if you get its color as text.
 

Mensajes Fri 21 Sep 18 @ 2:00 pm
djkrysrPRO InfinityMember since 2010
Hi DJ Dad

Removing the button makes no difference.
However most telling is if I change the textzone as you suggested to

<textzone><text action="get_sample_color 1"/></textzone>

the text field is blank (I did make sure the sample had a color).

I also tried <text action="sampler_color 1"/> that resulted in nothing also.
 

Mensajes Sat 22 Sep 18 @ 2:56 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
Is this also the case with a default sampler bank, such as the Instruments bank ?

Edit: Ah you are making s remote skin, i wonder if this has to do anything with your issue, i ll have a look here too
 

Mensajes Sun 23 Sep 18 @ 9:02 am
djkrysrPRO InfinityMember since 2010
Hi
It won't get the color on any of the banks, including the pre-existing ones likes "Instruments".

I tried using the Remote Skin I had created as the main skin for VDJ and it works fine, with the button showing up as the color of the sample, so this must be related to Remote Skins only.
 

Mensajes Thu 27 Sep 18 @ 4:29 pm
AdionPRO InfinityCTOMember since 2006
The problem has been found, and it will be fixed in the next VirtualDJ update.
It was a problem with the way VirtualDJ sent color data to the remote.
 

Mensajes Thu 27 Sep 18 @ 4:31 pm
djkrysrPRO InfinityMember since 2010
Great thanks
 

Mensajes Fri 28 Sep 18 @ 1:48 pm


(Los tópicos y foros antiguos son automáticamente cerrados)