UI System
Verification builds: 1.19.2
Summary: The UI system is having issues in a number of places. One problem is that it seems to no longer allow direct modification of hardcoded variables. The ignored parameter no longer accepts variables (gives an error)
Impact: UI does not display as intended.
Repro Steps:
when removing a specific text string from the actionbar message, the following no longer works (this is in hud_screen.json in a higher RP):
// not working: actionbar doesn't display, error - expected a string (working in previous version) "hud_actionbar_text/actionbar_message": { "text": "($actionbar_text - 'broken')" },
Attempting to use another variable to modify $actionbar_text similarly fails:
// not working: actionbar displays, but messages including "broken" display unmodified "hud_actionbar_text/actionbar_message": { "$text": "($actionbar_text - 'broken')", "text": "$text" },
The following modification is now required for it to work, where a copy of the $actionbar_text variable is created:
// working: actionbar displays, and messages including "broken" have the "broken" string removed "hud_actionbar_text/actionbar_message": { "$atext": "$actionbar_text", "text": "($atext - 'broken')" },
The ignored parameter now does not support any variables. Attaching the following element to the root_panel displays the text "ignore test" on screen and gives the error: "Expected variable not found in ancestor tree: '$ignore'":
// not working: text displays on screen, expected variable $ignore not found (text should not display since $ignore is true) "ignore_test": { "$ignore": true, "type": "label", "text": "ignore test", "ignored": "$ignore" },
The visible parameter still works correctly with variables, and can be used in place of ignored currently. Though there may be a number of other issues with the UI system in this version that have not yet been found.
Observed Results:
The UI does not display using the old format.
Expected Results:
The UI displays in both manners
Screenshots/Videos attached: No