mirror of
https://github.com/Bjanski/ExAd.git
synced 2024-08-30 16:52:14 +00:00
Release v.0.7.8
A core bug fixed CHVD App added
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
;1. Find [loadVehicleIdPage] and replace the section with this;
|
||||
;1. Find following sections and replace the commented lines;
|
||||
|
||||
[loadVehicleIdPage]
|
||||
;SQL1_1 = SELECT id FROM vehicle LIMIT ?,?
|
||||
@ -14,6 +14,20 @@ SQL1_1 = DELETE FROM vehicle WHERE territory_id IS NULL AND deleted_at < DATE_SU
|
||||
Number Of Inputs = 1
|
||||
SQL1_INPUTS = 1
|
||||
|
||||
; Marks for deletion vehicles that were not used within ? days
|
||||
[markDeleteOldVehicles]
|
||||
; SQL1_1 = UPDATE vehicle SET deleted_at = NOW() WHERE last_updated_at < DATE_SUB(NOW(), INTERVAL ? DAY)
|
||||
SQL1_1 = UPDATE vehicle SET deleted_at = NOW() WHERE last_updated_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL
|
||||
Number Of Inputs = 1
|
||||
SQL1_INPUTS = 1
|
||||
|
||||
; Removes vehicles that were not used within ? days
|
||||
[deleteOldVehicles]
|
||||
; SQL1_1 = DELETE FROM vehicle WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL
|
||||
SQL1_1 = DELETE FROM vehicle WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY)
|
||||
Number Of Inputs = 1
|
||||
SQL1_INPUTS = 1
|
||||
|
||||
;2. Add all below in the end of the file.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Virtual Garage related queries | ADDED BY [ExAd]Jan
|
||||
|
11
docs/XM8/createApp.md
Normal file
11
docs/XM8/createApp.md
Normal file
@ -0,0 +1,11 @@
|
||||
#Create Apps
|
||||
|
||||
To create an app you need follow 4 simple steps
|
||||
|
||||
1.
|
||||
|
||||
2.
|
||||
|
||||
3.
|
||||
|
||||
4.
|
@ -27,4 +27,4 @@ class ExAd
|
||||
//#include "Grinding\CfgFunctions.cpp"
|
||||
//#include "HaloParachute\CfgFunctions.cpp"
|
||||
//#include "XM8\CfgFunctions.cpp"
|
||||
};
|
||||
};
|
@ -1 +1 @@
|
||||
/*
|
||||
/*
|
@ -0,0 +1,25 @@
|
||||
_state = [_this, 0, 0, [0]] call BIS_fnc_param;
|
||||
_syncVar = [_this, 1, "", [""]] call BIS_fnc_param;
|
||||
_slider = [_this, 2, controlNull, [0, controlNull]] call BIS_fnc_param;
|
||||
_text = [_this, 3, controlNull, [0, controlNull]] call BIS_fnc_param;
|
||||
_sliderView = [_this, 4, controlNull, [0, controlNull]] call BIS_fnc_param;
|
||||
_varType = [_this, 5, "", [""]] call BIS_fnc_param;
|
||||
|
||||
if (_state == 1) then {
|
||||
call compile format ["%1 = true",_syncVar];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _syncVar];
|
||||
ctrlEnable [_slider, false];
|
||||
ctrlEnable [_text, false];
|
||||
|
||||
ctrlSetText [_text, str round ((sliderPosition _sliderView) min CHVD_maxObj)];
|
||||
sliderSetPosition [_slider, (sliderPosition _sliderView) min CHVD_maxObj];
|
||||
|
||||
call compile format ["%1 = %2", _varType, (sliderPosition _sliderView) min CHVD_maxObj];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType];
|
||||
[3] call CHVD_fnc_updateSettings;
|
||||
} else {
|
||||
call compile format ["%1 = false",_syncVar];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _syncVar];
|
||||
ctrlEnable [_slider, true];
|
||||
ctrlEnable [_text, true];
|
||||
};
|
@ -0,0 +1,81 @@
|
||||
private ["_textValue","_updateType"];
|
||||
_varType1 = [_this, 0, "", [""]] call BIS_fnc_param;
|
||||
_slider1 = [_this, 1, controlNull, [0, controlNull]] call BIS_fnc_param;
|
||||
_text1 = [_this, 2, controlNull, [0, controlNull]] call BIS_fnc_param;
|
||||
_varType2 = [_this, 3, "", [""]] call BIS_fnc_param;
|
||||
_slider2 = [_this, 4, controlNull, [0, controlNull]] call BIS_fnc_param;
|
||||
_text2 = [_this, 5, controlNull, [0, controlNull]] call BIS_fnc_param;
|
||||
_syncVar = [_this, 6, "", [""]] call BIS_fnc_param;
|
||||
|
||||
if (count _this < 7) then {
|
||||
_updateType = 2;
|
||||
} else {
|
||||
if (call compile _syncVar) then {
|
||||
_updateType = 3;
|
||||
} else {
|
||||
_updateType = 1;
|
||||
};
|
||||
};
|
||||
|
||||
switch (_updateType) do {
|
||||
case 1: {
|
||||
_textValue = [ctrlText _text1, "0123456789"] call BIS_fnc_filterString;
|
||||
_textValue = if (_textValue == "") then {0} else {call compile _textValue min 12000 max 0};
|
||||
|
||||
sliderSetPosition [_slider1, _textValue min CHVD_maxView];
|
||||
//ctrlSetText [_text1, str round (_textValue min CHVD_maxView)];
|
||||
sliderSetRange [_slider2, 0, _textValue min CHVD_maxView];
|
||||
|
||||
call compile format ["%1 = %2", _varType1, _textValue min CHVD_maxView];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType1];
|
||||
|
||||
if ((call compile _varType2) > _textValue) then {
|
||||
sliderSetPosition [_slider2, _textValue min CHVD_maxObj];
|
||||
ctrlSetText [_text2, str round (_textValue min CHVD_maxObj)];
|
||||
|
||||
call compile format ["%1 = %2", _varType2, _textValue min CHVD_maxObj];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType2];
|
||||
};
|
||||
|
||||
[_updateType] call CHVD_fnc_updateSettings;
|
||||
};
|
||||
case 2: {
|
||||
_textValue = [ctrlText _text1, "0123456789"] call BIS_fnc_filterString;
|
||||
_textValue = if (_textValue == "") then {0} else {call compile _textValue min 12000 max 0};
|
||||
|
||||
sliderSetPosition [_slider1, _textValue min CHVD_maxObj];
|
||||
//ctrlSetText [_text1, str round (_textValue min CHVD_maxObj)];
|
||||
|
||||
call compile format ["%1 = %2", _varType1, _textValue min CHVD_maxObj];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType1];
|
||||
|
||||
[_updateType] call CHVD_fnc_updateSettings;
|
||||
};
|
||||
case 3: {
|
||||
_textValue = [ctrlText _text1, "0123456789"] call BIS_fnc_filterString;
|
||||
_textValue = if (_textValue == "") then {0} else {call compile _textValue min 12000 max 0};
|
||||
|
||||
sliderSetPosition [_slider1, _textValue min CHVD_maxView];
|
||||
//ctrlSetText [_text1, str round (_textValue min CHVD_maxView)];
|
||||
sliderSetRange [_slider2, 0, _textValue min CHVD_maxView];
|
||||
|
||||
call compile format ["%1 = %2", _varType1, _textValue min CHVD_maxView];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType1];
|
||||
|
||||
if ((call compile _varType2) > _textValue) then {
|
||||
sliderSetPosition [_slider2, _textValue min CHVD_maxObj];
|
||||
ctrlSetText [_text2, str round (_textValue min CHVD_maxObj)];
|
||||
|
||||
call compile format ["%1 = %2", _varType2, _textValue min CHVD_maxObj];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType2];
|
||||
};
|
||||
|
||||
sliderSetPosition [_slider2, _textValue min CHVD_maxObj];
|
||||
ctrlSetText [_text2, str round (_textValue min CHVD_maxObj)];
|
||||
|
||||
call compile format ["%1 = %2", _varType2, _textValue min CHVD_maxObj];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType2];
|
||||
|
||||
[_updateType] call CHVD_fnc_updateSettings;
|
||||
};
|
||||
};
|
@ -0,0 +1,33 @@
|
||||
private ["_textValue"];
|
||||
_varType = [_this, 0, "", [""]] call BIS_fnc_param;
|
||||
_textCtrl = [_this, 1, controlNull, [0, controlNull]] call BIS_fnc_param;
|
||||
_listbox = [_this, 2, controlNull, [0, controlNull]] call BIS_fnc_param;
|
||||
|
||||
_textValue = [ctrlText _textCtrl, "0123456789."] call BIS_fnc_filterString;
|
||||
_textValue = if (_textValue == "") then {50} else {call compile _textValue min 50 max 3.125};
|
||||
|
||||
|
||||
if (!CHVD_allowNoGrass) then {
|
||||
_textValue = _textValue min 48.99;
|
||||
};
|
||||
|
||||
//update listbox
|
||||
_listboxCtrl = (finddisplay 2900) displayCtrl _listbox;
|
||||
//remove EH not to cause huge lag
|
||||
_listboxCtrl ctrlRemoveAllEventHandlers "LBSelChanged";
|
||||
_sel = [_textValue] call CHVD_fnc_selTerrainQuality;
|
||||
if (CHVD_allowNoGrass) then {
|
||||
_listboxCtrl lbSetCurSel _sel;
|
||||
} else {
|
||||
_listboxCtrl lbSetCurSel (_sel - 1);
|
||||
};
|
||||
//add EH again
|
||||
_listboxCtrl ctrlSetEventHandler ["LBSelChanged",
|
||||
format ["[_this select 1, '%1', %2] call CHVD_fnc_onLBSelChanged", _varType, _textCtrl]
|
||||
];
|
||||
|
||||
//ctrlSetText [_textCtrl, str _textValue];
|
||||
call compile format ["%1 = %2",_varType, _textValue];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType];
|
||||
|
||||
[] call CHVD_fnc_updateTerrain;
|
@ -0,0 +1,27 @@
|
||||
private ["_index","_terrainGrid"];
|
||||
_index = _this select 0;
|
||||
_varType = _this select 1;
|
||||
_text = _this select 2;
|
||||
|
||||
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
|
||||
_ctrl = [_display,"ExAd_CHVD",_text] call ExAd_fnc_getAppCtrl;
|
||||
|
||||
if (!CHVD_allowNoGrass) then {
|
||||
_index = _index + 1;
|
||||
};
|
||||
|
||||
switch (_index) do {
|
||||
case 0: {_terrainGrid = 50};
|
||||
case 1: {_terrainGrid = 25};
|
||||
case 2: {_terrainGrid = 12.5};
|
||||
case 3: {_terrainGrid = 3.125};
|
||||
};
|
||||
|
||||
if (!CHVD_allowNoGrass) then {
|
||||
_terrainGrid = _terrainGrid min 48.99;
|
||||
};
|
||||
|
||||
_ctrl ctrlSetText format["%1",_terrainGrid];
|
||||
call compile format ["%1 = %2",_varType, _terrainGrid];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType];
|
||||
[] call CHVD_fnc_updateTerrain;
|
@ -0,0 +1,73 @@
|
||||
private ["_sliderPos","_updateType"];
|
||||
_varType1 = [_this, 0, "", [""]] call BIS_fnc_param;
|
||||
_slider1 = ctrlIDC ([_this, 1, 0, [0, controlNull]] call BIS_fnc_param);
|
||||
_sliderPos = [_this, 2, 0, [0]] call BIS_fnc_param;
|
||||
_text1 = [_this, 3, 0, [0, controlNull]] call BIS_fnc_param;
|
||||
_varType2 = [_this, 4, "", [""]] call BIS_fnc_param;
|
||||
_slider2 = [_this, 5, 0, [0, controlNull]] call BIS_fnc_param;
|
||||
_text2 = [_this, 6, 0, [0, controlNull]] call BIS_fnc_param;
|
||||
_syncVar = [_this, 7, "", [""]] call BIS_fnc_param;
|
||||
|
||||
if (count _this < 8) then {
|
||||
_updateType = 2;
|
||||
} else {
|
||||
if (call compile _syncVar) then {
|
||||
_updateType = 3;
|
||||
} else {
|
||||
_updateType = 1;
|
||||
};
|
||||
};
|
||||
|
||||
switch (_updateType) do {
|
||||
case 1: {
|
||||
sliderSetPosition [_slider1, _sliderPos min CHVD_maxView];
|
||||
ctrlSetText [_text1, str round (_sliderPos min CHVD_maxView)];
|
||||
sliderSetRange [_slider2, 0, _sliderPos min CHVD_maxView];
|
||||
|
||||
call compile format ["%1 = %2", _varType1, _sliderPos min CHVD_maxView];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType1];
|
||||
|
||||
if ((call compile _varType2) > _sliderPos) then {
|
||||
sliderSetPosition [_slider2, _sliderPos min CHVD_maxObj];
|
||||
ctrlSetText [_text2, str round (_sliderPos min CHVD_maxObj)];
|
||||
|
||||
call compile format ["%1 = %2", _varType2, _sliderPos min CHVD_maxObj];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType2];
|
||||
};
|
||||
|
||||
[_updateType] call CHVD_fnc_updateSettings;
|
||||
};
|
||||
case 2: {
|
||||
sliderSetPosition [_slider1, _sliderPos min CHVD_maxObj];
|
||||
ctrlSetText [_text1, str round (_sliderPos min CHVD_maxObj)];
|
||||
|
||||
call compile format ["%1 = %2", _varType1, _sliderPos min CHVD_maxObj];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType1];
|
||||
|
||||
[_updateType] call CHVD_fnc_updateSettings;
|
||||
};
|
||||
case 3: {
|
||||
sliderSetPosition [_slider1, _sliderPos min CHVD_maxView];
|
||||
ctrlSetText [_text1, str round (_sliderPos min CHVD_maxView)];
|
||||
sliderSetRange [_slider2, 0, _sliderPos min CHVD_maxView];
|
||||
|
||||
call compile format ["%1 = %2", _varType1, _sliderPos min CHVD_maxView];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType1];
|
||||
|
||||
if ((call compile _varType2) > _sliderPos) then {
|
||||
sliderSetPosition [_slider2, _sliderPos min CHVD_maxObj];
|
||||
ctrlSetText [_text2, str round (_sliderPos min CHVD_maxObj)];
|
||||
|
||||
call compile format ["%1 = %2", _varType2, _sliderPos min CHVD_maxObj];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType2];
|
||||
};
|
||||
|
||||
sliderSetPosition [_slider2, _sliderPos min CHVD_maxObj];
|
||||
ctrlSetText [_text2, str round (_sliderPos min CHVD_maxObj)];
|
||||
|
||||
call compile format ["%1 = %2", _varType2, _sliderPos min CHVD_maxObj];
|
||||
call compile format ["profileNamespace setVariable ['%1',%1]", _varType2];
|
||||
|
||||
[_updateType] call CHVD_fnc_updateSettings;
|
||||
};
|
||||
};
|
@ -0,0 +1,20 @@
|
||||
private ["_output"];
|
||||
_terrainGrid = _this select 0;
|
||||
switch (true) do {
|
||||
case (_terrainGrid >= 49): {
|
||||
_output = 0;
|
||||
};
|
||||
case (_terrainGrid >= 25): {
|
||||
_output = 1;
|
||||
};
|
||||
case (_terrainGrid >= 12.5): {
|
||||
_output = 2;
|
||||
};
|
||||
case (_terrainGrid >= 3.125): {
|
||||
_output = 3;
|
||||
};
|
||||
default {
|
||||
_output = 0;
|
||||
};
|
||||
};
|
||||
_output
|
@ -0,0 +1,61 @@
|
||||
_updateType = [_this, 0, 0, [0]] call BIS_fnc_param; // 1 - view, 2 - obj, 3 - both, 0 - both and terrain
|
||||
_inUAV = if (isNil {_this select 1}) then {UAVControl (getConnectedUAV player) select 1 != ""} else {_this select 1};
|
||||
|
||||
if (_inUAV) then {
|
||||
switch (true) do {
|
||||
case (getConnectedUAV player isKindOf "LandVehicle" || getConnectedUAV player isKindOf "Ship"): {
|
||||
if (_updateType == 1 || _updateType == 0 || _updateType == 3) then {
|
||||
setViewDistance CHVD_car;
|
||||
};
|
||||
if (_updateType == 2 || _updateType == 0 || _updateType == 3) then {
|
||||
setObjectViewDistance CHVD_carObj;
|
||||
};
|
||||
};
|
||||
case (getConnectedUAV player isKindOf "Man"): {
|
||||
if (_updateType == 1 || _updateType == 0 || _updateType == 3) then {
|
||||
setViewDistance CHVD_foot;
|
||||
};
|
||||
if (_updateType == 2 || _updateType == 0 || _updateType == 3) then {
|
||||
setObjectViewDistance CHVD_footObj;
|
||||
};
|
||||
};
|
||||
default {
|
||||
if (_updateType == 1 || _updateType == 0 || _updateType == 3) then {
|
||||
setViewDistance CHVD_air;
|
||||
};
|
||||
if (_updateType == 2 || _updateType == 0 || _updateType == 3) then {
|
||||
setObjectViewDistance CHVD_airObj;
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
switch (true) do {
|
||||
case (vehicle player isKindOf "LandVehicle" || vehicle player isKindOf "Ship"): {
|
||||
if (_updateType == 1 || _updateType == 0 || _updateType == 3) then {
|
||||
setViewDistance CHVD_car;
|
||||
};
|
||||
if (_updateType == 2 || _updateType == 0 || _updateType == 3) then {
|
||||
setObjectViewDistance CHVD_carObj;
|
||||
};
|
||||
};
|
||||
case (vehicle player isKindOf "Air"): {
|
||||
if (_updateType == 1 || _updateType == 0 || _updateType == 3) then {
|
||||
setViewDistance CHVD_air;
|
||||
};
|
||||
if (_updateType == 2 || _updateType == 0 || _updateType == 3) then {
|
||||
setObjectViewDistance CHVD_airObj;
|
||||
};
|
||||
};
|
||||
default {
|
||||
if (_updateType == 1 || _updateType == 0 || _updateType == 3) then {
|
||||
setViewDistance CHVD_foot;
|
||||
};
|
||||
if (_updateType == 2 || _updateType == 0 || _updateType == 3) then {
|
||||
setObjectViewDistance CHVD_footObj;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_updateType == 0) then {
|
||||
[_inUAV] call CHVD_fnc_updateTerrain;
|
||||
};
|
@ -0,0 +1,27 @@
|
||||
_inUAV = if (isNil {_this select 0}) then {UAVControl (getConnectedUAV player) select 1 != ""} else {_this select 0};
|
||||
|
||||
if (_inUAV) then {
|
||||
switch (true) do {
|
||||
case (getConnectedUAV player isKindOf "LandVehicle" || getConnectedUAV player isKindOf "Ship"): {
|
||||
setTerrainGrid CHVD_carTerrain;
|
||||
};
|
||||
case (getConnectedUAV player isKindOf "Man"): {
|
||||
setTerrainGrid CHVD_footTerrain;
|
||||
};
|
||||
default {
|
||||
setTerrainGrid CHVD_airTerrain;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
switch (true) do {
|
||||
case (vehicle player isKindOf "LandVehicle" || vehicle player isKindOf "Ship"): {
|
||||
setTerrainGrid CHVD_carTerrain;
|
||||
};
|
||||
case (vehicle player isKindOf "Air"): {
|
||||
setTerrainGrid CHVD_airTerrain;
|
||||
};
|
||||
default {
|
||||
setTerrainGrid CHVD_footTerrain;
|
||||
};
|
||||
};
|
||||
};
|
BIN
mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Icon_CHVD.paa
Normal file
BIN
mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/Icon_CHVD.paa
Normal file
Binary file not shown.
90
mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/config.sqf
Normal file
90
mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/config.sqf
Normal file
@ -0,0 +1,90 @@
|
||||
|
||||
CHVD_allowNoGrass = true; //TRUE||FALSE
|
||||
|
||||
CHVD_maxView = 12000; //0-12000
|
||||
|
||||
CHVD_maxObj = 12000; //0-12000
|
||||
|
||||
|
||||
/*/////////////////////////////////////////////////////////////////////////////////////
|
||||
//////DON'T TOUCH ANYTHING BELLOW THIS HERE IF YOU DON'T KNOW WHAT YOU ARE DOING //////
|
||||
/////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
{
|
||||
_x call ExAd_fnc_localize;
|
||||
}forEach
|
||||
[
|
||||
["STR_chvd_title","View Distance Settings"],["STR_chvd_foot","ON FOOT"],["STR_chvd_car","IN CAR"],["STR_chvd_air","IN AIR"],["STR_chvd_view","VIEW"],["STR_chvd_object","OBJECT"],["STR_chvd_terrain","TERRAIN"],["STR_chvd_sync","Sync object with view"],["STR_chvd_close",""],["STR_chvd_low","Low"],["STR_chvd_standard","Standard"],["STR_chvd_high","High"],["STR_chvd_veryHigh","Very High"]
|
||||
];
|
||||
|
||||
["STR_chvd_title","View Distance Settings"] call ExAd_fnc_localize;
|
||||
|
||||
{
|
||||
_code = '';
|
||||
_function = _x select 0;
|
||||
_file = format["ExAdClient\XM8\Apps\CHVD\Functions\%1", _x select 1];
|
||||
|
||||
_code = compileFinal (preprocessFileLineNumbers _file);
|
||||
|
||||
missionNamespace setVariable [_function, _code];
|
||||
}
|
||||
forEach
|
||||
[
|
||||
["CHVD_fnc_onCheckedChanged", "fn_onCheckedChanged.sqf"],
|
||||
["CHVD_fnc_onSliderChange", "fn_onSliderChange.sqf"],
|
||||
["CHVD_fnc_onLBSelChanged", "fn_onLBSelChanged.sqf"],
|
||||
["CHVD_fnc_onEBinput", "fn_onEBinput.sqf"],
|
||||
["CHVD_fnc_onEBterrainInput", "fn_onEBterrainInput.sqf"],
|
||||
["CHVD_fnc_selTerrainQuality", "fn_selTerrainQuality.sqf"],
|
||||
["CHVD_fnc_updateTerrain", "fn_updateTerrain.sqf"],
|
||||
["CHVD_fnc_updateSettings", "fn_updateSettings.sqf"]
|
||||
];
|
||||
|
||||
|
||||
[] spawn {
|
||||
CHVD_scriptRunning = true;
|
||||
//Wait for mission init, in case there are variables defined some place else
|
||||
waitUntil {time > 0 && !isNil "ExileClientPlayerIsSpawned"};
|
||||
|
||||
//Define variables, load from profileNamespace
|
||||
CHVD_allowNoGrass = if (isNil "CHVD_allowNoGrass") then {true} else {CHVD_allowNoGrass};
|
||||
CHVD_maxView = if (isNil "CHVD_maxView") then {12000} else {CHVD_maxView};
|
||||
CHVD_maxObj = if (isNil "CHVD_maxObj") then {12000} else {CHVD_maxObj};
|
||||
|
||||
CHVD_footSyncObj = profileNamespace getVariable ["CHVD_footSyncObj",false];
|
||||
CHVD_carSyncObj = profileNamespace getVariable ["CHVD_carSyncObj",false];
|
||||
CHVD_airSyncObj = profileNamespace getVariable ["CHVD_airSyncObj",false];
|
||||
|
||||
CHVD_foot = (profileNamespace getVariable ["CHVD_foot",viewDistance]) min CHVD_maxView;
|
||||
CHVD_car = (profileNamespace getVariable ["CHVD_car",viewDistance]) min CHVD_maxView;
|
||||
CHVD_air = (profileNamespace getVariable ["CHVD_air",viewDistance]) min CHVD_maxView;
|
||||
|
||||
CHVD_footObj = (profileNamespace getVariable ["CHVD_footObj",viewDistance]) min CHVD_maxObj;
|
||||
CHVD_carObj = (profileNamespace getVariable ["CHVD_carObj",viewDistance]) min CHVD_maxObj;
|
||||
CHVD_airObj = (profileNamespace getVariable ["CHVD_airObj",viewDistance]) min CHVD_maxObj;
|
||||
|
||||
CHVD_footTerrain = if (CHVD_allowNoGrass) then {profileNamespace getVariable ["CHVD_footTerrain",25]} else {(profileNamespace getVariable ["CHVD_footTerrain",25]) min 48.99 max 3.125};
|
||||
CHVD_carTerrain = if (CHVD_allowNoGrass) then {profileNamespace getVariable ["CHVD_carTerrain",25]} else {(profileNamespace getVariable ["CHVD_carTerrain",25]) min 48.99 max 3.125};
|
||||
CHVD_airTerrain = if (CHVD_allowNoGrass) then {profileNamespace getVariable ["CHVD_airTerrain",25]} else {(profileNamespace getVariable ["CHVD_airTerrain",25]) min 48.99 max 3.125};
|
||||
|
||||
//Begin initialization
|
||||
waitUntil {!isNull player};
|
||||
waitUntil {!isNull findDisplay 46};
|
||||
|
||||
//Detect when to change setting type
|
||||
[] spawn {
|
||||
for "_i" from 0 to 1 step 0 do {
|
||||
[nil, false] call CHVD_fnc_updateSettings;
|
||||
_currentVehicle = vehicle player;
|
||||
waitUntil {_currentVehicle != vehicle player};
|
||||
};
|
||||
};
|
||||
[] spawn {
|
||||
for "_i" from 0 to 1 step 0 do {
|
||||
waitUntil {UAVControl (getConnectedUAV player) select 1 != ""};
|
||||
[nil, true] call CHVD_fnc_updateSettings;
|
||||
waitUntil {UAVControl (getConnectedUAV player) select 1 == ""};
|
||||
[nil, false] call CHVD_fnc_updateSettings;
|
||||
};
|
||||
};
|
||||
};
|
101
mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/onLoad.sqf
Normal file
101
mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/onLoad.sqf
Normal file
@ -0,0 +1,101 @@
|
||||
/*
|
||||
onLoad.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
params["_display","_slide","_idc"];
|
||||
|
||||
_pW = 0.025;
|
||||
_pH = 0.04;
|
||||
|
||||
_margin = 0.5;
|
||||
_rowH = 1.3 * _pH;
|
||||
_blockH = 6 * _pH;
|
||||
|
||||
_leftCol = 0 * _pW;
|
||||
_leftColW = 6 * _pW;
|
||||
|
||||
_midCol = _leftCol + _leftColW + (_margin * _pW);
|
||||
_midColW = 20 * _pW;
|
||||
|
||||
_rightCol = _midCol + _midColW + (_margin * _pW);
|
||||
_rightColW = 5 * _pW;
|
||||
|
||||
_footTop = 1 * _pH;
|
||||
_carTop = _footTop + _blockH;
|
||||
_airTop = _carTop + _blockH;
|
||||
|
||||
_slideClass = "ExAd_CHVD";
|
||||
|
||||
[_display,_slide,([_slideClass,"backButton"] call ExAd_fnc_getNextIDC),[27 * _pW, 17 * _pH, 6 * _pW, 1 * _pH],'["extraApps", 1] call ExileClient_gui_xm8_slide;',"GO BACK"] call ExAd_fnc_createButton;
|
||||
|
||||
|
||||
_newParent = [_display,_slide,([_slideClass,"ctrlGrp"] call ExAd_fnc_getNextIDC),[0, _footTop, 34 * _pW, 16 * _pH]] call ExAd_fnc_createCtrlGrp;
|
||||
_newParent ctrlEnable true;
|
||||
|
||||
//ON FOOT
|
||||
[_display,_newParent,([_slideClass,"strTxtFootTtl"] call ExAd_fnc_getNextIDC),[_leftCol, _footTop, _leftColW, _rowH],STR_chvd_foot,"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"strTxtFootSync"] call ExAd_fnc_getNextIDC),[_rightCol + (4 * _pw) - _midColW, _footTop, _midColW, _rowH],format["%1:",STR_chvd_sync],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"cbFootSyncObj"] call ExAd_fnc_getNextIDC),[_rightCol + (3.8 * _pw), _footTop, _rightCol * 0.05, _rowH * 0.8],"",""] call ExAd_fnc_createCheckBox;
|
||||
|
||||
[_display,_newParent,([_slideClass,"strTxtFootView"] call ExAd_fnc_getNextIDC),[_leftCol, _footTop + _rowH, _leftColW, _rowH],format["%1:",STR_chvd_view],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"sliderFootView"] call ExAd_fnc_getNextIDC),[_midCol, _footTop + _rowH, _midColW, _rowH * 0.8]] call ExAd_fnc_createXSliderH;
|
||||
[_display,_newParent,([_slideClass,"editFootView"] call ExAd_fnc_getNextIDC),[_rightCol, _footTop + _rowH, _rightColW, _rowH * 0.8]] call ExAd_fnc_createEdit;
|
||||
|
||||
[_display,_newParent,([_slideClass,"strTxtFootObj"] call ExAd_fnc_getNextIDC),[_leftCol, _footTop + 2 * _rowH, _leftColW, _rowH],format["%1:",STR_chvd_object],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"sliderFootObj"] call ExAd_fnc_getNextIDC),[_midCol, _footTop + 2 * _rowH, _midColW, _rowH * 0.8]] call ExAd_fnc_createXSliderH;
|
||||
[_display,_newParent,([_slideClass,"editFootObj"] call ExAd_fnc_getNextIDC),[_rightCol, _footTop + 2 * _rowH, _rightColW, _rowH * 0.8]] call ExAd_fnc_createEdit;
|
||||
|
||||
[_display,_newParent,([_slideClass,"strTxtFootTerrain"] call ExAd_fnc_getNextIDC),[_leftCol, _footTop + 3 * _rowH, _leftColW, _rowH],format["%1:",STR_chvd_terrain],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"xListFootTerrain"] call ExAd_fnc_getNextIDC),[_midCol, _footTop + 3 * _rowH, _midColW, _rowH * 0.8],"",""] call ExAd_fnc_createXList;
|
||||
[_display,_newParent,([_slideClass,"strTxtFootTerrainEdit"] call ExAd_fnc_getNextIDC),[_rightCol, _footTop + 3 * _rowH, _rightColW, _rowH * 0.8],"","PuristaMedium",1,"#ffffff","center",1] call ExAd_fnc_createStructuredText;
|
||||
|
||||
//IN CAR
|
||||
[_display,_newParent,([_slideClass,"strTxtCarTtl"] call ExAd_fnc_getNextIDC),[_leftCol, _carTop, _leftColW, _rowH],STR_chvd_car,"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"strTxtCarSync"] call ExAd_fnc_getNextIDC),[_rightCol + (4 * _pw) - _midColW, _carTop, _midColW, _rowH],format["%1:",STR_chvd_sync],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"cbCarSyncObj"] call ExAd_fnc_getNextIDC),[_rightCol + (3.8 * _pw), _carTop, _rightCol * 0.05, _rowH * 0.8],"",""] call ExAd_fnc_createCheckBox;
|
||||
|
||||
[_display,_newParent,([_slideClass,"strTxtCarView"] call ExAd_fnc_getNextIDC),[_leftCol, _carTop + _rowH, _leftColW, _rowH],format["%1:",STR_chvd_view],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"sliderCarView"] call ExAd_fnc_getNextIDC),[_midCol, _carTop + _rowH, _midColW, _rowH * 0.8]] call ExAd_fnc_createXSliderH;
|
||||
[_display,_newParent,([_slideClass,"editCarView"] call ExAd_fnc_getNextIDC),[_rightCol, _carTop + _rowH, _rightColW, _rowH * 0.8]] call ExAd_fnc_createEdit;
|
||||
|
||||
[_display,_newParent,([_slideClass,"strTxtCarObj"] call ExAd_fnc_getNextIDC),[_leftCol, _carTop + 2 * _rowH, _leftColW, _rowH],format["%1:",STR_chvd_object],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"sliderCarObj"] call ExAd_fnc_getNextIDC),[_midCol, _carTop + 2 * _rowH, _midColW, _rowH * 0.8]] call ExAd_fnc_createXSliderH;
|
||||
[_display,_newParent,([_slideClass,"editCarObj"] call ExAd_fnc_getNextIDC),[_rightCol, _carTop + 2 * _rowH, _rightColW, _rowH * 0.8]] call ExAd_fnc_createEdit;
|
||||
|
||||
[_display,_newParent,([_slideClass,"strTxtCarTerrain"] call ExAd_fnc_getNextIDC),[_leftCol, _carTop + 3 * _rowH, _leftColW, _rowH],format["%1:",STR_chvd_terrain],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"xListCarTerrain"] call ExAd_fnc_getNextIDC),[_midCol, _carTop + 3 * _rowH, _midColW, _rowH * 0.8],"",""] call ExAd_fnc_createXList;
|
||||
[_display,_newParent,([_slideClass,"strTxtCarTerrainEdit"] call ExAd_fnc_getNextIDC),[_rightCol, _carTop + 3 * _rowH, _rightColW, _rowH * 0.8],"","PuristaMedium",1,"#ffffff","center",1] call ExAd_fnc_createStructuredText;
|
||||
|
||||
|
||||
//IN AIR
|
||||
[_display,_newParent,([_slideClass,"strTxtAirTtl"] call ExAd_fnc_getNextIDC),[_leftCol, _airTop, _leftColW, _rowH],STR_chvd_air,"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"strTxtAirSync"] call ExAd_fnc_getNextIDC),[_rightCol + (4 * _pw) - _midColW, _airTop, _midColW, _rowH],format["%1:",STR_chvd_sync],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"cbAirSyncObj"] call ExAd_fnc_getNextIDC),[_rightCol + (3.8 * _pw), _airTop, _rightCol * 0.05, _rowH * 0.8],"",""] call ExAd_fnc_createCheckBox;
|
||||
|
||||
[_display,_newParent,([_slideClass,"strTxtAirView"] call ExAd_fnc_getNextIDC),[_leftCol, _airTop + _rowH, _leftColW, _rowH],format["%1:",STR_chvd_view],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"sliderAirView"] call ExAd_fnc_getNextIDC),[_midCol, _airTop + _rowH, _midColW, _rowH * 0.8]] call ExAd_fnc_createXSliderH;
|
||||
[_display,_newParent,([_slideClass,"editAirView"] call ExAd_fnc_getNextIDC),[_rightCol, _airTop + _rowH, _rightColW, _rowH * 0.8]] call ExAd_fnc_createEdit;
|
||||
|
||||
[_display,_newParent,([_slideClass,"strTxtAirObj"] call ExAd_fnc_getNextIDC),[_leftCol, _airTop + 2 * _rowH, _leftColW, _rowH],format["%1:",STR_chvd_object],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"sliderAirObj"] call ExAd_fnc_getNextIDC),[_midCol, _airTop + 2 * _rowH, _midColW, _rowH * 0.8]] call ExAd_fnc_createXSliderH;
|
||||
[_display,_newParent,([_slideClass,"editAirObj"] call ExAd_fnc_getNextIDC),[_rightCol, _airTop + 2 * _rowH, _rightColW, _rowH * 0.8]] call ExAd_fnc_createEdit;
|
||||
|
||||
[_display,_newParent,([_slideClass,"strTxtCarTerrain"] call ExAd_fnc_getNextIDC),[_leftCol, _airTop + 3 * _rowH, _leftColW, _rowH],format["%1:",STR_chvd_terrain],"PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText;
|
||||
[_display,_newParent,([_slideClass,"xListAirTerrain"] call ExAd_fnc_getNextIDC),[_midCol, _airTop + 3 * _rowH, _midColW, _rowH * 0.8],"",""] call ExAd_fnc_createXList;
|
||||
[_display,_newParent,([_slideClass,"strTxtAirTerrainEdit"] call ExAd_fnc_getNextIDC),[_rightCol, _airTop + 3 * _rowH, _rightColW, _rowH * 0.8],"","PuristaMedium",1,"#ffffff","center",1] call ExAd_fnc_createStructuredText;
|
||||
|
||||
|
||||
true
|
139
mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/onOpen.sqf
Normal file
139
mpmissions/Exile.Altis/ExAdClient/XM8/Apps/CHVD/onOpen.sqf
Normal file
@ -0,0 +1,139 @@
|
||||
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
|
||||
{
|
||||
([_display,"ExAd_CHVD",_x select 0] call ExAd_fnc_getAppCtrl) ctrlSetText format["%1", _x select 1];
|
||||
} forEach
|
||||
[
|
||||
["editFootView", str round CHVD_foot],
|
||||
["editFootObj", str round CHVD_footObj],
|
||||
["editCarView", str round CHVD_car],
|
||||
["editCarObj", str round CHVD_carObj],
|
||||
["editAirView", str round CHVD_air],
|
||||
["editAirObj", str round CHVD_airObj],
|
||||
["strTxtFootTerrainEdit", str CHVD_footTerrain],
|
||||
["strTxtCarTerrainEdit", str CHVD_carTerrain],
|
||||
["strTxtAirTerrainEdit", str CHVD_airTerrain]
|
||||
];
|
||||
|
||||
{
|
||||
private["_ctrl"];
|
||||
_ctrl = [_display,"ExAd_CHVD",_x select 0] call ExAd_fnc_getAppCtrl;
|
||||
_ctrl sliderSetRange [0, _x select 2];
|
||||
_ctrl sliderSetSpeed [500, 500];
|
||||
_ctrl sliderSetPosition (_x select 1);
|
||||
} forEach
|
||||
[
|
||||
["sliderFootView", CHVD_foot, CHVD_maxView],
|
||||
["sliderFootObj", CHVD_footObj, CHVD_maxObj],
|
||||
["sliderCarView", CHVD_car, CHVD_maxView],
|
||||
["sliderCarObj", CHVD_carObj, CHVD_maxObj],
|
||||
["sliderAirView", CHVD_air, CHVD_maxView],
|
||||
["sliderAirObj", CHVD_airObj, CHVD_maxObj]
|
||||
];
|
||||
|
||||
{
|
||||
([_display,"ExAd_CHVD",_x select 0] call ExAd_fnc_getAppCtrl) cbSetChecked (_x select 1);
|
||||
} forEach
|
||||
[
|
||||
["cbFootSyncObj",CHVD_footSyncObj],
|
||||
["cbCarSyncObj",CHVD_carSyncObj],
|
||||
["cbAirSyncObj",CHVD_airSyncObj]
|
||||
];
|
||||
|
||||
{
|
||||
_ctrl = [_display,"ExAd_CHVD",_x select 0] call ExAd_fnc_getAppCtrl;
|
||||
if (CHVD_allowNoGrass) then {
|
||||
_ctrl lbAdd STR_chvd_low;
|
||||
};
|
||||
_ctrl lbAdd STR_chvd_standard;
|
||||
_ctrl lbAdd STR_chvd_high;
|
||||
_ctrl lbAdd STR_chvd_veryHigh;
|
||||
|
||||
_sel = [_x select 1] call CHVD_fnc_selTerrainQuality;
|
||||
if (CHVD_allowNoGrass) then {
|
||||
_ctrl lbSetCurSel _sel;
|
||||
} else {
|
||||
_ctrl lbSetCurSel (_sel - 1);
|
||||
};
|
||||
} forEach
|
||||
[
|
||||
["xListFootTerrain",CHVD_footTerrain],
|
||||
["xListCarTerrain",CHVD_carTerrain],
|
||||
["xListAirTerrain",CHVD_airTerrain]
|
||||
];
|
||||
|
||||
//Edit eventHandlers
|
||||
_sliderFootView = [_display,"ExAd_CHVD","sliderFootView"] call ExAd_fnc_getAppCtrl;
|
||||
_editFootView = [_display,"ExAd_CHVD","editFootView"] call ExAd_fnc_getAppCtrl;
|
||||
_sliderFootObj = [_display,"ExAd_CHVD","sliderFootObj"] call ExAd_fnc_getAppCtrl;
|
||||
_editFootObj = [_display,"ExAd_CHVD","editFootObj"] call ExAd_fnc_getAppCtrl;
|
||||
_cbFootSyncObj = [_display,"ExAd_CHVD","cbFootSyncObj"] call ExAd_fnc_getAppCtrl;
|
||||
|
||||
_editFootView ctrlSetEventHandler ["KeyDown", format["['CHVD_foot', %1, _this select 0, 'CHVD_footObj', %2, %3, 'CHVD_footSyncObj'] call CHVD_fnc_onEBinput",ctrlIDC _sliderFootView, ctrlIDC _sliderFootObj, ctrlIDC _editFootObj]];
|
||||
|
||||
_editFootObj ctrlSetEventHandler ["KeyDown", format["['CHVD_footObj', %1, _this select 0] call CHVD_fnc_onEBinput", ctrlIDC _sliderFootObj]];
|
||||
|
||||
_cbFootSyncObj ctrlSetEventHandler ["CheckedChanged", format["[_this select 1, 'CHVD_footSyncObj', %1, %2, %3, 'CHVD_footObj'] call CHVD_fnc_onCheckedChanged", ctrlIDC _sliderFootObj, ctrlIDC _editFootObj, ctrlIDC _sliderFootView]];
|
||||
|
||||
_sliderFootView ctrlSetEventHandler ["SliderPosChanged", format["['CHVD_foot', _this select 0, _this select 1, %1, 'CHVD_footObj', %2, %3, 'CHVD_footSyncObj'] call CHVD_fnc_onSliderChange", ctrlIDC _editFootView, ctrlIDC _sliderFootObj, ctrlIDC _editFootObj]];
|
||||
|
||||
_sliderFootObj ctrlSetEventHandler ["SliderPosChanged", format["['CHVD_footObj', _this select 0, _this select 1, %1] call CHVD_fnc_onSliderChange", ctrlIDC _editFootObj]];
|
||||
|
||||
|
||||
_sliderCarView = [_display,"ExAd_CHVD","sliderCarView"] call ExAd_fnc_getAppCtrl;
|
||||
_editCarView = [_display,"ExAd_CHVD","editCarView"] call ExAd_fnc_getAppCtrl;
|
||||
_sliderCarObj = [_display,"ExAd_CHVD","sliderCarObj"] call ExAd_fnc_getAppCtrl;
|
||||
_editCarObj = [_display,"ExAd_CHVD","editCarObj"] call ExAd_fnc_getAppCtrl;
|
||||
_cbCarSyncObj = [_display,"ExAd_CHVD","cbCarSyncObj"] call ExAd_fnc_getAppCtrl;
|
||||
|
||||
_editCarView ctrlSetEventHandler ["KeyDown", format["['CHVD_car', %1, _this select 0, 'CHVD_carObj', %2, %3, 'CHVD_carSyncObj'] call CHVD_fnc_onEBinput",ctrlIDC _sliderCarView, ctrlIDC _sliderCarObj, ctrlIDC _editCarObj]];
|
||||
|
||||
_editCarObj ctrlSetEventHandler ["KeyDown", format["['CHVD_carObj', %1, _this select 0] call CHVD_fnc_onEBinput", ctrlIDC _sliderCarObj]];
|
||||
|
||||
_cbCarSyncObj ctrlSetEventHandler ["CheckedChanged", format["[_this select 1, 'CHVD_carSyncObj', %1, %2, %3, 'CHVD_carObj'] call CHVD_fnc_onCheckedChanged", ctrlIDC _sliderCarObj, ctrlIDC _editCarObj, ctrlIDC _sliderCarView]];
|
||||
|
||||
_sliderCarView ctrlSetEventHandler ["SliderPosChanged", format["['CHVD_car', _this select 0, _this select 1, %1, 'CHVD_carObj', %2, %3, 'CHVD_carSyncObj'] call CHVD_fnc_onSliderChange", ctrlIDC _editCarView, ctrlIDC _sliderCarObj, ctrlIDC _editCarObj]];
|
||||
|
||||
_sliderCarObj ctrlSetEventHandler ["SliderPosChanged", format["['CHVD_carObj', _this select 0, _this select 1, %1] call CHVD_fnc_onSliderChange", ctrlIDC _editCarObj]];
|
||||
|
||||
|
||||
_sliderAirView = [_display,"ExAd_CHVD","sliderAirView"] call ExAd_fnc_getAppCtrl;
|
||||
_editAirView = [_display,"ExAd_CHVD","editAirView"] call ExAd_fnc_getAppCtrl;
|
||||
_sliderAirObj = [_display,"ExAd_CHVD","sliderAirObj"] call ExAd_fnc_getAppCtrl;
|
||||
_editAirObj = [_display,"ExAd_CHVD","editAirObj"] call ExAd_fnc_getAppCtrl;
|
||||
_cbAirSyncObj = [_display,"ExAd_CHVD","cbAirSyncObj"] call ExAd_fnc_getAppCtrl;
|
||||
|
||||
_editAirView ctrlSetEventHandler ["KeyDown", format["['CHVD_air', %1, _this select 0, 'CHVD_airObj', %2, %3, 'CHVD_airSyncObj'] call CHVD_fnc_onEBinput",ctrlIDC _sliderAirView, ctrlIDC _sliderAirObj, ctrlIDC _editAirObj]];
|
||||
|
||||
_editAirObj ctrlSetEventHandler ["KeyDown", format["['CHVD_airObj', %1, _this select 0] call CHVD_fnc_onEBinput", ctrlIDC _sliderAirObj]];
|
||||
|
||||
_cbAirSyncObj ctrlSetEventHandler ["CheckedChanged", format["[_this select 1, 'CHVD_airSyncObj', %1, %2, %3, 'CHVD_airObj'] call CHVD_fnc_onCheckedChanged", ctrlIDC _sliderAirObj, ctrlIDC _editAirObj, ctrlIDC _sliderAirView]];
|
||||
|
||||
_sliderAirView ctrlSetEventHandler ["SliderPosChanged", format["['CHVD_air', _this select 0, _this select 1, %1, 'CHVD_airObj', %2, %3, 'CHVD_airSyncObj'] call CHVD_fnc_onSliderChange", ctrlIDC _editAirView, ctrlIDC _sliderAirObj, ctrlIDC _editAirObj]];
|
||||
|
||||
_sliderAirObj ctrlSetEventHandler ["SliderPosChanged", format["['CHVD_airObj', _this select 0, _this select 1, %1] call CHVD_fnc_onSliderChange", ctrlIDC _editAirObj]];
|
||||
|
||||
|
||||
{
|
||||
_ctrl = [_display,"ExAd_CHVD",_x select 0] call ExAd_fnc_getAppCtrl;
|
||||
_handle = _ctrl ctrlSetEventHandler ["LBSelChanged",
|
||||
format ["[_this select 1, '%1', '%2'] call CHVD_fnc_onLBSelChanged", _x select 1, _x select 2]
|
||||
];
|
||||
} forEach
|
||||
[
|
||||
["xListFootTerrain","CHVD_footTerrain","strTxtFootTerrainEdit"],
|
||||
["xListCarTerrain","CHVD_carTerrain","strTxtCarTerrainEdit"],
|
||||
["xListAirTerrain","CHVD_airTerrain","strTxtAirTerrainEdit"]
|
||||
];
|
||||
|
||||
|
||||
_footObj = if(CHVD_footSyncObj)then{false}else{true};
|
||||
([_display,"ExAd_CHVD","sliderFootObj"] call ExAd_fnc_getAppCtrl) ctrlEnable _footObj;
|
||||
([_display,"ExAd_CHVD","editFootObj"] call ExAd_fnc_getAppCtrl) ctrlEnable _footObj;
|
||||
|
||||
_carObj = if(CHVD_carSyncObj)then{false}else{true};
|
||||
([_display,"ExAd_CHVD","sliderCarObj"] call ExAd_fnc_getAppCtrl) ctrlEnable _carObj;
|
||||
([_display,"ExAd_CHVD","editCarObj"] call ExAd_fnc_getAppCtrl) ctrlEnable _carObj;
|
||||
|
||||
_airObj = if(CHVD_airSyncObj)then{false}else{true};
|
||||
([_display,"ExAd_CHVD","sliderAirObj"] call ExAd_fnc_getAppCtrl) ctrlEnable _airObj;
|
||||
([_display,"ExAd_CHVD","editAirObj"] call ExAd_fnc_getAppCtrl) ctrlEnable _airObj;
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
fn_createExtraApps.sqf
|
||||
onLoad.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
fn_createExtraApps.sqf
|
||||
onLoad.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
|
@ -24,11 +24,14 @@ file = "ExAdClient\XM8\Functions";
|
||||
class createButton {};
|
||||
class createCheckBox {};
|
||||
class createCtrlGrp {};
|
||||
class createEdit {};
|
||||
class createExtraApps {};
|
||||
class createFrame {};
|
||||
class createList {};
|
||||
class createPicture {};
|
||||
class createStructuredText {};
|
||||
class createXList {};
|
||||
class createXSliderH {};
|
||||
class getAppCtrl {};
|
||||
class getNextIDC {};
|
||||
class postInitXM8 {file = "ExAdClient\XM8\postInit.sqf"; postInit = 1;};
|
||||
|
@ -44,7 +44,7 @@ _display = uiNameSpace getVariable ["RscExileXM8", displayNull];
|
||||
_pW = 0.025; _pH = 0.04;
|
||||
|
||||
{
|
||||
private["_ctrl","_pos","logo"];
|
||||
private["_ctrl","_pos","_logo"];
|
||||
_ctrl = (_display displayCtrl _count2);
|
||||
_pos = ctrlPosition _ctrl;
|
||||
_slide = ctrlParentControlsGroup _ctrl;
|
||||
|
@ -1,6 +1,7 @@
|
||||
params ["_display","_parent","_idc","_position",["_action",""],["_text",""],["_tooltip",""],"_ctrl"];
|
||||
|
||||
_ctrl = _display ctrlCreate ["RscButtonMenu",_idc,_parent];
|
||||
/*_ctrl = _display ctrlCreate ["RscButtonMenu",_idc,_parent];*/
|
||||
_ctrl = _display ctrlCreate ["RscExileXM8ButtonMenu",_idc,_parent];
|
||||
_ctrl ctrlSetPosition _position;
|
||||
_ctrl ctrlSetText _text;
|
||||
_ctrl ctrlSetEventHandler ["ButtonClick",_action];
|
||||
|
@ -2,7 +2,6 @@ params ["_display","_parent","_idc","_position","_ctrl"];
|
||||
|
||||
_ctrl = _display ctrlCreate ["RscControlsGroup", _idc, _parent];
|
||||
_ctrl ctrlSetPosition _position;
|
||||
_ctrl ctrlEnable false;
|
||||
_ctrl ctrlCommit 0;
|
||||
|
||||
_ctrl
|
@ -0,0 +1,8 @@
|
||||
params ["_display","_parent","_idc","_position","_text"];
|
||||
|
||||
_ctrl = _display ctrlCreate ["RscEdit", _idc, _parent];
|
||||
_ctrl ctrlSetPosition _position;
|
||||
_ctrl ctrlSetText _text;
|
||||
_ctrl ctrlCommit 0;
|
||||
|
||||
_ctrl
|
@ -0,0 +1,9 @@
|
||||
params ["_display","_parent","_idc","_position","_actionOnSelChanged","_tooltip","_ctrl"];
|
||||
|
||||
_ctrl = _display ctrlCreate ["RscXListBox",_idc,_parent];
|
||||
_ctrl ctrlSetPosition _position;
|
||||
_ctrl ctrlSetEventHandler ["LBSelChanged",_actionOnSelChanged];
|
||||
_ctrl ctrlSetTooltip _tooltip;
|
||||
_ctrl ctrlCommit 0;
|
||||
|
||||
_ctrl
|
@ -0,0 +1,7 @@
|
||||
params ["_display","_parent","_idc","_position","_ctrl"];
|
||||
|
||||
_ctrl = _display ctrlCreate ["RscXSliderH", _idc, _parent];
|
||||
_ctrl ctrlSetPosition _position;
|
||||
_ctrl ctrlCommit 0;
|
||||
|
||||
_ctrl
|
@ -35,7 +35,7 @@
|
||||
<Original>%2 %1Pin code: %3 %1Fuel: %4 %1Damage: %5 %1Texture: %6 %1Items: %7 %1Magazines: %8 %1Weapons: %9</Original> <!-- %1 - New line | %2 - Vehicle class display name | %3 - Pin Code | %4 - Fuel | %5 - Damage | %6 - Texture | %7 - Items | %8 - Magazines | %9 - Weapons -->
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_VG_APP_BTN_BACK">
|
||||
<Original>Go Back</Original>
|
||||
<Original>GO BACK</Original>
|
||||
</Key>
|
||||
<Key ID="STR_ExAd_VG_APP_BTN_FETCH">
|
||||
<Original>Fetch</Original>
|
||||
|
Reference in New Issue
Block a user