LavishGUI:Skins

From Lavish Software Wiki
Revision as of 21:38, 20 January 2006 by Beefalo (talk | contribs)
Jump to navigation Jump to search

Introduction

What is a skin?

A skin is a set of templates that can be applied to any UI elements at the time they are loaded by specifying the name of the skin in the load command. This means that UI XML files do not need to specify individual templates per element to use a special set of templates. Instead, the interface can be designed with a specific skin in mind, rather than required, and the user can apply the skin if they wish to do so.

Creating Skins

A skin must be given a name via a Name attribute, and can be templated. Skins can contain any number of SkinTemplate items.

SkinTemplate

A SkinTemplate simply contains two attributes, one being 'Base' and the other being 'Skin'. The Base attribute specifies the name of the original template, and the Skin attribute specifies the name of the template to use according to the skin. For example, to apply skin the default "window" template, you would use Base="window", and set Skin to the template you created, such as Skin="myskin.window".

Note: There is no requirement in naming your templates; the convention "myskin.window" is recommended to reduce the name collisions.

Example 1

<Skin Name='MySkin' Template='Default Skin'>
  <SkinTemplate Base='window' Skin='myskin.window' />
  <SkinTemplate Base='combobox' Skin='myskin.combobox' />
  <SkinTemplate Base='listbox' Skin='myskin.listbox' />
</Skin>

Using Skins

Skins are applied when loading UI XML files by using the -skin switch with the UI command.

See UI command

See Also