Skip to reading
Panels, Tabs & List Boxes

Add, modify, delete and clear

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
Source table from Add, modify, delete and clear, page 38
ActionWhat to supplyResult
List Box: Add ItemGUI, List Box, New Item ID, Text, Optional Icon, Disabled, Insert IndexAdds a row; -1 appends. Duplicate IDs can receive suffixes.
List Box: Modify ItemGUI, List Box, Item ID, Property, New ValueChanges a row field.
List Box: Delete ItemGUI, List Box, Item IDRemoves one row from the widget.
List Box: Clear ItemsGUI and List BoxEmpties that widget’s local rows.

Modify Item supports text, id, iconAssetId, disabled and selected. Use Boolean true or false for disabled and selected. For a rename that should preserve story references, change text rather than id.

Code example
await ListBoxModifyItem({
    "guiId": "clues_page",
    "elementId": "clue_list",
    "itemId": "letter",
    "property": "text",
    "value": "The keeper's letter"
})

The code above belongs inside the run function of a script based on script_base.gd. It changes only the displayed sentence for letter. The row ID remains letter, so Review Clue still recognizes it.

Changing selected through Modify Item can deliberately select or deselect a manual row and update its output variable. Do not use it casually on a live source list: even this property change activates the local-copy behavior described next.

Page 38 of 50Permalink
Go to page