On Arma 3 version 2.00, the Zeus interface does not correctly restore the selected side from when the display was last open.
Description
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- Zeus - General
- Start a mission as a curator.
- Open Zeus interface.
- Select mode UNITS and side BLUFOR.
- Close Zeus interface.
- Open Zeus interface.
- Observe that the selected side is OPFOR and not BLUFOR.
- Close Zeus interface.
- Open Zeus interface.
- Observe that the selected side is now BLUFOR and not OPFOR.
I believe the issue occurs because of the following code, lines 211-239 from \a3\ui_f_curator\ui\displays\rscdisplaycurator.sqf. This code incorrectly uses RscDisplayCurator_sections side value as 0 meaning BLUFOR and 1 meaning OPFOR. The if (_side > 0) then check is unnecessary and also contributes to the issue.
//--- Default menu section with missionnamespace do { if (isnil "RscDisplayCurator_sections") then {RscDisplayCurator_sections = [0,0];}; }; _sections = missionnamespace getvariable "RscDisplayCurator_sections"; _mode = _sections param [0,0,[0]]; _side = _sections param [1,0,[0]]; _modeIDC = [ IDC_RSCDISPLAYCURATOR_MODEUNITS, IDC_RSCDISPLAYCURATOR_MODEGROUPS, IDC_RSCDISPLAYCURATOR_MODEMODULES, IDC_RSCDISPLAYCURATOR_MODEMARKERS, IDC_RSCDISPLAYCURATOR_MODERECENT ] select (_mode max 0 min 4); _sideIDC = [ IDC_RSCDISPLAYCURATOR_SIDEBLUFOR, IDC_RSCDISPLAYCURATOR_SIDEOPFOR, IDC_RSCDISPLAYCURATOR_SIDEINDEPENDENT, IDC_RSCDISPLAYCURATOR_SIDECIVILIAN, IDC_RSCDISPLAYCURATOR_SIDEEMPTY ] select (_side max 0 min 4); _modeControl = if (_mode > 0) then {_display displayctrl _modeIDC} else {_display displayctrl IDC_RSCDISPLAYCURATOR_MODEUNITS}; ctrlactivate _modeControl; ["modeChanged",[_modeControl],""] call RscDisplayCurator_script; _sideControl = if (_side > 0) then {_display displayctrl _sideIDC} else {_display displayctrl IDC_RSCDISPLAYCURATOR_SIDEBLUFOR}; ctrlactivate _sideControl; ["sideChanged",[_sideControl],""] call RscDisplayCurator_script;
When fixing this issue, the default opened mode and side should be kept as UNITS and BLUFOR, respectively. This may require changing the default RscDisplayCurator_sections value to [0,1] from [0,0].
Event Timeline
The fix changed how RscDisplayCurator_sections is interpreted. That is, the side value was 0 for OPFOR and 1 for BLUFOR` (like side entry in CfgVehicles configs). In 2.10 (dev), the side value is now 0 for BLUFOR and 1 for OPFOR. We can update mods like ZEN that rely on RscDisplayCurator_sections to determine the state of the Zeus trees in preparation for the 2.10 update but I wanted to confirm that this change was intentional and will remain as it is on current dev-branch.
ZEN uses RscDisplayCurator_sections to get the currently active CREATE tree control (refences: IDC defines, getActiveTree function). As an example, the getActiveTree function is used by the tree expand/collapse all buttons to affect the currently active tree control (reference).
On stable this functionality works as expected because the side value of RscDisplayCurator_sections is 0 for OPFOR and 1 for BLUFOR. However, on dev-branch it does not work as expected because 1 means OPFOR and 0 means BLUFOR now, causing the wrong tree to be expanded/collapsed. That is, when I click the expand all button with the BLUFOR tree active, the OPFOR tree is expanded.
I can easily fix this to work correctly again in ZEN by just changing the order of the IDC arrays, but I wanted to confirm whether this was an intentional change first. There might be some other mods that rely on RscDisplayCurator_sections as well.
I see, well the order of side tabs in curator is blufor = 0, opfor = 1, independent = 2 etc. RscDisplayCurator_sections was meant to follow this order and the fix made it so, so yes this new order is the correct order
Okay, thanks for confirming that. In terms of feedback on the original ticket, the previously selected side is correctly restored as expected now.