Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TextEditBoxSetHistory

From RoR Wiki
Revision as of 19:49, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · TextEditBox functions
Version: WAR 1.4.8

Replaces the input history of a TextEditBox.

TextEditBoxSetHistory(editBoxName, history)

Arguments

editBoxName
string – Name of a TextEditBox window.
history
wstring-table – Array of wide strings, in the same order as returned by TextEditBoxGetHistory. Every value must be a wide string.

Returns

Nothing.

Details

  • The old history is discarded and replaced by the lines in the table.
  • The player's browsing position in the history is reset.
  • A table that holds anything other than wide strings raises an Invalid Parameters error.
  • 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 'TextEditBoxSetHistory': Window %s does not exist
  • Error in function call 'TextEditBoxSetHistory': Window %s is not a TextEditBox

Example

From ea_chatwindow/source/chatwindow.lua:

-- Set the history (this preserves it logging in/out)
if( GameData.ChatData.history ) then
    TextEditBoxSetHistory("EA_TextEntryGroupEntryBoxTextInput", GameData.ChatData.history )
end

See also