The INI file / [all] section
The INI file is a plain text file that determines how
cFos and
cFosSpeed displays status information on screen. Let's just name ours
skin.ini and save it to
MySkin, a new folder we should first create as a subdirectory of the
cFos or
cFosSpeed main directory (e.g.,
C:\Program Files\cFosSpeed\MySkin). The new INI file must contain an
[all] section listing version information, a skin name and background definition, much like the one shown below:
[all]
version=cFosSkin V1.0
name=MyFirstSkin
background=back.bmp
background_mask=backmask.bmp
Since there is only one version number at this point (V1.0), we'll just go ahead and use it.
The skin will show up later in the program's context menu under "Select Skin" by the name given to it in the second entry above.
The background for this skin is built from a simple square image filled with a color gradient (
back.bmp) and a grayscale mask defining the skin's actual shape (
backmask.bmp).
For each individual pixel, the grayscale value of the
background_mask determines the alpha value (i.e., opacity) of the resulting skin background, whereas the actual color information is taken from the
background image. In the mask, black (0) denotes total transparency, while white (255) means full opacity.
 | |  | |  |
square gradient image | + | grayscale mask | = | skin background |
If you get a chance to work with 32-bit *.TGA or *.BMP files, you can achieve the same result more easily by using a single image for both color and alpha information. In this case, all mask information is taken directly from that image, meaning there's no need to define a separate
background_mask section. For additional background-definition techniques, please refer to our
skin definition reference page.
What we'll do now to add some eye candy is have the skin blend in and out when it is being started. We'll also take this opportunity to define a global R,G,B
transparentcolor:
blend_time=300
blend_out_time=500
transparentcolor=255,0,0
A
transparentcolor value doesn't really need to be specified here, but doing so may help during skin creation by making it easier to check which pixels of an image are fully transparent. Remember that it remains valid for
all the images we'll use as part of this skin.
Next step:
Basic font definitionIndex The font definition