The API is no longer being updated here until further notice. |
<FontString> (inherits from <LayoutFrame>, creates a FontString) draws text.
<FontString font="" bytes="" text="" spacing="" outline="" monochrome="" nonspacewrap="" wordwrap="" justifyV="" justifyH="" maxLines="" indented=""> <FontHeight /> <Color /> <Shadow /> </FontString>
Attributes[]
- font (xs:string? )
- bytes (xs:int? ) - Defaults to 255.
- text (xs:string? )
- spacing (xs:float? )
- outline (ui:OUTLINETYPE) - "NORMAL", "THICK".
- monochrome (xs:boolean? )
- nonspacewrap (xs:boolean? )
- wordwrap (xs:boolean? )
- justifyV (ui:JUSTIFYVTYPE) - "TOP", "MIDDLE", "BOTTOM".
- justifyH (ui:JUSTIFYHTYPE) - "LEFT", "RIGHT", "CENTER".
- maxLines (xs:unsignedInt? )
- indented (xs:boolean? )
- alpha (xs:float? ) - Sets the alpha.
- ignoreParentAlpha (xs:boolean? ) - Controls alpha directly or as a fraction of its parent's alpha.
- ignoreParentScale (xs:boolean? ) - Prevents resizing due to the parent frame's scale.
Child elements[]
<FontHeight> sets the font height.
- val (xs:float) - Sets the font height, scaling dependent.
<Color> sets color using RGB values or a ColorMixin, and alpha.
- r (xs:float? ) - Red component from 0.0 (default) to 1.0.
- g (xs:float? ) - Green component from 0.0 (default) to 1.0.
- b (xs:float? ) - Blue component from 0.0 (default) to 1.0.
- a (xs:float? ) - Alpha (opacity) from 0.0 to 1.0 (default).
- name (xs:string? ) - Name of a ColorMixin made with CreateColor().
<Shadow> places a shadow behind text with a <Color> child tag.
- x (xs:float) - Left (+) or right (-), scaling dependent.
- y (xs:float) - Up (+) or down (-), scaling dependent.
Details[]
- May inherit a <Font> to take on its properties.
- Similar to a <Texture>, normally belongs inside <Frame> within its <Layers> and <Layer> child elements.
Example[]
<FontString name="$parentFontString" font="Fonts\FRIZQT__.TTF" text="Example Text" justifyH="LEFT" justifyV="TOP"> <Color r="1" g="0.8" b="1" a="1"/> <FontHeight val="12"/> <Anchors> <Anchor point="TOPLEFT" relativeTo="$parent" x="20" y="-20" /> </Anchors> <Shadow> <Offset x="1" y="1" /> <Color r="0" g="0" b="0"/> </Shadow> </FontString>