API:LogDisplaySetTextFadeTime
From RoR Wiki
UI Lua API · LogDisplay functions
Version: WAR 1.4.8
Sets how long lines stay visible in a LogDisplay window before they fade out.
LogDisplaySetTextFadeTime(displayName, fadeTime)
Arguments
- displayName
string– Name of a LogDisplay window.- fadeTime
number– Time before a line fades.0turns fading off.
Returns
Nothing.
Details
- If the value changes, all lines are made fully visible again and their fade starts over (as with LogDisplayResetLineFadeTime).
- With a fade time of 0 the display is not updated for fading, and LogDisplayResetLineFadeTime does nothing.
- The stock chat window passes the player's
SystemData.Settings.Chat.visibleTimesetting, or300when text fading is switched off in the settings. - 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 'TextLogSetTextFadeTime': Window %s does not existError in function call 'TextLogSetTextFadeTime': Window %s is not a TextLogDisplay
Example
From ea_chatwindow/source/chatwindow.lua:
-- text fade time
local visibleTime = 300
if( SystemData.Settings.Chat.fadeText ) then
visibleTime = SystemData.Settings.Chat.visibleTime
end
LogDisplaySetTextFadeTime( tabLogDisplayName, visibleTime )
