Difference between revisions of "User:JRoush"
Jump to navigation
Jump to search
no edit summary
imported>JRoush |
imported>JRoush |
||
Line 27: | Line 27: | ||
*<text> | *<text> | ||
*<template> | *<template> | ||
Each element in the list should have a name="" trait in the opening tag. | |||
=== General Traits === | === General Traits === | ||
*<id> (int or &generic;) - links an element to a particular aspect of the menu class in the game engine. The game expects, for each menu class, that certain ids will be present, and treats them specially. For example, clicking on element id#14 in the alchemy menu will create a new potion, regardless of the name or (I think) the type of the element. | *<id> (int or &generic;) - links an element to a particular aspect of the menu class in the game engine. The game expects, for each menu class, that certain ids will be present, and treats them specially. For example, clicking on element id#14 in the alchemy menu will create a new potion, regardless of the name or (I think) the type of the element. | ||
*<user##> (variable) - parameters set/read by game engine, specific to the menu and element in question | |||
*<x>,<y> (int) - coordinates (in pixels) of upper left corner (most elements), or center for center justified text elements | *<x>,<y> (int) - coordinates (in pixels) of upper left corner (most elements), or center for center justified text elements | ||
*<height>,<width> (int) - size (in pixels) of element | *<height>,<width> (int) - size (in pixels) of element | ||
Line 38: | Line 40: | ||
=== Element Specific Traits === | === Element Specific Traits === | ||
*<filename> (string) - image elements - location of texture file, relative to Oblivion\Data\Textures | *<filename> (string) - image elements - location of texture file, relative to ''Oblivion\Data\Textures'' | ||
*<zoom> (int) - image elements - scaling factor for textures (percentage), use -1 to force fit entire texture | *<zoom> (int) - image elements - scaling factor for textures (percentage), use -1 to force fit entire texture | ||
*<cropx>,<cropy> (int) - pixels to crop from top and left of texture (applied after zoom settings) | *<cropx>,<cropy> (int) - pixels to crop from top and left of texture (applied after zoom settings) | ||
Line 50: | Line 52: | ||
*<clicksound> (byte) - game click sound to use for mouse-targetable elements | *<clicksound> (byte) - game click sound to use for mouse-targetable elements | ||
*<mousover> (boolean) - set by the game engine for targetable elements - only true when the element has mouse focus | *<mousover> (boolean) - set by the game engine for targetable elements - only true when the element has mouse focus | ||
=== Meta Traits === | |||
Elements in this list may be given literal values, or derive values from traits of another element given by a src="" trait="" in the opening tag. Sources can be literal names, or include the functions "me()", "parent()", "child()", or "sibling()". Processing within a given level (these traits may be nested) starts with the first trait and continues with each trait modifying the current value at that level. | |||
<pre> | |||
<x> | |||
<!-- Place this element to the left of 'some_element' --> | |||
<!-- with a gap of 4+2=6 pixels between them, or at --> | |||
<!-- the far left edge of the screen (x=0) --> | |||
<copy src="some_element" trait="x"/> | |||
<sub src="me()" trait="width"/> | |||
<sub> | |||
<copy> 2 </copy> | |||
<add> 4 </add> | |||
</sub> | |||
<max> 0 </max> | |||
</x> | |||
</pre> | |||
*<add>,<nowiki><sub></nowiki>,<mult>,<nowiki><div></nowiki> - perform algebraic functions | |||
*<onlyif>,<onlyifnot> - replaces with zero if the trait value not is true or false, respectively | |||
*<lt>,<gt>,<eq> - replaces with zero if not less than, greater than, or equal to trait value, respectively | |||
*<min>,<max> - replaces with trait value if greater than or less than, respectively | |||
*<include> - Includes an XML file. must specify a src="", where the source is the file path relative to ''Oblivion\Data\Menus\Prefabs'' | |||
=== Mystery Traits === | === Mystery Traits === | ||
*<clips> | *<clips> |