Difference between revisions of "Category:Oblivion XML"

442 bytes added ,  18:08, 8 April 2010
m
imported>JRoush
imported>JRoush
Line 52: Line 52:


It's also possible to insert new element types into a menu document.  Oblivion will
It's also possible to insert new element types into a menu document.  Oblivion will
interpret any element whose type it doesn't recognize as a Property Element.  Such elements obviously won't have any built-in affects, but they can be referred to by name from Operator Elements and OBSE script functions, and may contain Operator Elements as children.  It is common to break up long formulas by inventing one of these "psuedo-Property" elements to intermediate values.
interpret any element type that starts with an underscore as a 'custom' Property Element.  Such elements obviously won't have any built-in affects, but they can be referred to by name from Operator Elements and OBSE script functions, and may contain Operator Elements as children.  It is common to break up long formulas by inventing one of these custom elements to intermediate values.
<text name="sometext">            &lt;!-- Use a custom property '_GreyColor' to set a --&gt;
    <_GreyColor> 255 </_GreyColor> &lt;!-- common intensity level for all three --&gt;
    <string> This is some text </string>      &lt;!-- color properties --&gt;
    <red> <copy src="me()" trait="_GreyColor"/> </red>
    <blue> <copy src="me()" trait="_GreyColor"/> </blue>
    <green> <copy src="me()" trait="_GreyColor"/> </green>
</text>


Because most aspects of menu objects like buttons, icons, etc. are controlled by their Property Elements, Oblivion doesn't make much use of conventional XML traits.  However, the three [[Trait]]s it that are used ("name", "src", and "trait") are essential to the use of Operator and Include elements.  See those pages for more detail.
Because most aspects of menu objects like buttons, icons, etc. are controlled by their Property Elements, Oblivion doesn't make much use of conventional XML traits.  However, the three [[Trait]]s it that are used ("name", "src", and "trait") are essential to the use of Operator and Include elements.  See those pages for more detail.
Anonymous user