Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:LCDStaticTextSetText

From RoR Wiki
Revision as of 19:46, 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 · LCD functions
Version: WAR 1.4.8

Sets the text of an LCD text element.

LCDStaticTextSetText(pageName, textName, text)

Arguments

pageName
string – Name of the page.
textName
string – Name of a text element created with LCDCreateStaticText.
text
wstring – The text. It must be a wide string: L"0" works, "0" does not. Use L"\n" for line breaks.

Returns

Nothing.

Details

  • The page and element names are ordinary strings; only the text is a wide string.
  • The function needs at least three arguments and only reads the last three.

Errors

  • Error in function call 'LCDStaticTextSetText': Page '%s' does not exist.
  • Error in function call 'LCDStaticTextSetText': Page '%s' does not have a child named '%s'.
  • Error in function call 'LCDStaticTextSetText': '%s' on page '%s' is not a/an StaticText.

Example

From ea_lcdkeyboard/source/g15test.lua:

local title = GetStringFromTable( "LCDStrings", StringTables.LCDStrings.GAME_TITLE )..L"\n"..GetStringFromTable( "LCDStrings", StringTables.LCDStrings.GAME_SUBTITLE )
LCDStaticTextSetText( EA_LCDKeyboard.Page0, "Title", title )

function EA_LCDKeyboard.UpdateCareerPoints(previousResourceValue, currentResourceValue)
	LCDStaticTextSetText( EA_LCDKeyboard.Page1, "CP", L""..currentResourceValue )
end

See also