Difference between revisions of "Object Element"

2,287 bytes added ,  13:16, 21 December 2023
no edit summary
imported>JRoush
(added to category)
Tag: Manual revert
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Adds a texture to the menu - one of the most commonly used elements.  Every visible aspect of the menus and HUD, except for text, is an image texture.
== 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.


==== Traits ====
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:
*[[Name Trait|name]]
<image name="background_texture"> </image>
[[Operator Element|Operator Elements]] and [[:Category:UI Functions (OBSE)|OBSE menu functions]] generally refer to Objects by their name.


==== Value Elements ====
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:
*'''Position'''
<text name="title_text">  &lt;!-- [[#Text|Text]] element, [[XML Attribute|Name]] attribute is 'title_text' --&gt;
**[[Position Element|X,Y]]
  <x> 100 </x>  &lt;!-- position determined by <[[Property Element#Sizeable|x]]> & <[[Property Element#Sizeable|y]]> Property elements --&gt;
**[[Size Element|Height, Width]]
  <y> 150 </y> 
**[[Locus Element|Locus]]
  &lt;font> 2 &lt;/font>  &lt;!-- text font determined by <[[Property Element#Text|font]]> Property element--&gt;
*'''Display'''
  <string>      &lt;!-- actual text determined by <[[Property Element#Text|string]]> Property element --&gt;
**[[Alpha Element|Alpha]]
    This is the Actual Title
**[[Filename Element|Filename]]
  </string>   
**[[Zoom Element|Zoom]]
</text>
**[[Crop Element|CropX,CropY]]
 
**[[Clips Element|Clips]]
Below is a listing of common Object Elements, and the groups of Properties each can make use of.
**[[Visible Element|Visible]]
 
**[[Depth Element|Depth]]
== Image ==
*'''Input Events'''
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.
**[[Target Element|Target]]
 
**[[Clicksound Element|Clicksound]]
'''Property Elements'''
**[[Mouseover Element|Mouseover]]
*[[Property Element#General|General]]
*'''Misc'''
*[[Property Element#Sizeable|Sizeable]]
**[[Include Element|Include]]
*[[Property Element#Rendered|Rendered]]
**[[ID Element|ID]]
*[[Property Element#Mouse Targetable|Mouse Targetable]]
**[[User Element|User#]]
*[[Property Element#Textured|Textured]]
 
== 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]] property, which if set to false will hide the <Rect> element and all of its children.
 
'''Property Elements'''
*[[Property Element#General|General]]
*[[Property Element#Sizeable|Sizeable]]
*[[Property Element#Mouse Targetable|Mouse Targetable]]
 
== Text ==
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'''
*[[Property Element#General|General]]
*[[Property Element#Sizeable|Sizeable]]
*[[Property Element#Rendered|Rendered]]
*[[Property Element#Text|Text]]
 
== Menu ==
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'''
*[[Property Element#General|General]]
*[[Property Element#Menu|Menu]]


[[Category:Oblivion XML]]
[[Category:Oblivion XML]]
Anonymous user