Ingreso rápido:  

Forum: VirtualDJ Skins

Tema: How can one set both, Visibility and Transparency of a skin button
Playing with the visibility of the buttons..

Have button in the waveform area.. would like it to visible when the deck is loaded..and when visible be at 50% transparency so one can still see the waveform through it...

Now with some trial and error:

visibility="deck 1 loaded ? true : false"
Works: is visible only when deck 1 is loaded, half way to the goal.


And working on the transparency:

visibility="0.5"
Works: is transparent so one can still see the waveform through it .. the other part that is wanted.


and if one tries to combine them:

visibility="deck 1 loaded ? 0.5 : 0.0"

Does NOT work .... why..

How can one have a button with NO visibility when deck not loaded .. and 50% transparency, when the track is loaded on the deck?
 

Mensajes Wed 13 Apr 22 @ 2:02 pm
Visibility in skin elements can be either an action or a number.
That's why the first two examples work.

In order to achieve what you want you need to use this:
visibility="deck 1 loaded ? constant 0.5 : constant 0.0"


The "constant" part of the script makes it return a number ;)
 

Mensajes Wed 13 Apr 22 @ 2:10 pm
wow that was so amazingly fast .... (takes me more time to make a selection, if making a phone call, yes faster then by phone). Virtual DJ has absolutely the best support ! !

and Thank you Phantom

you make it seem so easy ..

Awesome ! !
 

Mensajes Wed 13 Apr 22 @ 2:17 pm
Wondered if one can change the visibility of a button, dependent on the button's state?

ie: more visible when mouse is over button

Or more visible if button is down, etc

was unable to do this by adding visibility="" to the children of the button.
 

Mensajes Fri 15 Apr 22 @ 1:06 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
I believe you can use ARGB colors, like #40FF0000 which is like a semi transparent red
 

Mensajes Fri 15 Apr 22 @ 1:18 pm
Awesome !.. Thank you DJ Dad
 

Mensajes Fri 15 Apr 22 @ 1:26 pm
djdad wrote :
I believe you can use ARGB colors, like #40FF0000 which is like a semi transparent red


was great idea.. but seems skin ignores colors with 8 digit hex values. ie those with alpha.. and reverts to a default. (black for background and white for text)

-----
Update:
Was wondering .. is there something, a mode, that needs to enabled/set in the skin code, for it to read the alpha colors?
 

Mensajes Fri 15 Apr 22 @ 2:24 pm
locodogPRO InfinityModeratorMember since 2013
<square color="#40FF0000" x="100" y="100" width="700" height="700"/>

works as expected here here
 

Mensajes Fri 15 Apr 22 @ 3:02 pm
Thank you Locodog... for checking..

think there may have been something else with the tested button causing text, not to change color.

And I can get the borders and button background to display the alpha.

And so far have been unsuccessful with adding alpha to the text. Below is cleaned skin button: (from the likeness of the "vinyl" button on the Pro Skin)
<button action="nothing" visibility="true'">
<pos x="+100" y="+10"/>
<size width="50" height="21"/>
<off shape="square" color="buttonoff" border="bordercolor" border_size="1" radius="2"/>
<over shape="square" color="buttonoff" border="bordercolor" border_size="1" radius="2"/>
<down shape="square" color="buttonon_invert" border="bordercolor" border_size="1" radius="2"/>
<text fontsize="18" color="#000000ff" colorover="#30ff0000" colordown="deckcolor_invert" weight="bold" align="center" text="RBT" localize="true" important="true"/>
</button>


the text should be fully transparent blue color="#000000ff" and
when moused over, should be somewhat transparent red, colorover="#30ff0000"

and it is bright blue and changes to bright red when moused over .. somehow ignoring the alpha.

are there any obvious errors there?

can you get Text to take the alpha hexcolors?

I can get the entire button to be transparent (including text), using Phantoms code above. That is fixed and does not change on mouse over.

----------
I can get the
<over/>
<off/> and
<down/>
children to display correctly the alpha, on this button, (and the other button also).

---------
is there good starting point for a generic button to play with (modify). as needed?
would love to have one with all the bells and whistles, so could just mod it .. instead of by trial and error, seeing if something will work, and later finding, that only parts of it work, correctly. (as in case of the initially tested button, where the text color would not change as expected)
 

Mensajes Fri 15 Apr 22 @ 4:52 pm
Update:
fixed the original button I was testing.. text color changes as expected, now....
(I had the text color specified in 2 places)

still cannot get text to fade/almost disappear.. using the ARGB hexcolors.

 

Mensajes Fri 15 Apr 22 @ 6:15 pm