Difference between revisions of "Object Element"

Jump to navigation Jump to search
1,095 bytes added ,  13:07, 31 March 2010
no edit summary
imported>JRoush
m (Menu Element moved to Object Element: menu vs. <menu> - too confusing)
imported>JRoush
Line 1: Line 1:
Object Elements are a subgroup of the elements in the [[:Category: Oblivion XML|Oblivion XML]] schema.  They define all of the "objects" in the menu - the background and images, the buttons, the text - anything visible is an object element.
== Overview ==
Object Elements are a subgroup of the elements in the [[:Category: Oblivion XML|Oblivion XML]] schema.  Every part of a menu - the background and images, the buttons, the text - anything visible - is an object element.


Object Elements are generally identified with a name (using the [[Trait|name trait]]), and can be interacted with by the player and by certain OBSE scripting functions.
Object Elements are usually given a name to identify them using the [[Trait|Name]] trait, e.g. the image element that holds a menus background texture might be:
<image name="background_texture"> </image>
This name could then be used by an [[Operator Element]] or an OBSE scripting function to refer to this object.
 
Object Elements should not contain literal text or numbers.  Instead, they should have a series of [[Property Element]]s as children, which in turn will contain the various parameters that describe the object.  For example, the <text> element that holds the title of a menu might be defined like this:
<text name="title_text">  &lt;!-- [[#Text|Text]] element, [[Trait#Name|Name]] trait is 'title_text' --&gt;
  <x> 100 </x>  &lt;!-- position determined by <[[Property Element#Sizeable|x]]> & <[[Property Element#Sizeable|y]]> Property elements --&gt;
  <y> 150 </y> 
  &lt;font> 2 &lt;/font>  &lt;!-- text font determined by <[[Property Element#Text|font]]> Property element--&gt;
  <string>      &lt;!-- actual text determined by <[[Property Element#Text|string]]> Property element --&gt;
    This is the Actual Title
  </string>   
</text>
 
Below is a listing of common Object Elements, and the groups of Properties each can make use of.


== Image ==
== Image ==
Anonymous user

Navigation menu