Difference between revisions of "Property Element"

Jump to navigation Jump to search
30 bytes added ,  12:24, 19 December 2009
no edit summary
imported>JRoush
imported>JRoush
Line 1: Line 1:
Property Elements are a subgroup of the elements in the [[:Category: Oblivion XML|Oblivion XML]] schema, always found as children of [[Menu Element]]s.  They define the properties of their parent element - position on the screen, color, texture, etc.  In this sense they are similar to traditional xml [[traits]].   
Property Elements are a subgroup of the elements in the [[:Category: Oblivion XML|Oblivion XML]] schema, always found as children of [[Object Element]]s.  They define the properties of their parent element - position on the screen, color, texture, etc.  In this sense they are similar to traditional xml [[traits]].   


There are two basic data types for properties - numeric and string.  A number of Oblivion-specific XML entities are defined for commonly used constants of both types.  Particularly useful are the numeric entities "&true;" (numeric value 2) and "&false;" (1), used to with boolean properties like Visible or Targetable.
There are two basic data types for properties - numeric and string.  A number of Oblivion-specific XML entities are defined for commonly used constants of both types.  Particularly useful are the numeric entities "&true;" (numeric value 2) and "&false;" (1), used to with boolean properties like Visible or Targetable.


Property elements may contain literal values, or a "formula" expressed as a set of [[Operator Element]]s (but not both).  The Oblivion parser evaluates each property element every frame to obtain the ''value'' of the property (see the operator element page for a description on how they are evaluated).  If a menu element contains more than one property element of the same type, the last one defined will take precedence.  If it contains no property elements for an applicable property, the default value is used (usually zero or the empty string).
Property elements may contain literal values, or a "formula" expressed as a set of [[Operator Element]]s (but not both).  The Oblivion parser evaluates each property element every frame to obtain the ''value'' of the property (see the operator element page for a description on how they are evaluated).  If an object element contains more than one property element of the same type, the last one defined will take precedence.  If it contains no property elements for an applicable property, the default value is used (usually zero or the empty string).


