Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TextEditBoxGetHistory

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

Returns the input history of a TextEditBox.

history = TextEditBoxGetHistory(editBoxName)

Arguments

editBoxName
string – Name of a TextEditBox window.

Returns

history
wstring-table – Array of the stored history lines, indexed from 1. An empty table if there is no history.

Details

  • A TextEditBox with history enabled stores each non-empty line the player confirms with Enter, and the player can step back through the stored lines.
  • The table can be passed back to TextEditBoxSetHistory later, which is how the chat window keeps its history across logins.

Errors

  • Error in function call 'TextEditBoxGetHistory': Window %s does not exist
  • Error in function call 'TextEditBoxGetHistory': Window %s is not a TextEditBox

Example

From ea_chatwindow/source/chatwindow.lua:

function EA_ChatWindow.Shutdown()
    EA_ChatWindow.SaveSettings()

    -- Retrieve the history (this preserves it across logging in/out)
    GameData.ChatData.history = TextEditBoxGetHistory("EA_TextEntryGroupEntryBoxTextInput")
end

See also