Se Connecter:     


Forum: VirtualDJ Skins

Sujet: Change colour of visual for use as button?

Ce topic est ancien et peut contenir des informations obselètes ou incorrectes.

I know it's possible to define blocks (squares/rectangles) of colour for a skin by using visual type="color" source="constant '#252525'" then specifying its position and size...

....but is there a way of changing the specified colour of these visuals for off/on/over and so on?

I'm thinking about using it for buttons. Rather than having to draw bitmaps in different colours and pointing the skin XML to their x/y coordinates, it would be useful to have the software do the drawing and changing of colours when selected, hovered over and so on.
 

Posté Sat 24 Oct 15 @ 12:58 pm
You can but you'll have to code them individually using "visibility=..."
 

How exactly, for (say) a play button?

Assuming the visibility would use a variable, how does one determine if the mouse is over the button, or if the button is active (pressed)?
 

Ah yes, it won't work for over I don't think. But you could could use:

visibility="play ? on : off" for when playing
visibility="play ? off : on" for when not playing
 

Thanks. I shall perform experiments in the lab.
 

Actually you may need

pause ? On : off

When the track is not playing
 

keep in mind that if you follow this path (creating visuals with visibility instead of using graphics) you will end up with a "heavy" skin. I would still recommend drawing graphics and using visuals only to add something to an existing skin to avoid dealing with the png.
 

You mean it's more CPU (or GPU) intensive? It makes the skin slower?

The 'VDJ 8 but by FRUiT' skin uses this method extensively to draw the skin background and I don't recall anyone complaining about problems.
 



(Les anciens sujets et forums sont automatiquement fermés)