Jump to content
Sign in to follow this  
JakeLumley

Custom Menu - Help

Recommended Posts

Can someone help me, I'm completely stuck, I have been working on a custom menu with one of my friends. He created this line of text to open to the editor. However, it opens the multiplayer editor not the single-player one,  its something to do with RSC but I haven't got a clue.

 

if ((getNumber (configFile >> "CfgMainMenu" >> "allowEditor") isEqualTo 1) OR (_uid in _adminUIDs)) then {

    _hO = _hO + 10 + 2;

    [_mainMenuPage,[_menuW * 0.1,_hO * _pH,_menuW * 0.8,10 * _pH],toUpper localize "STR_A3_RscDisplayMain_ButtonEditor",{

        (ctrlParent _ctrl) spawn {

            disableSerialization;

            _this closeDisplay 0;

            ctrlActivate ((uiNamespace getVariable "RscDisplayMain") displayCtrl 105);

            waitUntil {!isNull (uiNamespace getVariable "RscDisplayMultiplayer")};

            ((uiNamespace getVariable "RscDisplayMultiplayer") displayCtrl 167) ctrlEnable true; 

            ctrlActivate ((uiNamespace getVariable "RscDisplayMultiplayer") displayCtrl 167);

            ((uiNamespace getVariable "RscDisplayMultiplayer") displayCtrl 167) ctrlEnable false; 

            waitUntil {!isNull (uiNamespace getVariable "RscDisplayHostSettings")};

            ((uiNamespace getVariable "RscDisplayHostSettings") displayCtrl 101) ctrlSetText 'Editor';

            ctrlActivate ((uiNamespace getVariable "RscDisplayHostSettings") displayCtrl 1);

            waitUntil {!isNull (uiNamespace getVariable "RscDisplayMultiplayer")};

            (uiNamespace getVariable "RscDisplayMultiplayer") closeDisplay 0;       

        };

    }] call _DT_fnc_createButton;

};

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×