Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:LogDisplaySetEntryLimit

From RoR Wiki

UI Lua API · LogDisplay functions
Version: WAR 1.4.8

Sets the maximum number of lines a LogDisplay keeps.

LogDisplaySetEntryLimit(logDisplayName, entryLimit)

Arguments

logDisplayName
string – Name of a LogDisplay window.
entryLimit
number – New maximum number of lines, 0 to 16384. Fractions are dropped.

Returns

Nothing.

Details

  • A value below 0 or above 16384 is replaced by 16384 (not by 0).
  • If the display holds more lines than the new limit, the extra lines are removed from the display at once.
  • The entry limits of the text logs shown in the display are not changed; use TextLogSetEntryLimit for those.
  • If the limit does not change, nothing happens.
  • The function needs at least two arguments and only reads the last two.

Errors

These are written to the UI log; the call returns normally.

  • Error in function call 'LogDisplaySetEntryLimit': Window %s does not exist
  • Error in function call 'LogDisplaySetEntryLimit': Window %s is not a TextLogDisplay

Example

Applying the chat "scroll limit" setting to a chat tab, from ea_chatwindow/source/chatwindow.lua:

-- scroll limit
LogDisplaySetEntryLimit( tabLogDisplayName, SystemData.Settings.Chat.scrollLimit )

See also