|
Now that we have the edges looking good, we need to add the titlebar buttons
so that the skin will be functional. Just to keep things simple, we will put
the buttons in the same place that Windows uses (top-right). This is not
necessary. In fact WindowBlinds allows the skinner to put the buttons
anywhere he/she feels like. Some skins look better with the buttons on the
side or on the bottom. The most important part is that it looks good and is
useable.
Enlarged close.bmp |
Enlarged max.bmp |
|
In the tutorial.zip
you will find several titlebar buttons. I have enlarged two of them
here to make a point. These graphics are really 6 different images in 1. The
first 3 are used for the active window and the last 3 for the inactive
window. How many buttons you use is controled by the attribute:
There are two options, and they are pretty self-explanitory. For this skin
use the Active AND inactive - 6 buttons in image value (as I described
above). The other value means that there will only be 3 images in the file
and they will be used for both active and inactive windows.
You will see that for this skin the inactive buttons will
use the transparent color. This means that the only buttons that will be
visible will be on the active window. When you make the active and inactive
windows very similar, you should do something to make the active window
stand out.
So what do the images mean?
- [1] default image
- [2] pressed image
- [3] mouseover/disabled image
- [4] inactive default image
- [5] inactive pressed image (not used)
- [6] inactive mouseover/disabled image
If you are using the Active state only - 3
buttons value for the Titlebar Button Type attribute, the image
functions use the first three.
Mouseover/disabled image? Yes, we need to set another
Personality attribute to tell WindowBlinds whether we want to use mouseover
or display the disabled image. More on this later. For now set:
- MouseOver effect = Enabled
It might not be listed in your personality section. If
not, then do you remember how to add an attribute? Just add this one.
(hint: right-click in the Attribute window, find the Mouseover attribute,
then click OK)
Well now that we have these graphics, how do we add them to the skin?
"Insert -> Button" will bring up a dialog window like the one
shown on the right. In this window you can see all the attributes for each
button. Good thing we don't need them all. Make sure there is a checkmark to
the left of the following attributes:
- Horizontal Offset
- Vertical Offset
- Button Alignment
- Action on Click
- Visibility Setting
- Titlebar Button
Then click the OK button. A number of things happen when
a button is added. Back in the Personality section an attribute called
Number of buttons is incremented. (from zero to one). You should
never have to change this yourself while in SkinStudio. In fact if you
change this attribute, it could cause problems. You have been warned!
There is also a subsection under Buttons that says Button0.
This is where we will set up the attributes for the close button. If this
new subsection isn't active, then click it.
First, set the Button alignment to
"relative to the top right of window". That establishes our reference
point. Then set the Horizontal offset to 22, and the
Vertical offset to 8. The Action on click
should have defaulted to "Close window", which is fine. And lastly,
set the Button Image to the "Close.bmp" like you did
with the image drop-down lists before. Now hit REFRESH.
Now our preview has a small X in the corner, with a
blinking dotted line around it. If the border isn't blinking, then click on
the X and it will. A blinking border means that button is active. You can
drag it to another position on the frame with your mouse, or use the
ARROW KEYS to have better control. When you are done playing
make sure that it is back to (22,8).
Now, lets add the Maximize Button. There is a floating
dialog box near the bottom of the screen that looks like the graphic at the
right. If you closed that window, HIT F4 to bring the window back (F4
toggles that window for you, because it sometimes gets in the way.) At the
top left of that window is an "Add Button" button. Push it now to see
the Add Button dialog as before. You know what attributes we need, so make
sure they are check-marked and hit OK.
These are the values that we need for each of the
attributes. Most are understandable. But make sure to scroll down to find
the right ACTION value.
- Horizontal Offset = 32
- Vertical Offset = 8
- Button Alignment = relative to the top right of window
- Action on Click = Maximize Button - with MouseOver
- Titlebar Button = tutorial\max.bmp
There are two different values
for the maximize action. One supports mouseover, and the other doesn't.
If mouseover isn't active, then the third image is the disabled image. To
show you what I mean, look at the close buttons on the SkinStudio
application window. One is active and the other is disabled. So you have to
decide if you want the mouseover or the disabled functionality. (I prefer
mouseover).
If you want to add more buttons, go ahead. The
more you play, the more you learn. I have included titlebar buttons for
minimize and restore, but we'll add those later. For now, as far as
MINIMIZE and ROLLUP, let's set those a little
differently. Go back to the Personality attributes. We want to
add Mouse Action - Right Click and Mouse Action - Double click
We want the actions to be:
- Mouse Action - Right click = Rollup/Unroll window
- Mouse Action - Double click = Minimize window
The basic elements are now complete. For the most part,
this is a functional skin. However, we still need to modify the menu bar
and add some button images to the skin. So save your work and take a break
now. But don't go too far away
Continue on to Menus.

|