-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* work on arsenal actions * cycle through pages * docs * cleanup * Update addons/gunbag/functions/fnc_weaponName.sqf Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com> * missing fil * Update addons/arsenal/functions/fnc_itemInfo.sqf * Update addons/arsenal/functions/fnc_refresh.sqf Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com> * remove CBA_loadoutSet gunbag cache * update fnc_refresh * fix 3den --------- Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com> Co-authored-by: Salluci <salluci.lovi@gmail.com> Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
- Loading branch information
1 parent
7498476
commit 3edeff2
Showing
22 changed files
with
563 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
class GVAR(actions) {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "script_component.hpp" | ||
#include "..\defines.hpp" | ||
/* | ||
* Author: Brett Mayson | ||
* Handles the previous / next page buttons for actions | ||
* | ||
* Arguments: | ||
* 0: Arsenal display <DISPLAY> | ||
* 1. Actions control <CONTROL> | ||
* 2: Previous or next <BOOL> (false = previous, true = next) | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_display", "_control", "_nextPage"]; | ||
|
||
TRACE_1("control enabled", ctrlEnabled _control); | ||
if !(ctrlEnabled _control) exitWith {}; | ||
|
||
GVAR(currentActionPage) = GVAR(currentActionPage) + ([-1, 1] select _nextPage); | ||
|
||
GVAR(actionsInfo) params ["_panelControl", "_curSel", "_itemCfg"]; | ||
[QGVAR(displayActions), [_display, _panelControl, _curSel, _itemCfg]] call CBA_fnc_localEvent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: Brett Mayson | ||
* Create the internal actions arrays when needed for the first time | ||
* | ||
* Arguments: | ||
* None | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Public: No | ||
*/ | ||
|
||
if (!isNil QGVAR(actionList)) exitWith {}; | ||
|
||
private _actionList = [ | ||
[], // Primary 0 | ||
[], // Handgun 1 | ||
[], // Launcher 2 | ||
[], // Uniform 3 | ||
[], // Vests 4 | ||
[], // Backpacks 5 | ||
[], // Headgear 6 | ||
[], // Goggles 7 | ||
[], // NVGs 8 | ||
[], // Binoculars 9 | ||
[], // Map 10 | ||
[], // GPS 11 | ||
[], // Radio 12 | ||
[], // Compass 13 | ||
[], // Watch 14 | ||
[], // Face 15 | ||
[], // Voice 16 | ||
[] // Insignia 17 | ||
]; | ||
|
||
private _configGroupEntries = "true" configClasses (configFile >> QGVAR(actions)); | ||
|
||
{ | ||
private _configActions = "true" configClasses _x; | ||
|
||
private _rootDisplayName = getText (_x >> "displayName"); | ||
private _rootCondition = getText (_x >> "condition"); | ||
private _rootTabs = getArray (_x >> "tabs"); | ||
|
||
if (_rootCondition != "") then { | ||
_rootCondition = compile _rootCondition; | ||
} else { | ||
_rootCondition = {true}; | ||
}; | ||
|
||
private _group = []; | ||
|
||
{ | ||
private _label = getText (_x >> "label"); | ||
private _condition = getText (_x >> "condition"); | ||
private _statement = getText (_x >> "statement"); | ||
private _text = getText (_x >> "text"); | ||
private _textStatement = getText (_x >> "textStatement"); | ||
|
||
private _type = switch (false) do { | ||
case (_text == ""): { | ||
_statement = format ["""%1""", _text]; | ||
ACTION_TYPE_TEXT | ||
}; | ||
case (_textStatement == ""): { | ||
_statement = _textStatement; | ||
ACTION_TYPE_TEXT | ||
}; | ||
case (_statement == ""): { | ||
_statement = _statement; | ||
ACTION_TYPE_BUTTON | ||
}; | ||
default { | ||
-1 | ||
}; | ||
}; | ||
if (_type == -1) then { | ||
continue; | ||
}; | ||
_statement = compile format [QUOTE([GVAR(center)] call {%1}), _statement]; | ||
|
||
if (_condition != "") then { | ||
_condition = compile _condition; | ||
} else { | ||
_condition = {true}; | ||
}; | ||
|
||
_group pushBack [_type, _label, _statement, _condition]; | ||
} forEach _configActions; | ||
|
||
{ | ||
(_actionList select _x) pushBack [_rootDisplayName, _rootCondition, _group]; | ||
} forEach _rootTabs; | ||
} forEach _configGroupEntries; | ||
|
||
missionNamespace setVariable [QGVAR(actionList), _actionList]; |
Oops, something went wrong.