Ingreso rápido:  

Forum: VirtualDJ Skins

Tema: Single button with click-conditional graphic and action

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

Hi everyone, i'm trying to code a .xml for a personal skin based on the pads of numark ns7II.
I need to implement the code of the 5 pad selector buttons.
My wish is that each graphic button works the way below:

[i did a sketch image to illustrate the schematic but for some reason, i didn't get permit to post it here]

Starting from unselected button;
It will have a specific graphic when cursor is over;
Another one when it is clicked;
Then two other ones to indicate each if the button was activated with the leftclick or rightclick;
Other two ones to indicate each the over-selected, depending on which click was used to activate it;
Finally other two ones to indicate each the down-selected, again depending on which click was used to activate it.

This button will show two different panels, one when it is clicked with the leftbutton and another when it is clicked with the rightbutton.


<button action="skin_panel 'HOT_CUES' on" rightclick="skin_panel 'LOOP_CUES' on" dblclick="nothing" panel="HOT_CUES">
<pos x="+92.5" y="+24.5" width="65" height="20"/>
<off x="87.5" y="1180"/>
<over x="87.5" y="1205"/>
<down x="87.5" y="1230"/>
<on x="87.5" y="1255"/>
<overselected x="87.5" y="1280"/>
<downselected x="87.5" y="1305"/>
<tooltip>Select HOT CUES\nRight click to select LOOP CUES</tooltip>
</button>


The code above shows the graphic behavior only for leftclick. Where and how do i make it consider a different graphic for rightclick?

Thanks all.
 

Mensajes Thu 17 Sep 15 @ 7:35 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
You need to create an additional button when the LOOP_CUES panel is selected.
So you need something like..
<button action="skin_panel 'HOT_CUES' on" rightclick="skin_panel 'LOOP_CUES' on" dblclick="nothing" panel="LOOP_CUES">
..
graphics when the LOOP_CUES is selected
..
</button>
 

Mensajes Thu 17 Sep 15 @ 11:56 pm
Thanks Djdad, but...

I made a mistake. Let's consider all 5 buttons will be always visible. So i presume it's not a rule they need to be placed in a panel and the definition panel would be removed. They will control the visibility only of the PADs and the PARAM. buttons.
Then let's take the HOTCUES/CUELOOPS pad selection button as example:

In there region where it will be drawn, there will be only 1 button with action set for both: left and right clicks, or can i put 2 buttons in the same place (1 with only leftclick action and another with only rightclick action)? I guess the second option would mess the button visual, showing the graphic not properly...

Another question: How do you test unfinished (or pieces of) xml codes?

Thanks again.
 

Mensajes Fri 18 Sep 15 @ 2:23 am


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