Difference between revisions of "Imageset files"

From CEGUI Wiki - Crazy Eddie's GUI System (Open Source)
Jump to: navigation, search
 
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
For the time being, this has been copy-and-pasted directly from "readme.txt" in the XMLRefSchema directory of the CEGUI source code. Some prettier formatting along the lines of [[Scheme files|this page]] would be nice.
+
For the time being, this has been copy-and-pasted directly from "readme.txt" in the XMLRefSchema directory of the CEGUI source code. Some prettier formatting along the lines of '''[[Scheme files]]''' would be nice.
  
<pre>
+
== Introduction ==
 
Imagesets define one or more images on a larger image (texture).
 
Imagesets define one or more images on a larger image (texture).
 
The root element must be Imageset.
 
The root element must be Imageset.
  
 +
NOTE: These XML files are case sensitive, so the XML Elements/Attributes will be written in the case required rather than by capitalization rules.
  
Imageset Element
+
== Document structure ==
================
+
* '''Imageset'''
 +
** '''Image Element'''
 +
 
 +
 
 +
== Imageset Element ==
 
Has attributes and a collection of one or more Image elements.
 
Has attributes and a collection of one or more Image elements.
  
Imageset attributes
+
Imageset attributes:
-------------------
+
* '''version''' - specifies the version of the resource file. Should be specified for all files, current CEGUI imageset version is: 2
Imagefile - path to the image file containing the graphics (required).
+
* '''imagefile''' - Path to the image file containing the graphics. ''Required''.
ResourceGroup - The resource group identifier to pass to the resource provider when loading the file.
+
* '''ResourceGroup''' - The resource group identifier to pass to the resource provider when loading the file.
Name - the name that will be assigned to the Imageset in the GUI system (required).
+
* '''name''' - the name that will be assigned to the Imageset in the GUI system. ''required''.
NativeHorzRes - The horizontal screen resolution that the images were are intended to be displayed at (optional, default=640).
+
* '''nativeHorzRes''' - The horizontal screen resolution that the images were are intended to be displayed at. ''Optional, default=640''.
NativeVertRes - The vertical screen resolution that the images were are intended to be displayed at (optional, default=480).
+
* '''nativeVertRes''' - The vertical screen resolution that the images were are intended to be displayed at. ''Optional, default=480''.
AutoScaled - Boolean, states whether to scale imagery so it appears the same size as any resolution (optional, default=false).
+
* '''autoScaled''' - Boolean, states whether to scale imagery so it appears the same size as any resolution. ''Optional, default=false''.
  
 +
''Imageset'' is the root element and is the only "global" tag.
 +
<source lang="xml">
 +
  <?xml version="1.0" ?>
 +
  <Imageset version="2" name="MyLook" imagefile="MyLook.tga" nativeHorzRes="800" nativeVertRes="600" autoScaled="true">
 +
    ...
 +
    ... resources ...
 +
    ...
 +
  </Imageset>
 +
</source>
  
Image Element
+
== Image Element ==
=============
+
 
Has attributes defining an sub-image area.  Can have no sub-elements.
 
Has attributes defining an sub-image area.  Can have no sub-elements.
  
Image attributes
+
Image attributes:
----------------
+
 
Name - The name that will be used to identify the image within the Imageset. (required).
+
* '''name''' - The name that will be used to identify the image within the Imageset. ''Required''.
XPos - X pixel co-ordinate of the top-left corner of the image on the texture. (required).
+
* '''xPos''' - X pixel co-ordinate of the top-left corner of the image on the texture. ''Required''.
YPos - Y pixel co-ordinate of the top-left corner of the image on the texture. (required).
+
* '''yPos''' - Y pixel co-ordinate of the top-left corner of the image on the texture. ''Required''.
Width - Width of this image in pixels. (required).
+
* '''width''' - Width of this image in pixels. ''Required''.
Height - Height of this image in pixels. (required).
+
* '''height''' - Height of this image in pixels. ''Required''.
XOffset - Horizontal offset to apply when rendering. (optional, default=0)
+
* '''xOffset''' - Horizontal offset to apply when rendering. ''Optional, default=0''.
YOffset - Vertical offset to apply when rendering. (optional, default=0)
+
* '''yOffset''' - Vertical offset to apply when rendering. ''Optional, default=0''.
 +
 
 +
<source lang="xml">
 +
  <?xml version="1.0" ?>
 +
  <Imageset version="2" name="MyLook" imagefile="MyLook.tga" nativeHorzRes="800" nativeVertRes="600" autoScaled="true">
 +
    ...
 +
    <Image name="MyWidgetImage" xPos="0" yPos="0" width="64" height="64" />
 +
    ...
 +
  </Imageset>
 +
</source>
 +
 
  
</pre>
+
[[Category:Manuals]]
 +
[[Category:Update requested]]

Latest revision as of 21:35, 25 June 2014

For the time being, this has been copy-and-pasted directly from "readme.txt" in the XMLRefSchema directory of the CEGUI source code. Some prettier formatting along the lines of Scheme files would be nice.

Introduction

Imagesets define one or more images on a larger image (texture). The root element must be Imageset.

NOTE: These XML files are case sensitive, so the XML Elements/Attributes will be written in the case required rather than by capitalization rules.

Document structure

  • Imageset
    • Image Element


Imageset Element

Has attributes and a collection of one or more Image elements.

Imageset attributes:

  • version - specifies the version of the resource file. Should be specified for all files, current CEGUI imageset version is: 2
  • imagefile - Path to the image file containing the graphics. Required.
  • ResourceGroup - The resource group identifier to pass to the resource provider when loading the file.
  • name - the name that will be assigned to the Imageset in the GUI system. required.
  • nativeHorzRes - The horizontal screen resolution that the images were are intended to be displayed at. Optional, default=640.
  • nativeVertRes - The vertical screen resolution that the images were are intended to be displayed at. Optional, default=480.
  • autoScaled - Boolean, states whether to scale imagery so it appears the same size as any resolution. Optional, default=false.

Imageset is the root element and is the only "global" tag.

  <?xml version="1.0" ?>
  <Imageset version="2" name="MyLook" imagefile="MyLook.tga" nativeHorzRes="800" nativeVertRes="600" autoScaled="true">
    ...
    ... resources ...
    ...
  </Imageset>

Image Element

Has attributes defining an sub-image area. Can have no sub-elements.

Image attributes:

  • name - The name that will be used to identify the image within the Imageset. Required.
  • xPos - X pixel co-ordinate of the top-left corner of the image on the texture. Required.
  • yPos - Y pixel co-ordinate of the top-left corner of the image on the texture. Required.
  • width - Width of this image in pixels. Required.
  • height - Height of this image in pixels. Required.
  • xOffset - Horizontal offset to apply when rendering. Optional, default=0.
  • yOffset - Vertical offset to apply when rendering. Optional, default=0.
  <?xml version="1.0" ?>
  <Imageset version="2" name="MyLook" imagefile="MyLook.tga" nativeHorzRes="800" nativeVertRes="600" autoScaled="true">
    ...
    <Image name="MyWidgetImage" xPos="0" yPos="0" width="64" height="64" />
    ...
  </Imageset>