Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TextEditBoxSetFont

From RoR Wiki

UI Lua API · TextEditBox functions
Version: WAR 1.4.8

Sets the font of a TextEditBox.

TextEditBoxSetFont(editBoxName, fontName)

Arguments

editBoxName
string – Name of a TextEditBox window.
fontName
string – Font name, for example "font_clear_medium".

Returns

Nothing.

Details

  • If the box already uses this font, nothing happens.
  • Otherwise the text is laid out again with the new font.
  • If fontName is not a known font, the box is left without a font and TextEditBoxGetFont returns "".
  • The function needs at least two arguments and only reads the last two. Any extra arguments placed in front of them are ignored.
  • The stock UI never calls this function.

Errors

  • Error in function call 'TextEditBoxSetFont': Window %s does not exist
  • Error in function call 'TextEditBoxSetFont': Window %s is not a TextEditBox

Example

A minimal example built from the documented signature:

TextEditBoxSetFont( "MyEditBox", "font_clear_medium" )

See also