API:TextEditBoxSetHistory
From RoR Wiki
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 existError 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
