Skip to reading
PCA Script Programming

list_box_add_item()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

List Box: Add Item | Action ID: ListBoxAddItem

Add a manual list-box item with an ID, text, optional icon, disabled state and insertion index.

Source table from list_box_add_item(), page 175
Option key / fieldMeaning and accepted inputDefault
GUI guiIdChoose an authored GUI ID.Blank
List Box elementIdChoose an element inside the selected GUI.Blank
New Item ID itemIdText.Blank
Item Text textText.Blank
Optional Icon iconAssetIdChoose an imported image. May be blank.Blank
Disabled disabledOn/off.true
Insert Index (-1 = End) insertIndexZero-based insertion position; -1 appends to the list.-1

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
list_box_add_item({"guiId": "hud", "elementId": "topline", "itemId": "key"})

In use. Add a discovered location to a travel list with a stable ID. An insertion index of -1 appends. Turn Disabled off when the player should be able to select the row. For list boxes bound to an array or inventory, change the data source rather than expecting manual entries to override it permanently.

Page 175 of 357Permalink
Go to page