API:PregameGetQuickStartLabels
From RoR Wiki
UI Lua API · Pregame functions
Version: WAR 1.4.8
Returns the texts the quick start window shows for the character it offers to log in.
nameLabel, rank, careerLabel, locationLabel = PregameGetQuickStartLabels()
Arguments
None.
Returns
- nameLabel
wstring– The character's name and surname, joined by one of the client's built-in text templates.- rank
number– The character's rank. A stored rank of 0 is returned as 1.- careerLabel
wstring– The character's career name.- locationLabel
wstring– The character's location, put into one of the client's built-in text templates.
Details
- The function only returns values in the pregame state, when the character select screen and its quick start character data exist. Otherwise it returns nothing.
- The stock quick start window also reads
rankon its own, to warn trial accounts about characters above the trial level cap.
Errors
None.
Example
From interfacecore/source/quickstartwindow.lua:
local nameLabel, rank, careerLabel, locationLabel = PregameGetQuickStartLabels( )
LabelSetText("QuickStartWindowNameLabel", nameLabel)
local rankAndCareerLineText = GetPregameStringFormat( StringTables.Pregame.TEXT_QUICK_START_LINE_TWO, { rank, careerLabel} )
LabelSetText("QuickStartWindowRankLabel", rankAndCareerLineText)
LabelSetText("QuickStartWindowLocationLabel", locationLabel)
