API:LogDisplaySetFont
From RoR Wiki
UI Lua API · LogDisplay functions
Version: WAR 1.4.8
Sets the font of a LogDisplay window.
LogDisplaySetFont(displayName, fontName)
Arguments
- displayName
string– Name of a LogDisplay window.- fontName
string– Font name, for example"font_clear_medium".
Returns
Nothing.
Details
- If the name equals the current font, nothing happens.
- Otherwise the display is laid out again with the new font and all lines are rebuilt.
- The name is stored even if it is not a known font. LogDisplayGetFont then returns it, but the display is not rebuilt with a font.
- The function needs at least two arguments and only reads the last two. Any extra arguments placed in front of them are ignored.
Errors
Error in function call 'TextLogDisplaysetFont': Window %s does not existError in function call 'TextLogDisplaysetFont': Window %s is not a TextLogDisplay
- Note the lower-case
sinTextLogDisplaysetFont.
Example
From ea_chatwindow/source/chatwindow.lua:
LogDisplaySetFont(EA_ChatTabManager.Tabs[tabManagerId].name.."TextLog", ChatSettings.Fonts[fontIndex].fontName)
