Difference between revisions of "Object Element"

Jump to navigation Jump to search
38 bytes added ,  12:59, 3 May 2011
Rebranding XML "traits" as "attributes"; added a link & changed some wording
imported>JRoush
imported>JRoush
(Rebranding XML "traits" as "attributes"; added a link & changed some wording)
Line 2: Line 2:
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 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 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:
Object Elements are usually given a name to identify them using the [[XML Attribute|Name]] attribute, e.g. the image element that holds a menu's background texture might be:
  <image name="background_texture"> </image>
  <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.
[[Operator Element|Operator Elements]] and [[:Category:UI Functions (OBSE)|OBSE menu functions]] generally refer to Objects by their name.


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:
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;
  <text name="title_text">  &lt;!-- [[#Text|Text]] element, [[XML Attribute|Name]] attribute is 'title_text' --&gt;
   <x> 100 </x>  &lt;!-- position determined by <[[Property Element#Sizeable|x]]> & <[[Property Element#Sizeable|y]]> Property elements --&gt;
   <x> 100 </x>  &lt;!-- position determined by <[[Property Element#Sizeable|x]]> & <[[Property Element#Sizeable|y]]> Property elements --&gt;
   <y> 150 </y>   
   <y> 150 </y>   
Line 29: Line 29:


== Rect ==
== Rect ==
Defines a rectangular region (similar to an Image element), but without any visible effects.  Even so, a <Rect> element may have a [[Property Element#Rendered|Visible]] element as a child, which if set to false will hide the <Rect> element and all of its children.
Defines a rectangular region (similar to an Image element), but without any visible effects.  Even so, a <Rect> element may have a [[Property Element#Rendered|Visible]] property, which if set to false will hide the <Rect> element and all of its children.


'''Property Elements'''
'''Property Elements'''
Anonymous user

Navigation menu