Difference between revisions of "Object Element"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>JRoush
Tag: Manual revert
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{unfinished}}
== Overview ==
Object Elements are a subgroup of the elements in the [[:Category: Oblivion XML|Oblivion XML]] schema.  Every visible part of a menu - the background and images, the buttons, the text - is an object element.
 
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>
[[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:
<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;
  <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 ==
Defines a rectangular region with an associated [[Portal:Texturing|texture]].  Every visible aspect of the menus and HUD, except for text, is an image element.
Defines a rectangular region with an associated [[Portal:Texturing|texture]].  Every visible aspect of the menus and HUD, except for text, is an <image> element.


'''Value Elements'''
'''Property Elements'''
*[[Property Element#General|General]]
*[[Property Element#General|General]]
*[[Property Element#Sizeable|Sizeable]]
*[[Property Element#Sizeable|Sizeable]]
Line 12: 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 it evaluates to false, will override the Visible properties of all of the Rect's other 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.


'''Value Elements'''
'''Property Elements'''
*[[Property Element#General|General]]
*[[Property Element#General|General]]
*[[Property Element#Sizeable|Sizeable]]
*[[Property Element#Sizeable|Sizeable]]
Line 22: Line 39:
Self explanatory.  Note, however, that the width and height property elements have no effect on the size of the text - this is determined solely by the font property.
Self explanatory.  Note, however, that the width and height property elements have no effect on the size of the text - this is determined solely by the font property.


'''Value Elements'''
'''Property Elements'''
*[[Property Element#General|General]]
*[[Property Element#General|General]]
*[[Property Element#Sizeable|Sizeable]]
*[[Property Element#Sizeable|Sizeable]]
Line 29: Line 46:


== Menu ==
== Menu ==
Menu elements (here referring to elements of the form <menu></menu> rather than in the sense of the page title) are a bit special.  They appear to be used exclusively as the root element of the menu document - no additional menu elements are parsed, no matter where they appear in the file.
Menu elements are a bit special.  The root element of a every menu file must be of this type, and no other <menu> elements are parsed, no matter where they appear in the file.


'''Value Elements'''
'''Property Elements'''
*[[Property Element#General|General]]
*[[Property Element#General|General]]
*[[Property Element#Menu|Menu]]
*[[Property Element#Menu|Menu]]


[[Category:Oblivion XML]]
[[Category:Oblivion XML]]

Latest revision as of 12:16, 21 December 2023

Overview[edit | edit source]

Object Elements are a subgroup of the elements in the Oblivion XML schema. Every visible part of a menu - the background and images, the buttons, the text - is an object element.

Object Elements are usually given a name to identify them using the Name attribute, e.g. the image element that holds a menu's background texture might be:

<image name="background_texture"> </image>

Operator Elements and 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 Elements 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">   <!-- Text element, Name attribute is 'title_text' -->
  <x> 100 </x>   <!-- position determined by <x> & <y> Property elements -->
  <y> 150 </y>  
  <font> 2 </font>   <!-- text font determined by <font> Property element-->
  <string>      <!-- actual text determined by <string> Property element -->
    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[edit | edit source]

Defines a rectangular region with an associated texture. Every visible aspect of the menus and HUD, except for text, is an <image> element.

Property Elements

Rect[edit | edit source]

Defines a rectangular region (similar to an Image element), but without any visible effects. Even so, a <Rect> element may have a Visible property, which if set to false will hide the <Rect> element and all of its children.

Property Elements

Text[edit | edit source]

Self explanatory. Note, however, that the width and height property elements have no effect on the size of the text - this is determined solely by the font property.

Property Elements

Menu[edit | edit source]

Menu elements are a bit special. The root element of a every menu file must be of this type, and no other <menu> elements are parsed, no matter where they appear in the file.

Property Elements