Skin XML Reference

This is a quick reference section for acceptable attributes and elements of a *.Skins.xml file. Extreme detail can be found by reviewing the Skins.xsd definition file within the Configuration > Validation folder. A more user-friendly approach and explanation can be found in the Custom Skins section.

Basic Structure

At the top of the file you should have the standard XML header like so:
<?xml version="1.0" encoding="utf-8" ?>

Optionally comments are then included specifying any license information, image attribution, etc.

The root element and all sub elements are then listed.

Sample Configuration File

<?xml version="1.0" encoding="utf-8" ?>
<!--
    Company Name
    Created by Author
    Copyright Information
    
    Licensing Information
-->
<Skins>
  <Skin Name="My Skin" Purpose="Sample"
         Use="Screenshot"
         ImageFile="Configuration/Images/Skins/Sample.png"
         RelativeX="25" RelativeY="100" Author="Your Name">
    <Helper Ratio="75" OffsetX="0" OffsetY="0" OffsetWidth="1" OffsetHeight="0"/>
    <Helper Ratio="66" OffsetX="-1" OffsetY=".25" OffsetWidth="-1" OffsetHeight=".25"/>
    <Helper Ratio="50" OffsetX="0" OffsetY="0" OffsetWidth="0" OffsetHeight="-.5"/>
  </Skin>
  <Skin Name="My Skin" Purpose="Sample"
         Use="Overlay"
         ImageFile="Configuration/Images/Skins/SampleOverlay.png"
         RelativeX="200" RelativeY="150" Author="Your Name"/>
</Skins>

Root Element: Skins

Every Skin file is required to have one root <Skins> element containing 1 or more <Skin> elements.

Skin Element

You must have 1 or more <Skin> elements. A general Skin Configuration file has 2 (1 for screenshot and 1 for overlay), but you can include multiple skins all within the same configuration file.
Skin Attributes
Attribute Description Notes
Name Combined with Purpose for listing within the dropdowns - Name (Purpose) Required
Purpose Combined with Name for listing within the dropdowns - Name (Purpose) Required
Use Specifies how a Skin should be used: All, Screenshot, Overlay Required
ImageFile Relative (to Awesemulator) path to an image with 96 DPI to use (transparency will be alpha blended) Required
RelativeX X Origin of the Screen Position within the Image (# of Pixels from the left side of the skin image to place the screen) Required
RelativeY Y Origin of the Screen Position within the Image (# of Pixels from the top of the skin image to place the screen) Required
Author Not currently used by Awesemulator - just for reference within the config file Optional

Helper Element

Optional elements within your <Skin> elements to provide some minor correction - depending on the skin image and emulator position for the various ratios (Emulator Zoom Level). These are not always necessary but can help when it appears that in certain ratios a pixel or 2 of the screen is positioned incorrectly. More information about determining these values can be found in the Using SkinOffsetHelper Guide.
Helper Attributes
Attribute Description Notes
Ratio The zoom level (integer) the helper applies too (ie 75% = 75, 50% = 50) Required
OffsetX The number of pixels (decimal) to shift the skin horizontally (negative is left, positive is right) Required
OffsetY The number of pixels (decimal) to shift the skin vertically (negative is up, positive is down) Required
OffsetWidth The number of pixels (decimal) added or subtracted from the width of the skin (Scaled) Required
OffsetHeight The number of pixels (decimal) added or subtracted from the height of the skin (Scaled) Required

See Also

Last edited Sep 8, 2011 at 2:20 PM by theChrisKent, version 5

Comments

No comments yet.