API:LogDisplayGetFont
From RoR Wiki
UI Lua API · LogDisplay functions
Version: WAR 1.4.8
Returns the font name of a LogDisplay window.
fontName = LogDisplayGetFont(displayName)
Arguments
- displayName
string– Name of a LogDisplay window.
Returns
- fontName
string– The font name last set, by the window's XML definition or by LogDisplaySetFont.
Details
- This returns the stored name. It does not check that the name is a known font.
Errors
Error in function call 'TextLogDisplayGetFont': Window %s does not existError in function call 'TextLogDisplayGetFont': Window %s is not a TextLogDisplay
Example
Ticking the current font in a menu, from ea_chatwindow/source/chatwindow.lua:
if (LogDisplayGetFont(EA_ChatTabManager.Tabs[tabId].name.."TextLog") == ChatSettings.Fonts[idx].fontName)
then
WindowSetShowing("ChatWindowContextFontMenuItem"..idx.."Check", true)
else
WindowSetShowing("ChatWindowContextFontMenuItem"..idx.."Check", false)
end
