Small fixes added Server Info

Small fixes added Server Info
This commit is contained in:
Bjanski 2016-07-05 18:18:41 +02:00
parent df832a5932
commit 6a9a1a8874
9 changed files with 17 additions and 20 deletions

View File

@ -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{

View File

@ -1,3 +0,0 @@
if (ExileClientXM8CurrentSlide == "ExAd_Info") then {
ExileClientXM8CurrentSlide = "apps";
};

View File

@ -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

View File

@ -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
{

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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"));