The UIS1 Tutorial

NOTICE TO SOFTWARE DEVELOPERS

The Skinning Languages used by WindowBlinds (UIS1 and UIS2) are the intellectual property of Stardock Corporation. Unlicensed use of them is strictly prohibited. Prohibited uses include but are not limited to reading WindowBlinds skins into an unlicensed product, converting UIS skins from UIS to another unlicensed skin language or format, or using portions or components of UIS (such as the unique button graphical layout or keywords of UIS) for unlicensed use.  If you are interested in obtaining a license to use UIS in your software please contact directskin@stardock.com

Our first skin will be really simple. To do it all we need is Notepad and MS Paint which comes with Windows.

As you get the hang of things, you can make it more complicated.  For fun, let’s make Windows look like Windows 3.1? Remember Windows 3.1? It looked like this:

Look carefully at this picture. Think about how the user interface can be broken into pieces. You have the title bar and the borders of the window. Then you have the title bar buttons. Then you have the push buttons.

WindowBlinds works this way. A skin is a collection of bitmaps (.bmp files) and a skin file (.uis). The .uis file tells WindowBlinds where and how to use those bitmaps.

Step 1: Create a directory called Windows31

Now that you’ve installed WindowBlinds go to your \program files\object desktop\windowblinds directory. Create a directory called Windows31.  This is where our skin is going to be stored.

Step 2: The Frame of your Window

If you’re making a skin where the interface already exists (such as Windows 3.1) then just find some screenshots of it and load it into your favorite paint program. If you have an original design, then you can make a mockup. Let’s start with the Horizontal border of the window:

WindowBlinds reads the bitmaps in a very specific way.  In the case of UIS1 on the horizontal borders, it reads Active and InActive bottom border (hence the two skinny borders at the top of the image) and then the Active and Inactive title bars.

Let’s map that out:

So now we have a bitmap that contains the top and bottom parts of a typical window. Save this bitmap as horizontal.bmp

Now we need to make the vertical ones. This is a bit easier. Save this one as vertical.bmp.

Here it’s Active left border, InActive left border, Active Right Border, InActive right border. They’re all the same in this example.

Note that borders of windows need to be 4 pixels in width.  By default, the title bar needs to be 23 pixels in width (they can be any size you want but to keep our example simple, we’ll stick with the default). If you look at the sample you’ll find that the ho

Step 3: Putting buttons on your title bar

Without title bar buttons, your UI won’t be able to do much. You need a minimize button, a maximize button, and a close button.

Minimize. Up state, down state, and disabled state.

Maximize. Up state, down state, and disabled state.

Close . Up date, down state, disabled state.

But we’re forgetting one other button – the restore button. That’s what shows up when you maximize a window.

That’s the up state, down state, and disabled state.

Now we have all the graphics we need to create a very simple skin.  So let’s now create the .uis file.  We’ll call it Windows31.uis and put it in that directory we created along with the bitmaps we created.

A WindowBlinds UIS1 skin in its most basic form is made up of 4 main sections. These sections have []’s around them.

These sections are:

[TitleBarSkin]
This is where you name your skin and give yourself credit along with including a preview for users.

[Borders]
That’s the part we just created

[Caption]
This is the part where we explain how the title bar is configured.

[ButtonX]
This is where we define the title bar buttons where X is which title bar button.

Here’s our skin:

; Example WindowBlinds skin
; Use semi-colons to comment.

[TitlebarSkin]
SkinName = Windows31
SkinAuthor = You
ActiveTitle=Windows31\horizontal.bmp

[Borders]
vertFrame = Windows31\vertical.bmp
HorzFrame = Windows31\horizontal.bmp
TopTopHeight = 24 ;start tiling 24 pixels from top.
TopBotHeight = 24 ;from bottom.
LeftTopHeight = 24 ;from top left (downwards)
LeftBotHeight = 24 ;from bottom left (upwards)
RightTopHeight = 24 ;from top right
RightBotHeight = 24 ;from bottom right
BottomTopHeight = 24 ;from the bottom in on right
BottomBotHeight = 24 ;from the bottom in on the left (yea, these could be named better)

; We want our title bar text to be moved over from the left
; by 30 pixels and there are 4 title bar buttons.

[Caption]
TextLeftShift = 30
ButtonCount = 4

; Our close button

[Button0]
XCoord = 0
YCoord = 3
Align = 0 ; align from left
Action = 0 ; close the window
ButtonImage = Windows31\sys.bmp
Visibility = 0 ; always show it.

[Button1]
XCoord = 19
YCoord = 4
Align = 1 ; align from right
Action = 1 ; maximize the window
ButtonImage = Windows31\max.bmp
Visibility = 20 ; show only if there is a maximize button.

[Button2]
XCoord = 38
YCoord = 4
Align = 1
Action = 2 ; minimize the window
ButtonImage = Windows31\min.bmp
Visibility = 22 ; show only if there is a minimize button

[Button3]
XCoord = 19
YCoord = 4
Align = 1
Action = 1 ; restore the window
ButtonImage = Windows31\restore.bmp
Visibility = 3 ; show only if there is a restore button.

That's it! That's all it takes.

All done!

That’s it. We have our skin.  Now go to your Display Properties dialog and choose the Skins tab (if you have Windows XP go to your appearance tab) and you should find a Windows 3.1 skin listed. Apply it.  It’ll look something like this:

The completed skin can be found here.

(c) 2002 Stardock.net