From 6a9a1a88748374d4f9aa7107c1494b325835439a Mon Sep 17 00:00:00 2001 From: Bjanski Date: Tue, 5 Jul 2016 18:18:41 +0200 Subject: [PATCH] Small fixes added Server Info Small fixes added Server Info --- .../VirtualGarage/Functions/fn_onBtnClickVG.sqf | 10 +++++----- .../XM8/Apps/Info/{message.txt => message.sqf} | 0 .../Exile.Altis/ExAdClient/XM8/Apps/Info/onClose.sqf | 3 --- .../Exile.Altis/ExAdClient/XM8/Apps/Info/onLoad.sqf | 2 +- .../Exile.Altis/ExAdClient/XM8/Apps/Info/onOpen.sqf | 7 ++++--- .../XM8/CustomCode/ExileClient_gui_xm8_show.sqf | 2 ++ .../XM8/CustomCode/ExileClient_gui_xm8_slide.sqf | 4 ---- .../ExAdClient/XM8/Functions/fn_createCtrlGrp.sqf | 5 +---- mpmissions/Exile.Altis/ExAdClient/XM8/postInit.sqf | 4 ++++ 9 files changed, 17 insertions(+), 20 deletions(-) rename mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/{message.txt => message.sqf} (100%) diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_onBtnClickVG.sqf b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_onBtnClickVG.sqf index 5b80d24..2abf36a 100644 --- a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_onBtnClickVG.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_onBtnClickVG.sqf @@ -21,14 +21,14 @@ private ["_fnc","_idc","_data"]; _fnc = [_this,0,nil] call BIS_fnc_param; _idc = [_this,1,nil] call BIS_fnc_param; -diag_log str _this; - -if(isNil "ExAdCurFlagNetId" || isNil "_fnc" || isNil "_idc")exitWith{false}; +if(isNil "ExAdCurFlagNetId" || isNil "_fnc" || isNil "_idc")exitWith{ + disableUserInput false; + ["extraApps", 1] call ExileClient_gui_xm8_slide; + false +}; _data = lbData [_idc, lbCurSel _idc]; -diag_log str _data; - if(count _data == 0)then{ ["ErrorTitleAndText", ["ExAd - Virtual Garage", "You have to choose a vehicle in the proper list!!"]] call ExileClient_gui_toaster_addTemplateToast; }else{ diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/message.txt b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/message.sqf similarity index 100% rename from mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/message.txt rename to mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/message.sqf diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onClose.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onClose.sqf index 05d19a1..e69de29 100644 --- a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onClose.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onClose.sqf @@ -1,3 +0,0 @@ -if (ExileClientXM8CurrentSlide == "ExAd_Info") then { - ExileClientXM8CurrentSlide = "apps"; -}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onLoad.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onLoad.sqf index 512a85d..69aa038 100644 --- a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onLoad.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onLoad.sqf @@ -29,7 +29,7 @@ _slideClass = "ExAd_Info"; [_display,_slide,([_slideClass,"backButton"] call ExAd_fnc_getNextIDC),[27 * _pW, 17 * _pH, 6 * _pW, 1 * _pH],'["extraApps", 1] call ExileClient_gui_xm8_slide;',STR_ExAd_VG_APP_BTN_BACK] call ExAd_fnc_createButton; -_newParent = [_display,_slide,([_slideClass,"ctrlGrp"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 1 * _pH, (_leftColW + _rightCol + 6) * _pW, 16 * _pH],0.5,5,true] call ExAd_fnc_createCtrlGrp; +_newParent = [_display,_slide,([_slideClass,"ctrlGrp"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 1 * _pH, (_leftColW + _rightCol + 6) * _pW, 16 * _pH]] call ExAd_fnc_createCtrlGrp; [_display,_newParent,([_slideClass,"strTxt"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 1.5 * _pH, (_leftColW + _rightCol + 5) * _pW, 15 * _pH],"","PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onOpen.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onOpen.sqf index b8e4aa9..b7ff8c1 100644 --- a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onOpen.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onOpen.sqf @@ -1,8 +1,9 @@ -private["_display","_message","_strTxt"]; +private["_display","_message","_strTxt","_pos"]; try { - _message = loadFile "ExAdClient\XM8\Apps\Info\message.txt"; + _message = preprocessFileLineNumbers "ExAdClient\XM8\Apps\Info\message.sqf"; + _message = _message select [(_message find "ExAdClient") + (count "ExAdClient\XM8\Apps\Info\message.sqf") + 1]; if(count _message == 0)exitWith{ throw "No server info provided"; @@ -19,7 +20,7 @@ try _pos = ctrlPosition _strTxt; _strTxt ctrlSetPosition [_pos select 0, _pos select 1, _pos select 2, ctrlTextHeight _strTxt]; _strTxt ctrlcommit 0; - ctrlSetFocus ([_display,"ExAd_Info","ctrlGrp"] call ExAd_fnc_getAppCtrl); + ([_display,"ExAd_Info","ctrlGrp"] call ExAd_fnc_getAppCtrl) ctrlEnable true; } catch { diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_show.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_show.sqf index 4668a5b..f999c7a 100644 --- a/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_show.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_show.sqf @@ -49,7 +49,9 @@ if (ExileClientXM8CurrentSlide isEqualTo "party") then }; }; +//Add configured controls and add them to "More" call ExAd_fnc_createExtraApps; +call ExAd_fnc_addApps; { _slideControlID = getNumber (_x >> "controlID"); _slideName = configName _x; diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_slide.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_slide.sqf index e629f3f..92bf296 100644 --- a/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_slide.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_slide.sqf @@ -23,10 +23,6 @@ if !(ExileClientXM8CurrentSlide isEqualTo _toSlideName) then _toSlideControlID = getNumber (_src >> "CfgXM8" >> _toSlideName >> "controlID"); _toSlideControl = _display displayCtrl _toSlideControlID; - //Add extra apps - if(_toSlideName == "extraApps")then{ - call ExAd_fnc_addApps; - }; _toSlideTitle = getText (_src >> "CfgXM8" >> _toSlideName >> "title"); _titleControl = _display displayCtrl 4004; diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCtrlGrp.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCtrlGrp.sqf index 4afa25e..fc61d0d 100644 --- a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCtrlGrp.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCtrlGrp.sqf @@ -1,10 +1,7 @@ -params ["_display","_parent","_idc","_position","_speed","_delay","_rewind","_ctrl"]; +params ["_display","_parent","_idc","_position","_ctrl"]; _ctrl = _display ctrlCreate ["RscControlsGroup", _idc, _parent]; _ctrl ctrlSetPosition _position; -_ctrl ctrlSetAutoScrollSpeed _speed; -_ctrl ctrlSetAutoScrollDelay _delay; -_ctrl ctrlSetAutoScrollRewind _rewind; _ctrl ctrlEnable false; _ctrl ctrlCommit 0; diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/postInit.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/postInit.sqf index f34de5c..b66e020 100644 --- a/mpmissions/Exile.Altis/ExAdClient/XM8/postInit.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/postInit.sqf @@ -29,4 +29,8 @@ call compile preprocessFileLineNumbers _path; _code = compileFinal (preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "onClose")); missionNamespace setVariable [format["ExileClient_gui_xm8_slide_%1_onClose",_x], _code]; }; + + if(isText(missionConfigFile >> "CfgXM8" >> _x >> "config"))then{ + call compileFinal (preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "config")); + }; }forEach (getArray(missionConfigFile >> "CfgXM8" >> "extraApps")); \ No newline at end of file