Cursor XML Reference

This is a quick reference section for acceptable attributes and elements of a *.Cursors.xml file. Extreme detail can be found by reviewing the Cursors.xsd definition file within the Configuration > Validation folder. A more user-friendly approach and explanation can be found in the Custom Cursors 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
-->
<Cursors>
  <Cursor Name="My Cursor" Purpose="Sample" HotspotX="25" HotspotY="25"
          ImageFile="Configuration/Images/Cursors/Sample.png"
          PressedImageFile="Configuration/Images/Cursors/SamplePress.png"
          Author="Your Name"/>
</Cursors>

Root Element: Cursors

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

Cursor Element

You must have 1 or more <Cursor> elements. A general Cursor Configuration file only has 1, but you can include multiple cursors all within the same configuration file.
Cursor 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
HotspotX X Origin of the cursor pointer within the Image (# of Pixels from the left side of the cursor image to place the "click spot") Required
HotspotY Y Origin of the cursor pointer within the Image (# of Pixels from the top of the cursor image to place the "click spot") Required
ImageFile Relative (to Awesemulator) path to an image with 96 DPI to use (transparency will be alpha blended) Required
PressedImageFile Relative (to Awesemulator) path to an image with 96 DPI to use (transparency will be alpha blended) to be used when mouse is down Required
Author Not currently used by Awesemulator - just for reference within the config file Optional

See Also

Last edited Sep 8, 2011 at 1:20 PM by theChrisKent, version 3

Comments

No comments yet.