Difference between revisions of "Oblivion XML Reference/Traits"

2,069 bytes added ,  23:40, 17 June 2018
imported>DavidJCobb
(everything but behavior traits)
 
imported>DavidJCobb
Line 108: Line 108:


== Text ==
== Text ==
;font
:An integer between 1 and 5 indicating which font to use. The Oblivion.ini file associates each number with a font file. Numbers outside of this range will cause crashes.
;isHTML
:If this value is non-zero, the ''string'' is parsed as HTML before being displayed. However, this only works when the tile’s ''string'' is supplied by the executable. HTML tags placed inside of the ''string'' trait are misinterpreted (as if they were invalid operators) and cause the value to compute to zero or blank; escaping these tags with the <code>&amp;lt;</code> and <code>&amp;rt;</code> entities doesn’t work either, because the parser doesn't understand those entities.
;justify
:Species how the text is positioned relative to the element’s X-coordinate. The values <code>&amp;left;</code>, <code>&amp;center;</code>, and <code>&amp;right;</code> indicate which edge of the text will align with the X-coordinate.
;pagecount
:HTML-formatted text can be broken into “pages” using the HR element. In these cases, the executable automatically sets the ''pagecount'' trait to the number of pages available.
;pagenum
:HTML-formatted text can be broken into “pages” using the HR element. In these cases, this trait indicates which zero-indexed “page” to display.
;string
:The text that the tile will display. Raw numeric values are supported, as are numeric values copied from other traits; however, displayed floats will be rounded down to the nearest whole number (they're stringified using the format string <code>%.0f</code>).
;wraplimit
:If word-wrapping is enabled on the tile, its text will be limited to this many lines, and extra lines of text will not be displayed.
;wraplines
:To be determined. Based on its usage in vanilla, it appears to be an alias for ''wraplimit''.
;wrapwidth
:If this trait is set, the text in the tile will word-wrap to avoid exceeding this width in pixels.
:When it comes time to render text, this value is rounded down to the nearest integer. If it is lower than 1, then the (normalized) width of the screen is used instead.


== Executable-only ==
== Executable-only ==
Anonymous user