Académique Documents
Professionnel Documents
Culture Documents
SKINNING WINDOWS
skinned
windows
Why settle for the dull default of Windows Media Player when you can create your own
funky look? Re-skin the ultra-conservative player with any type of style that you want.
In this month’s PC Tutor we tell you how you can begin to go about it – and then leave
you to your imagination...
ersion 7 of Microsoft Windows Windows Media Player\Skins). Every skin behaviour of the skin using very simple
open tag.
A bare minimum skin consists of a theme
element containing a view element. Adding
a couple of attributes to the theme yields
the WMS file for the PCMAG_A skin:
<view Figure 2: Then add a progress bar and track title Figure 4: Finally, you can add slide-out panels for
backgroundColor=”none” information. playlist and equaliser controls.
backgroundImage=”pcmag.bmp”
transparencyColor=”#00FF00” hovering over them, perhaps by bright- <playelement mappingColor=”#808000”/>
titleBar=”false” ening the colours or adding a glow, then <nextelement mappingColor=”#00FFFF”/>
resizeable=”false”> save it as b_hover.bmp. Finally, take the <ffwdelement mapping Color=”#FF00FF”/>
hover image, offset its contents to the right <stopelement mappingColor=”#800000”/>
The transparency colour is a hexadeci- and down by one or two pixels and save < p a u s e
e l e m e nmt a p p i n Cgo l o r =
mal number, with two digits apiece for it as b_down.bmp. Of course you can use ”#008000”/>
red, green and blue. In this case, the num- other filenames if you prefer. </buttongroup>
ber re p resents bright green. Load the The mapping image consists of blobs of
PCMAG_B skin to see the result. It does- solid colour that define the areas occu- The left and top attributes locate the but-
n’t do anything, but you can right click for pied by button elements. The colour blobs tongroup within the view. Setting cursor to
menu options and drag the skin around the should be just big enough to cover the hand makes the cursor change into a hand
desktop. corresponding button in all of the other when over a button. Each standard button
images. Because the colour blobs aren’t vis- has a pre-defined element type; all that’s
BUTTONING UP ible, you’ll normally use simple primary needed is a mappingColor that matches
Every skin needs some or all of the stan- colours. Figure 1 shows the main and map- the button’s colour within the mapping
dard buttons (Rewind, Previous Item, Play, ping images used in our sample skins. To image. The sample skin PCMAG_C has
Next Item, Fast Forward, Stop and Pause). enable the group of buttons, insert a but- seven fully functional buttons.
The buttons need not be rectangular; their tongroup element within the view element
appearance is defined by five images. Four like this: LISTENING ATTRIBUTES
are pictures of the button panel in differ- Attribute values don’t have to be static
ent states and the fifth maps regions of <buttongroup things like co-ordinates and bitmap names.
the button image to button elements. left=”152” top=”20” You can create dynamic attributes that
First create a picture of the seven buttons image=”b_image.bmp” automatically change to match values with-
and save it as b_image.bmp. Now modify disabledImage=”b_disabl.bmp” in the WMP itself. These are called listen-
the image so it represents disabled but- hoverImage=”b_hover.bmp” ing attributes, and they require the wmp-
tons, perhaps by changing the colours to downImage=”b_down.bmp” prop keyword. Inserting the following pro-
grey or drawing big red Xs through them, mappingImage=”b_map.bmp” g r e ss b a r e l e m e n t j us t af te r t h e
and save that as b_disabled.bmp. Load the cursor=”hand”> </buttongroup> close tag adds a bar that
original image and modify it to represent <rewelement mappingColor=”#FF0000”/>tracks how much of the current clip has
the buttons when the mouse pointer is <prevelement mapping Color=”#FFFF00”/> played.