== General ==
== General ==
Properties which any menu element of any type might define.
Properties which any object element of any type might define.
*'''ID''' (Numeric) Specifies which part of the internal menu "class" the element corresponds to, for the purposes of updating and accepting player input.  For example, the game treats whatever element has an ID of 3  in the Recharge menu as the exit button, regardless of the type, name, or any other property of the element - if it can be clicked on, then doing so will close the menu.  Likewise, the element with ID 2 in the Enchantment Settings menu is treated as the effect icon and will have its filename property updated by the game (even if it shouldn't have one).  Valid ID values depend on the menu class, but generally range 1-20.  Giving an element an ID not recognized for that menu will have no effect, while changing an existing ID will prevent the element from updating or accepting input.
*'''ID''' (Numeric) Specifies which part of the internal menu "class" the element corresponds to, for the purposes of updating and accepting player input.  For example, the game treats whatever element has an ID of 3  in the Recharge menu as the exit button, regardless of the type, name, or any other property of the element - if it can be clicked on, then doing so will close the menu.  Likewise, the element with ID 2 in the Enchantment Settings menu is treated as the effect icon and will have its filename property updated by the game (even if it shouldn't have one).  Valid ID values depend on the menu class, but generally range 1-20.  Giving an element an ID not recognized for that menu will have no effect, while changing an existing ID will prevent the element from updating or accepting input.


*'''User#''' (type flexible) Element types beginning in "user" are not in general part of the Oblivion XML schema.  They may, however, be recognized by specific menu classes and set to specific values.  For example, in most contexts an element of type User4 would be parsed and then ignored.  The internal class of the Spellmaking menu, though, will look for a User4 property element that is a child of the root [[Menu Element#Menu|Menu Element]], and update its value to the current magicka cost.
*'''User#''' (type flexible) Element types beginning in "user" are not in general part of the Oblivion XML schema.  They may, however, be recognized by specific menu classes and set to specific values.  For example, in most contexts an element of type User4 would be parsed and then ignored.  The internal class of the Spellmaking menu, though, will look for a User4 property element that is a child of the root [[Object Element#Menu|Menu element]], and update its value to the current magicka cost.


== Sizeable ==
== Sizeable ==
Properties defining the size and screen position of a menu element, and possibly its children.
Properties defining the size and screen position of an object element, and possibly its children.
*'''X,Y''' (Numeric) The coordinates (in pixels) of the upper-left hand corner of an element.  These coordinates can be absolute or relative to the position of the parent element (see Locus).  For text elements, this marks the "root" position (see Justify).
*'''X,Y''' (Numeric) The coordinates (in pixels) of the upper-left hand corner of an element.  These coordinates can be absolute or relative to the position of the parent element (see Locus).  For text elements, this marks the "root" position (see Justify).
*'''Height, Width''' (Numeric) The height and width (in pixels) of the element.  For text elements, the width and height are set by the game engine automatically depending on the font and text contents.
*'''Height, Width''' (Numeric) The height and width (in pixels) of the element.  For text elements, the width and height are set by the game engine automatically depending on the font and text contents.
Line 18: Line 18:


== Rendered ==
== Rendered ==
Properties for any menu element with a visible effect, i.e. [[Menu Element#Image|Image]] and [[Menu Element#Text|Text]] elements. Note, however, that setting the Visible property to false on any element will hide all of it's children.
Properties for any object element with a visible effect, i.e. [[Object Element#Image|Image]] and [[Object Element#Text|Text]] elements. Note, however, that setting the Visible property to false on any element will hide all of it's children.
*'''Visible''' (Numeric: Boolean) If true, the element is visible, and if false the element is hidden.  Hiding an element will reveal the elements under it (parents or siblings with lower Depth).  Hidden elements cannot be clicked or moused over, but can still be activated from scripts using OBSE's [[ClickMenuButton]] function.
*'''Visible''' (Numeric: Boolean) If true, the element is visible, and if false the element is hidden.  Hiding an element will reveal the elements under it (parents or siblings with lower Depth).  Hidden elements cannot be clicked or moused over, but can still be activated from scripts using OBSE's [[ClickMenuButton]] function.
*'''Alpha''' (Numeric)  Value between 0 and 255 that determines transparency of element.  The higher the alpha the more transparent, until at 255 the element is completely transparent - although it can still respond to mouse clicks, etc.
*'''Alpha''' (Numeric)  Value between 0 and 255 that determines transparency of element.  The higher the alpha the more transparent, until at 255 the element is completely transparent - although it can still respond to mouse clicks, etc.
Line 25: Line 25:


== Mouse Targetable ==
== Mouse Targetable ==
Properties for any menu elements that can be the focus of mouse events, i.e. the [[Menu Element#Image|Image]] and [[Menu Element#Rect|Rect]] elements.
Properties for any object elements that can be the focus of mouse events, i.e. the [[Object Element#Image|Image]] and [[Object Element#Rect|Rect]] elements.
*'''Target''' (Numeric: Boolean) If true, the element may have mouse or keyboard focus - the Mouseover and Clicked traits will be set accordingly by the engine, and clicking on the element will play the corresponding Clicksound.  If false, then the element is just part of the background, and won't react to player input at all.
*'''Target''' (Numeric: Boolean) If true, the element may have mouse or keyboard focus - the Mouseover and Clicked traits will be set accordingly by the engine, and clicking on the element will play the corresponding Clicksound.  If false, then the element is just part of the background, and won't react to player input at all.
*'''Clicksound''' (Numeric) Which in-game click sound effect to play when the element is clicked.
*'''Clicksound''' (Numeric) Which in-game click sound effect to play when the element is clicked.
Line 32: Line 32:


== Textured ==
== Textured ==
Properties specific to the [[Menu Element#Image|Image Element]].  Note that the texture displayed by an image element is automatically cropped to fit within the elements width and height.
Properties specific to the [[Object Element#Image|Image Element]].  Note that the texture displayed by an image element is automatically cropped to fit within the elements width and height.
*'''Filename''' (String) Specifies the .dds texture file that the element will display.  The file path should be specified relative to the ''Oblivion\Data\Textures\'' directory.
*'''Filename''' (String) Specifies the .dds texture file that the element will display.  The file path should be specified relative to the ''Oblivion\Data\Textures\'' directory.
*'''Zoom''' (Numeric) Specifies the zoom percentage of the image. Setting it to 0 will result in a hidden image and can be larger than 100 to magnify the source texture. When using a value of -1 the image will be resized to fit the width and height of the element (and therefore not cropped).
*'''Zoom''' (Numeric) Specifies the zoom percentage of the image. Setting it to 0 will result in a hidden image and can be larger than 100 to magnify the source texture. When using a value of -1 the image will be resized to fit the width and height of the element (and therefore not cropped).
Line 56: Line 56:


== Text ==
== Text ==
Properties specific to the [[Menu Element#Text|Text Element]]
Properties specific to the [[Object Element#Text|Text Element]]
*'''String''' (String) The text to be displayed.
*'''String''' (String) The text to be displayed.
*'''Red, Green, Blue''' (Numeric) Specifies the color of the text. Values are from 0 to 255 - the greater the value, the more of that color. Example: "red 0, green 0, blue 0" results in a black color, and "red 255, green 0, blue 0" results in a red color. Any combination can be made.
*'''Red, Green, Blue''' (Numeric) Specifies the color of the text. Values are from 0 to 255 - the greater the value, the more of that color. Example: "red 0, green 0, blue 0" results in a black color, and "red 255, green 0, blue 0" results in a red color. Any combination can be made.
Line 82: Line 82:


== Menu ==
== Menu ==
Properties specific to the [[Menu Element#Menu|Menu Element]]
Properties specific to the [[Object Element#Menu|Menu Element]]
*'''Class''' (Numeric) Specifies which internal menu "class" to use for handling input & output to the menu.  Values match those returned by [[MenuMode]], but are generally specified using a set of XML entities closely based on the menu name (e.g. "&RechargeMenu;" for the Recharge menu, with numerical value 1049). Values for which no internal menu class exists (like zero) will result in a "dead" menu - the menu will open, but will not be updated or accept input.
*'''Class''' (Numeric) Specifies which internal menu "class" to use for handling input & output to the menu.  Values match those returned by [[MenuMode]], but are generally specified using a set of XML entities closely based on the menu name (e.g. "&RechargeMenu;" for the Recharge menu, with numerical value 1049). Values for which no internal menu class exists (like zero) will result in a "dead" menu - the menu will open, but will not be updated or accept input.
*'''Stackingtype''' (Numeric) Specifies whether or not the menu blocks the use of other menus and or the gameplay controls while open.  Most menus do; only the HUD and the magic effects popup do not by default.  Possible values are "&no_click_past;" (numerical value 6006) and "&does_not_stack;" (6008), although any value other than 6006 appears to cause non-blocking behavior.
*'''Stackingtype''' (Numeric) Specifies whether or not the menu blocks the use of other menus and or the gameplay controls while open.  Most menus do; only the HUD and the magic effects popup do not by default.  Possible values are "&no_click_past;" (numerical value 6006) and "&does_not_stack;" (6008), although any value other than 6006 appears to cause non-blocking behavior.
Anonymous user

Navigation menu