diff --git a/BattlEye/scripts.txt b/BattlEye/scripts.txt index 292439c..4a9c69c 100644 --- a/BattlEye/scripts.txt +++ b/BattlEye/scripts.txt @@ -1,4 +1,4 @@ -eventHandler !="ExAd_ACTION_PARACHUTE_DETACH = (findDisplay 46) displayAddEventHandler ["KeyDown",{" +eventHandler !="ExAd_ACTION_PARACHUTE_DETACH = (findDisplay 46) displayAddEventHandler [\"KeyDown\",{" compile !="call compile format[\"_messageParameters call ExAd_fnc_%1;\",_messageName]" !="call compile format['%1 = if(isLocalized \"%1\")then{localize \"%1\"}else{\"%3" createVehicle !="_parachuteObject = createVehicle [\"Steerable_Parachute_F\", getPosATL player, [], 0, \"CAN_COLLIDE\"]" addAction !="ExAd_ACTION_PARACHUTE = player addaction [format" diff --git a/CHANGELOG.md b/CHANGELOG.md index ea3934d..46052ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ #ExAd # Changelog: +## 1607330 11:00 . v0.7.11 +### Fixed +* Modified fn_addApps. (XM8) + +### Added +* New App function , fn_createCombo (XM8) + ## 160726 17:15 . v0.7.10 ### Fixed * Apply custom functions to "More" app buttons. (XM8) diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/DeployVehicle/INSTALL.md b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/DeployVehicle/INSTALL.md index 1ebe993..248683c 100644 --- a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/DeployVehicle/INSTALL.md +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/DeployVehicle/INSTALL.md @@ -1,84 +1,84 @@ -#Installation Instructions - -* Move "DeployVehicle" into your "mpmissions\Exile.Tanoa\ExAdClient\XM8\Apps\" folder. -* Navigate and open "mpmissions\Exile.Tanoa\config.cpp" insert the classes "PackDeployedVehicle" into appropriate parent classes. -```cpp -class CfgInteractionMenus -{ - class Car - { - targetType = 2; - target = "Car"; - - class Actions - { - class PackDeployedVehicle: ExileAbstractAction - { - title = "Pack Vehicle"; - condition = "call ExAd_XM8_DV_fnc_canPack"; - action = "call ExAd_XM8_DV_fnc_pack"; - }; - }; - }; - class Bikes - { - targetType = 2; - target = "Bicycle"; - - class Actions - { - class PackDeployedVehicle: ExileAbstractAction - { - title = "Pack Bike"; - condition = "call ExAd_XM8_DV_fnc_canPack"; - action = "call ExAd_XM8_DV_fnc_pack"; - }; - }; - }; -}; -``` - -* Move over and pack exad_dv into "@ExileServer\addons\" -* Add deploy classes into CfgXM8 in "mpmissions\Exile.Tanoa\config.cpp" and add them to the extraApps array; E.g. -```cpp -class CfgXM8 -{ - extraApps[] = {"ExAd_Bike","ExAd_Quad"}; - - class ExAd_Bike - { - title = "Deploy Bike"; - config = "ExadClient\XM8\Apps\DeployVehicle\config.sqf"; - bambiState = 0; - vehicleClass = "Exile_Bike_MountainBike"; - recipe[] = {{"Exile_Item_ExtensionCord",-1}}; - packable = 1; - autoCleanUp = 1; - quickFunction = "['ExAd_Bike'] call ExAd_XM8_DV_fnc_spawnVehicle"; - }; - class ExAd_Quad - { - title = "Deploy Quad"; - bambiState = 0; - vehicleClass = "Exile_Bike_QuadBike_Fia"; - recipe[] = {{"Exile_Item_ExtensionCord",1}}; - packable = 1; - quickFunction = "['ExAd_Quad'] call ExAd_XM8_DV_fnc_spawnVehicle"; - }; -}; - -``` -## How to use -Each class added to the CfgXM8 will represent a vehicle possible to deploy and add commit a "More" button to it. -One of the deploy classes needs to include the config script so all needed functions will be prepared and read to memory. - -### Options -* title = "Deploy Bike"; -- Button title -* bambiState = 0; -- Bambistate required || 1 = True / 0 = False -* vehicleClass = "Exile_Bike_MountainBike"; -- CfgVehicles class name of desired vehicle -* recipe[] = { - {"Exile_Item_ExtensionCord",-1} - }; -- items needed to craft vehicle, first class name then amount (-1 means required but will not be taken from inventory) -* packable = 1; -- Deployed vehicle can be pack again || 1 = True / 0 = False -* autoCleanUp = 1; -- Server monitize crafted vehicles and despawn if idle to long. || 1 = True / 0 = False -* quickFunction = "['ExAd_Bike'] call ExAd_XM8_DV_fnc_spawnVehicle"; -- Function that is binded to the button if slide is not neccessary. +#Installation Instructions + +* Move "DeployVehicle" into your "mpmissions\Exile.Tanoa\ExAdClient\XM8\Apps\" folder. +* Navigate and open "mpmissions\Exile.Tanoa\config.cpp" insert the classes "PackDeployedVehicle" into appropriate parent classes. +```cpp +class CfgInteractionMenus +{ + class Car + { + targetType = 2; + target = "Car"; + + class Actions + { + class PackDeployedVehicle: ExileAbstractAction + { + title = "Pack Vehicle"; + condition = "call ExAd_XM8_DV_fnc_canPack"; + action = "call ExAd_XM8_DV_fnc_pack"; + }; + }; + }; + class Bikes + { + targetType = 2; + target = "Bicycle"; + + class Actions + { + class PackDeployedVehicle: ExileAbstractAction + { + title = "Pack Bike"; + condition = "call ExAd_XM8_DV_fnc_canPack"; + action = "call ExAd_XM8_DV_fnc_pack"; + }; + }; + }; +}; +``` + +* Move over and pack exad_dv into "@ExileServer\addons\" +* Add deploy classes into CfgXM8 in "mpmissions\Exile.Tanoa\config.cpp" and add them to the extraApps array; E.g. +```cpp +class CfgXM8 +{ + extraApps[] = {"ExAd_Bike","ExAd_Quad"}; + + class ExAd_Bike + { + title = "Deploy Bike"; + config = "ExadClient\XM8\Apps\DeployVehicle\config.sqf"; + bambiState = 0; + vehicleClass = "Exile_Bike_MountainBike"; + recipe[] = {{"Exile_Item_ExtensionCord",-1}}; + packable = 1; + autoCleanUp = 1; + quickFunction = "['ExAd_Bike'] call ExAd_XM8_DV_fnc_spawnVehicle"; + }; + class ExAd_Quad + { + title = "Deploy Quad"; + bambiState = 0; + vehicleClass = "Exile_Bike_QuadBike_Fia"; + recipe[] = {{"Exile_Item_ExtensionCord",1}}; + packable = 1; + quickFunction = "['ExAd_Quad'] call ExAd_XM8_DV_fnc_spawnVehicle"; + }; +}; + +``` +## How to use +Each class added to the CfgXM8 will represent a vehicle possible to deploy and add commit a "More" button to it. +One of the deploy classes needs to include the config script so all needed functions will be prepared and read to memory. + +### Options +* title = "Deploy Bike"; -- Button title +* bambiState = 0; -- Bambistate required || 1 = True / 0 = False +* vehicleClass = "Exile_Bike_MountainBike"; -- CfgVehicles class name of desired vehicle +* recipe[] = { + {"Exile_Item_ExtensionCord",-1} + }; -- items needed to craft vehicle, first class name then amount (-1 means required but will not be taken from inventory) +* packable = 1; -- Deployed vehicle can be pack again || 1 = True / 0 = False +* autoCleanUp = 1; -- Server monitize crafted vehicles and despawn if idle to long. || 1 = True / 0 = False +* quickFunction = "['ExAd_Bike'] call ExAd_XM8_DV_fnc_spawnVehicle"; -- Function that is binded to the button if slide is not neccessary. diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp index 575ebbf..5c99c30 100644 --- a/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp @@ -23,6 +23,7 @@ file = "ExAdClient\XM8\Functions"; class createBackgroundGUI {}; class createButton {}; class createCheckBox {}; + class createCombo {}; class createCtrlGrp {}; class createEdit {}; class createExtraApps {}; diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_addApps.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_addApps.sqf index cfe81c6..ff1dfe4 100644 --- a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_addApps.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_addApps.sqf @@ -42,13 +42,13 @@ while {_title != ""} do _display = uiNameSpace getVariable ["RscExileXM8", displayNull]; _pW = 0.025; _pH = 0.04; +_slide = ctrlParentControlsGroup (_display displayCtrl _count2); { - private["_ctrl","_pos","_logo"]; - _ctrl = (_display displayCtrl _count2); + private["_ctrl","_pos","_logo","_function"]; + _ctrl = _display displayCtrl _count2; _pos = ctrlPosition _ctrl; - _slide = ctrlParentControlsGroup _ctrl; - + _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; diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCombo.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCombo.sqf new file mode 100644 index 0000000..cdc6e4b --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCombo.sqf @@ -0,0 +1,9 @@ +params ["_display","_parent","_idc","_position","_actionOnSelChanged","_tooltip","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscCombo",_idc,_parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetEventHandler ["LBSelChanged",_actionOnSelChanged]; +_ctrl ctrlSetTooltip _tooltip; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file