The Imageset section of the Skin definition files is looking like this:

  <Imageset Name="Textures/DarkSkin">
    <Image Name="CloseButton"       X="178" Y="184" Width="26" Height="12" />
    <Image Name="FocusBackdrop"     X="139" Y="80" Width="241" Height="51" />
    <Image Name="Window.Border"     X="145" Y="138" Width="228" Height="38" />
    <Image Name="Window.Client"     X="104" Y="194" Width="33" Height="33" />
    <Image Name="Button"            X="139" Y="246" Width="170" Height="24" />
    <Image Name="Button.Pressed"    X="139" Y="272" Width="170" Height="24" />
    <Image Name="HScrollBar.Left"   X="126" Y="334" Width="22" Height="15" />
    <Image Name="HScrollBar.Right"  X="126" Y="317" Width="22" Height="15" />
    <Image Name="HScrollBar.Center" X="70" Y="317" Width="54" Height="15" />
    <Image Name="HScrollBar.Knob"   X="91" Y="340" Width="25" Height="13" />

    <Image Name="VScrollBar.Top"    X="70" Y="231" Width="15" Height="22" />
    <Image Name="VScrollBar.Bottom" X="87" Y="231" Width="15" Height="22" />
    <Image Name="VScrollBar.Center" X="70" Y="255" Width="15" Height="54" />
    <Image Name="VScrollBar.Knob"   X="93" Y="263" Width="13" Height="25" />

    <Image Name="Panel.Border"      X="104" Y="194" Width="33" Height="33" />
    <Image Name="Panel.Border2"     X="69" Y="194" Width="33" Height="33" />

    <Image Name="CheckBox.Background"   X="171" Y="315" Width="13" Height="12" />
    <Image Name="CheckBox.Checkmark"    X="186" Y="315" Width="13" Height="12" />

    <Image Name="RadioButton.Background"  X="171" Y="330" Width="13" Height="12" />
    <Image Name="RadioButton.Checkmark"   X="186" Y="330" Width="13" Height="12" />

    <Image Name="TextBox"           X="265" Y="203" Width="105" Height="21" />
    <Image Name="Caret"             X="374" Y="203" Width="3" Height="21" />

The enclosing Imageset tags has one Attribute: name. This attribute is used to load a texture using the XNA ContentPipeline. You have to add this texture to your XNA ContentProject. The attribute is the full path but has no file extension. The extension is added by the ContentManager automagically.

The only valid child element of Imageset is the Image tag. It has a name attribute defining a name. You are able to use every character included in the utf-8 character set. The other attributes are X, Y, Width and Height which are defining a rectangular area within the image that is used as texture. You can easily obtain this coordinates and the sizes if you do a rectangular selection within your favourit paint program.

Each of this images can be used by any number of Layers.

Last edited May 4, 2011 at 6:13 PM by Glatzemann, version 1


No comments yet.