Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Setting for Auto Collapsed Unit list #26

Closed
john681611 opened this issue Nov 7, 2016 · 3 comments
Closed

[Request] Setting for Auto Collapsed Unit list #26

john681611 opened this issue Nov 7, 2016 · 3 comments
Assignees
Labels
feature request Issue that requests new features to be implemented.
Milestone

Comments

@john681611
Copy link

Issue:
Switching between tabs of units to spawn always causes the list to expand into a partially expanded list (overfilling the side bar)
If I'm looking for units from a faction of the lower part of the list its no fun :(
Its especially bad with RHS.

Current Work around
Search one character and delete it. to get a collapsed list.

Permission:
I'm not experienced in Zeus modding but i can give it a shot if you don't have time just give me some pointers.

@Grezvany13
Copy link
Contributor

I was thinking the same and I might have a solution for this (not tested):

// -- add this to config.cpp
class CfgFunctions
{
    class TAG
    {
        tag = "TAG";

        class Curator
        {
            class onLoadCurator { file = "onLoadCurator.sqf"; };
        }
}
class RscDisplayCurator
{
    onLoad = "[_this select 0] call TAG_fnc_onLoadCurator;";
};
// -- add this to fn_onLoadCurator.sqf
#include "\A3\ui_f_curator\ui\defineResinclDesign.inc"

if (!hasInterface) exitWith {};

disableSerialization;

// no idea if the correct params are used here
["onLoad", _this, "RscAttributeSide", "CuratorDisplays"] call (uinamespace getvariable "BIS_fnc_initDisplay");

_this spawn
{
    disableSerialization;
    _display = _this select 0;

    // no idea if the correct displays are selected
    // no idea if 'tvCollapse' works like this
    _tree_units = _display displayCtrl IDC_RSCDISPLAYCURATOR_MODEUNITS;
    _tree_units tvCollapse []:

    _tree_groups = _display displayCtrl IDC_RSCDISPLAYCURATOR_MODEGROUPS;
    _tree_groups tvCollapse []:
};

In short;
the script will trigger the moment the Curator display is shown (press Y in game to become Zeus). It will then wait till you open the right column (which happens by default). Lastly it will try to find both the Units list and the Groups list, and collapse all the items in there.

I haven't tested the above, nor I'm I sure if the correct displays are targeted, but it should give a pointer on how to solve the issue.

@Kexanone Kexanone self-assigned this Nov 12, 2016
@Kexanone Kexanone added feature request Issue that requests new features to be implemented. assigned labels Nov 12, 2016
@Kexanone
Copy link
Member

Thx Grezvany13. You got the right approach. The actual implementation in Achilles is even easier, since there is already the onModuleTreeLoad function. I will take care of it.

@Kexanone Kexanone added this to the 0.0.5 milestone Dec 2, 2016
@Kexanone
Copy link
Member

Integrated in V.0.0.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue that requests new features to be implemented.
Projects
None yet
Development

No branches or pull requests

3 participants