API:EA Window HelpGetEntryData
From RoR Wiki
UI Lua API · Help functions
Version: WAR 1.4.8
Returns the text of one entry of the in-game manual.
entry = EA_Window_HelpGetEntryData(entryId)
Arguments
- entryId
number– Entry id, theidfield of an entry from EA_Window_HelpGetTopicList. Fractions are dropped.
Returns
- entry
table– A table with one field:
| Key | Type | Meaning |
|---|---|---|
text |
wstring |
The entry's text. Missing if the client's manual text list is not loaded. |
Details
- The text comes from the client's
game_manual_entry_textdata list at the position given by the id. The id is cut to 16 bits. An id beyond the end of the list gives an empty string. - The client loads its manual data the first time it is needed.
- The entry's title is not included; use the
namefield from EA_Window_HelpGetTopicList. - The function needs at least one argument and only reads the last one.
Errors
None besides the generic Invalid Parameters message when the argument is missing or not a number.
Example
From ea_helpwindow/source/manualwindow.lua:
function ManualWindow.DisplayManualEntry( entryData )
local entryText = EA_Window_HelpGetEntryData( entryData.id )
LabelSetText( "ManualWindowTopicLabel", entryData.name ) -- display the title for the entry
LabelSetText( "ManualWindowMainText", entryText.text )-- display the entry's text
