circular buttons - feature request

About usage, announcement and development of skins for VLC
xanax

circular buttons - feature request

Postby xanax » 30 Nov 2005 13:49

Hi guys.

In VLC, can we create non-rectangular buttons ? Buttons that follow a curve for example ?
Have a look :

Image


As you can see, the buttons are sticked to each other and they follow a curve (here : a circle). I could save each button but they would all have a little part (on their images) of the next buttons that "touch" them.

In order to solve this, Windows Media Player 10 skins use "maps". I mean, buttons can follow every kind of shape (curves for example) and these buttons' images have a non-clickable area, wich is also the transparency color.

To know the bordershape of each real clickable button, a map is used with 4 different colors (in the following example) and this way, the skin knows where texactly he interesting image is : only the pixels that are inside the map.

Example :

Image

Image


But for VLC, we could simply declare that areas with transparency
(in my case : a pink RGB 255-0-255) called alphacolor="ff00ff" would not be "clickable".

Image
Image
Image
Image

And of course, for these images, their coordonates would start from the upper-left corner (even if it's in the pink) and not from the upper-left pixel inside that image.

What do you think of this feature request? This would allow every kind of designs.
PS : i don't know if it's already supported but that's what I need for my current skin in progress...

ipkiss
Big Cone-huna
Big Cone-huna
Posts: 695
Joined: 23 Nov 2003 01:49

Postby ipkiss » 30 Nov 2005 14:38

This should already be working.

To know if a click is on a particular button, the button asks to its current image if the click "hits" a non-transparent part of the image. If so, the click is "given" to the button, otherwise it goes on with the next control (controls are layered according to their order in the XML, so the last one defined is also the topmost control).

The maps would only be needed if we wanted the "active" part of the button to be different from the image of the control... which is a quite uncommon need, i would say :)


Return to “Skins”

Who is online

Users browsing this forum: No registered users and 56 guests