mirror of
https://github.com/Bjanski/ExAd.git
synced 2024-08-30 16:52:14 +00:00
commit
8d5007f2b2
@ -51,7 +51,7 @@ if (ExileClientXM8CurrentSlide isEqualTo "party") then
|
|||||||
|
|
||||||
//Add configured controls and add them to "More"
|
//Add configured controls and add them to "More"
|
||||||
call ExAd_fnc_createExtraApps;
|
call ExAd_fnc_createExtraApps;
|
||||||
call ExAd_fnc_addApps;
|
|
||||||
{
|
{
|
||||||
_slideControlID = getNumber (_x >> "controlID");
|
_slideControlID = getNumber (_x >> "controlID");
|
||||||
_slideName = configName _x;
|
_slideName = configName _x;
|
||||||
|
@ -18,7 +18,7 @@ if !(ExileClientXM8CurrentSlide isEqualTo _toSlideName) then
|
|||||||
{
|
{
|
||||||
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
|
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
|
||||||
|
|
||||||
//Manipulate the source of config data
|
//ExAd Manipulate the source of config data
|
||||||
_src = if(isClass(configFile >> "CfgXM8" >> _toSlideName))then{configFile}else{missionConfigFile};
|
_src = if(isClass(configFile >> "CfgXM8" >> _toSlideName))then{configFile}else{missionConfigFile};
|
||||||
_toSlideControlID = getNumber (_src >> "CfgXM8" >> _toSlideName >> "controlID");
|
_toSlideControlID = getNumber (_src >> "CfgXM8" >> _toSlideName >> "controlID");
|
||||||
_toSlideControl = _display displayCtrl _toSlideControlID;
|
_toSlideControl = _display displayCtrl _toSlideControlID;
|
||||||
@ -33,7 +33,11 @@ if !(ExileClientXM8CurrentSlide isEqualTo _toSlideName) then
|
|||||||
call _toSlideOpenFunction;
|
call _toSlideOpenFunction;
|
||||||
};
|
};
|
||||||
|
|
||||||
//Manipulating the source of config data
|
//ExAd Load Apps
|
||||||
|
if(toLower _toSlideName == 'extraapps')then{
|
||||||
|
call ExAd_fnc_addApps;
|
||||||
|
};
|
||||||
|
//ExAd Manipulating the source of config data
|
||||||
_src2 = if(isClass(configFile >> "CfgXM8" >> ExileClientXM8CurrentSlide))then{configFile}else{missionConfigFile};
|
_src2 = if(isClass(configFile >> "CfgXM8" >> ExileClientXM8CurrentSlide))then{configFile}else{missionConfigFile};
|
||||||
_fromSlideControlID = getNumber(_src2 >> "CfgXM8" >> ExileClientXM8CurrentSlide >> "controlID");
|
_fromSlideControlID = getNumber(_src2 >> "CfgXM8" >> ExileClientXM8CurrentSlide >> "controlID");
|
||||||
|
|
||||||
|
@ -15,42 +15,63 @@
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
private["_apps","_count","_title","_display"];
|
private["_apps","_idc","_title","_display"];
|
||||||
|
|
||||||
_apps = getArray(missionConfigFile >> "CfgXM8" >> "extraApps");
|
_apps = getArray(missionConfigFile >> "CfgXM8" >> "extraApps");
|
||||||
if(count _apps == 0)exitWith{false};
|
if(count _apps == 0)exitWith{false};
|
||||||
|
|
||||||
_count = 10;
|
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
|
||||||
_count2 = 5000;
|
|
||||||
_title = "ExAd";
|
|
||||||
|
|
||||||
while {_title != ""} do
|
if(isNil "ExAd_XM8_FIRST_IDC") then {
|
||||||
{
|
private ["_continue","_idc"];
|
||||||
_count = _count + 1;
|
_continue = true;
|
||||||
_count2 = _count2 + 1;
|
_idc = 5001;
|
||||||
_count = if(_count > 15)then{
|
while{ _continue } do {
|
||||||
if(_count > 25)then{
|
_ctrl = _display displayCtrl _idc;
|
||||||
if(_count < 31)then{31}else{_count}
|
if(ctrlText _ctrl == "")then{
|
||||||
|
_continue = false;
|
||||||
|
ExAd_XM8_FIRST_IDC = _idc;
|
||||||
}else{
|
}else{
|
||||||
if(_count < 21)then{21}else{_count}
|
_idc = _idc + 1;
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
_count
|
|
||||||
};
|
};
|
||||||
_title = getText(configFile >> "RscExileXM8" >> "Controls" >> "Slides" >> "Controls" >>"SlideExtraApps" >> "Controls" >> format["App%1", _count] >> "text");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
|
_idc = ExAd_XM8_FIRST_IDC;
|
||||||
_pW = 0.025; _pH = 0.04;
|
|
||||||
_slide = ctrlParentControlsGroup (_display displayCtrl _count2);
|
|
||||||
|
|
||||||
|
_pW = 0.025; _pH = 0.04;
|
||||||
|
_slide = ctrlParentControlsGroup (_display displayCtrl _idc);
|
||||||
|
_lastPos = [];
|
||||||
{
|
{
|
||||||
private["_ctrl","_pos","_logo","_function"];
|
private["_ctrl","_pos","_logo","_function"];
|
||||||
_ctrl = _display displayCtrl _count2;
|
_ctrl = _display displayCtrl _idc;
|
||||||
_pos = ctrlPosition _ctrl;
|
|
||||||
|
diag_log format["Test - idc = %1, isNull = %2", _idc , isNull _ctrl];
|
||||||
|
if(isNull _ctrl)then{
|
||||||
|
_ctrl = _display ctrlCreate ["RscExileXM8AppButton1x1",_idc,_slide];
|
||||||
|
_xPos = if( (_lastPos select 0) == (30 - 3) * (0.025) ) then { (4 - 3) * (0.025) } else { (_lastPos select 0) + ( 6.5 * 0.025 ) };
|
||||||
|
_yPos = if( (_lastPos select 0) == (30 - 3) * (0.025) ) then {
|
||||||
|
//Move Go Back button
|
||||||
|
/*
|
||||||
|
_goBackIdc = -1;
|
||||||
|
_goBackCtrl = _display displayCtrl _goBackIdc;
|
||||||
|
_goBackPos = ctrlPosition _goBackCtrl;
|
||||||
|
_goBackPos set [2, (_goBackPos select 1) + ( 5.5 * 0.04)];
|
||||||
|
_goBackCtrl ctrlSetPosition _pos;
|
||||||
|
_goBackCtrl ctrlCommit 0;
|
||||||
|
*/
|
||||||
|
(_lastPos select 1) + ( 5.5 * 0.04 )
|
||||||
|
} else { (_lastPos select 1) };
|
||||||
|
|
||||||
|
_pos = [ _xPos , _yPos, _lastPos select 2, _lastPos select 3];
|
||||||
|
_ctrl ctrlSetPosition _pos;
|
||||||
|
_ctrl ctrlCommit 0;
|
||||||
|
} else {
|
||||||
|
_pos = ctrlPosition _ctrl;
|
||||||
|
};
|
||||||
|
|
||||||
_logo = if(isText(missionConfigFile >> "CfgXM8" >> _x >> "logo"))then{getText(missionConfigFile >> "CfgXM8" >> _x >> "logo")}else{"ExAdClient\Core\Img\logo.paa"};
|
_logo = if(isText(missionConfigFile >> "CfgXM8" >> _x >> "logo"))then{getText(missionConfigFile >> "CfgXM8" >> _x >> "logo")}else{"ExAdClient\Core\Img\logo.paa"};
|
||||||
[_display,_slide,([_x,format["AppIcon%1",_count2]] call ExAd_fnc_getNextIDC),[(_pos select 0) + 1.5 * _pW, (_pos select 1) + 0.625 * _pH, 3 * _pW, 3 * _pH],_logo,[1,1,1,1],false,true,""] call ExAd_fnc_createPicture;
|
[_display,_slide,([_x,format["AppIcon%1",_idc]] call ExAd_fnc_getNextIDC),[(_pos select 0) + 1.5 * _pW, (_pos select 1) + 0.625 * _pH, 3 * _pW, 3 * _pH],_logo,[1,1,1,1],false,true,""] call ExAd_fnc_createPicture;
|
||||||
|
|
||||||
_ctrl ctrlSetText getText(missionConfigFile >> "CfgXM8" >> _x >> "title");
|
_ctrl ctrlSetText getText(missionConfigFile >> "CfgXM8" >> _x >> "title");
|
||||||
_function = if(isText(missionConfigFile >> "CfgXM8" >> _x >> "quickFunction"))then{
|
_function = if(isText(missionConfigFile >> "CfgXM8" >> _x >> "quickFunction"))then{
|
||||||
@ -58,7 +79,8 @@ _slide = ctrlParentControlsGroup (_display displayCtrl _count2);
|
|||||||
} else {format["['%1', 0] call ExileClient_gui_xm8_slide",_x]};
|
} else {format["['%1', 0] call ExileClient_gui_xm8_slide",_x]};
|
||||||
_ctrl ctrlSetEventHandler ["ButtonClick", _function];
|
_ctrl ctrlSetEventHandler ["ButtonClick", _function];
|
||||||
|
|
||||||
_count2 = _count2 + 1;
|
_lastPos = _pos;
|
||||||
|
_idc = _idc + 1;
|
||||||
}forEach _apps;
|
}forEach _apps;
|
||||||
|
|
||||||
true
|
true
|
Loading…
Reference in New Issue
Block a user