mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Arsenal - Favorites System (#9307)
* improve page handling * drop MAX_STATS_PER_PAGE for now * hide stats box when empty * improve hiding * improve _fnc_hideUnused * condition * prevent page overflow Co-authored-by: PabstMirror <pabstmirror@gmail.com> * favorites var * function prep * favorites only * improve favorites adding, add include * fix stupid * fix color setting (todo: lnb color) * add button, finalize * setting tooltip * stringtable again * fix setting overwrite, improve tooltip * fix losing weapon items * fix macro * fix setting to intended overwrite * remove unnecessary private * docs * more docs * is * improve button text * docs * fix tooltip not showing unless menuBar was clicked * improve weapon accessory lookup * empty line * update refresh calls * fix left panel * cleanup currentCargo * use BI string for favorites * BI strings again * no favorites for face/voice/insignia * stringtable again * add missing setColorRight * Add comment for favorites setup --------- Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
2f8d92701f
commit
d33a158e2e
@ -21,6 +21,7 @@ PREP(buttonActionsPage);
|
|||||||
PREP(buttonCargo);
|
PREP(buttonCargo);
|
||||||
PREP(buttonClearAll);
|
PREP(buttonClearAll);
|
||||||
PREP(buttonExport);
|
PREP(buttonExport);
|
||||||
|
PREP(buttonFavorites);
|
||||||
PREP(buttonHide);
|
PREP(buttonHide);
|
||||||
PREP(buttonImport);
|
PREP(buttonImport);
|
||||||
PREP(buttonLoadoutsDelete);
|
PREP(buttonLoadoutsDelete);
|
||||||
@ -55,6 +56,7 @@ PREP(onLoadoutsClose);
|
|||||||
PREP(onLoadoutsOpen);
|
PREP(onLoadoutsOpen);
|
||||||
PREP(onMouseButtonDown);
|
PREP(onMouseButtonDown);
|
||||||
PREP(onMouseButtonUp);
|
PREP(onMouseButtonUp);
|
||||||
|
PREP(onPanelDblClick);
|
||||||
PREP(onSelChangedLeft);
|
PREP(onSelChangedLeft);
|
||||||
PREP(onSelChangedLoadouts);
|
PREP(onSelChangedLoadouts);
|
||||||
PREP(onSelChangedRight);
|
PREP(onSelChangedRight);
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#define WIDTH_TOTAL (safezoneW - 2 * (93 * GRID_W))
|
#define WIDTH_TOTAL (safezoneW - 2 * (93 * GRID_W))
|
||||||
#define WIDTH_GAP (WIDTH_TOTAL / 100)
|
#define WIDTH_GAP (WIDTH_TOTAL / 100)
|
||||||
#define WIDTH_SINGLE ((WIDTH_TOTAL - 6 * WIDTH_GAP) / 5)
|
#define WIDTH_SINGLE ((WIDTH_TOTAL - 7 * WIDTH_GAP) / 6)
|
||||||
|
|
||||||
// IDDs
|
// IDDs
|
||||||
#define IDD_MISSION 46
|
#define IDD_MISSION 46
|
||||||
@ -19,6 +19,9 @@
|
|||||||
#define ASCENDING 0
|
#define ASCENDING 0
|
||||||
#define DESCENDING 1
|
#define DESCENDING 1
|
||||||
|
|
||||||
|
// Favorites
|
||||||
|
#define FAVORITES_COLOR (GVAR(favoritesColor) + [1])
|
||||||
|
|
||||||
// IDCs
|
// IDCs
|
||||||
#define IDD_ace_arsenal 1127001
|
#define IDD_ace_arsenal 1127001
|
||||||
#define IDC_mouseArea 0
|
#define IDC_mouseArea 0
|
||||||
@ -39,6 +42,7 @@
|
|||||||
#define IDC_buttonLoadouts 1003
|
#define IDC_buttonLoadouts 1003
|
||||||
#define IDC_buttonExport 1004
|
#define IDC_buttonExport 1004
|
||||||
#define IDC_buttonImport 1005
|
#define IDC_buttonImport 1005
|
||||||
|
#define IDC_buttonFavorites 1006
|
||||||
#define IDC_infoBox 11
|
#define IDC_infoBox 11
|
||||||
#define IDC_infoBackground 1101
|
#define IDC_infoBackground 1101
|
||||||
#define IDC_infoName 1102
|
#define IDC_infoName 1102
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Dedmen, johnb43
|
* Author: Dedmen, johnb43
|
||||||
* Add a listbox row.
|
* Add a listbox row.
|
||||||
@ -20,6 +21,26 @@
|
|||||||
|
|
||||||
params ["_configCategory", "_className", "_ctrlPanel", ["_pictureEntryName", "picture", [""]]];
|
params ["_configCategory", "_className", "_ctrlPanel", ["_pictureEntryName", "picture", [""]]];
|
||||||
|
|
||||||
|
private _skip = GVAR(favoritesOnly) && {!(_className in GVAR(currentItems))} && {!((toLower _className) in GVAR(favorites))};
|
||||||
|
if (_skip) then {
|
||||||
|
switch (GVAR(currentLeftPanel)) do {
|
||||||
|
case IDC_buttonPrimaryWeapon: {
|
||||||
|
_skip = !(_className in (GVAR(currentItems) select IDX_CURR_PRIMARY_WEAPON_ITEMS));
|
||||||
|
};
|
||||||
|
case IDC_buttonHandgun: {
|
||||||
|
_skip = !(_className in (GVAR(currentItems) select IDX_CURR_HANDGUN_WEAPON_ITEMS));
|
||||||
|
};
|
||||||
|
case IDC_buttonSecondaryWeapon: {
|
||||||
|
_skip = !(_className in (GVAR(currentItems) select IDX_CURR_PRIMARY_WEAPON_ITEMS));
|
||||||
|
};
|
||||||
|
case IDC_buttonBinoculars: {
|
||||||
|
_skip = !(_className in (GVAR(currentItems) select IDX_CURR_BINO_ITEMS));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_skip) exitWith {};
|
||||||
|
|
||||||
// Sanitise key, as it's public; If not in cache, find info and cache it for later use
|
// Sanitise key, as it's public; If not in cache, find info and cache it for later use
|
||||||
((uiNamespace getVariable QGVAR(addListBoxItemCache)) getOrDefaultCall [_configCategory + _className, {
|
((uiNamespace getVariable QGVAR(addListBoxItemCache)) getOrDefaultCall [_configCategory + _className, {
|
||||||
// Get classname (config case), display name, picture and DLC
|
// Get classname (config case), display name, picture and DLC
|
||||||
@ -35,3 +56,8 @@ _ctrlPanel lbSetData [_lbAdd, _className];
|
|||||||
_ctrlPanel lbSetPicture [_lbAdd, _itemPicture];
|
_ctrlPanel lbSetPicture [_lbAdd, _itemPicture];
|
||||||
_ctrlPanel lbSetPictureRight [_lbAdd, ["", _modPicture] select GVAR(enableModIcons)];
|
_ctrlPanel lbSetPictureRight [_lbAdd, ["", _modPicture] select GVAR(enableModIcons)];
|
||||||
_ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _className]];
|
_ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _className]];
|
||||||
|
|
||||||
|
if ((toLower _className) in GVAR(favorites)) then {
|
||||||
|
_ctrlPanel lbSetColor [_lbAdd, FAVORITES_COLOR];
|
||||||
|
_ctrlPanel lbSetSelectColor [_lbAdd, FAVORITES_COLOR];
|
||||||
|
};
|
||||||
|
32
addons/arsenal/functions/fnc_buttonFavorites.sqf
Normal file
32
addons/arsenal/functions/fnc_buttonFavorites.sqf
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
|
/*
|
||||||
|
* Author: LinkIsGrim
|
||||||
|
* Switches the arsenal between displaying all items and favorites
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Arsenal display <DISPLAY>
|
||||||
|
* 1: Button control <CONTROL>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["_display", "_control"];
|
||||||
|
|
||||||
|
private _firstRun = false;
|
||||||
|
|
||||||
|
if (isNil QGVAR(favoritesOnly)) then {
|
||||||
|
GVAR(favoritesOnly) = GVAR(defaultToFavorites);
|
||||||
|
_firstRun = true;
|
||||||
|
} else {
|
||||||
|
GVAR(favoritesOnly) = !GVAR(favoritesOnly);
|
||||||
|
};
|
||||||
|
|
||||||
|
_control ctrlSetText format ["%1: %2", localize "STR_GEAR_ITEMS", localize (["str_word_all", "STR_3DEN_Favorite_textPlural"] select GVAR(favoritesOnly))];
|
||||||
|
|
||||||
|
if (_firstRun) exitWith {};
|
||||||
|
|
||||||
|
[false] call FUNC(refresh);
|
@ -51,7 +51,7 @@ if (GVAR(shiftState) && {is3DEN}) then {
|
|||||||
[GVAR(center), _extendedLoadout] call CBA_fnc_setLoadout;
|
[GVAR(center), _extendedLoadout] call CBA_fnc_setLoadout;
|
||||||
|
|
||||||
// Update current item list and unique items
|
// Update current item list and unique items
|
||||||
call FUNC(refresh);
|
[true] call FUNC(refresh);
|
||||||
|
|
||||||
_extendedLoadout params ["_loadout", "_extendedInfo"];
|
_extendedLoadout params ["_loadout", "_extendedInfo"];
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ private _extendedLoadout = switch (GVAR(currentLoadoutsTab)) do {
|
|||||||
[GVAR(center), _extendedLoadout, true] call CBA_fnc_setLoadout;
|
[GVAR(center), _extendedLoadout, true] call CBA_fnc_setLoadout;
|
||||||
|
|
||||||
// Update current item list and unique items
|
// Update current item list and unique items
|
||||||
call FUNC(refresh);
|
[true] call FUNC(refresh);
|
||||||
|
|
||||||
_extendedLoadout params ["_loadout", "_extendedInfo"];
|
_extendedLoadout params ["_loadout", "_extendedInfo"];
|
||||||
|
|
||||||
|
@ -43,9 +43,13 @@ private _cfgMagazines = configFile >> "CfgMagazines";
|
|||||||
private _cfgWeapons = configFile >> "CfgWeapons";
|
private _cfgWeapons = configFile >> "CfgWeapons";
|
||||||
private _rightPanelCache = uiNamespace getVariable QGVAR(rightPanelCache);
|
private _rightPanelCache = uiNamespace getVariable QGVAR(rightPanelCache);
|
||||||
|
|
||||||
|
private _currentCargo = itemsWithMagazines GVAR(center);
|
||||||
|
|
||||||
private _fnc_fillRightContainer = {
|
private _fnc_fillRightContainer = {
|
||||||
params ["_configCategory", "_className", "_hasItemInfo", ["_isUnique", false, [false]], ["_unknownOrigin", false, [false]]];
|
params ["_configCategory", "_className", "_hasItemInfo", ["_isUnique", false, [false]], ["_unknownOrigin", false, [false]]];
|
||||||
|
|
||||||
|
if (GVAR(favoritesOnly) && {!(_className in _currentCargo)} && {!((toLower _className) in GVAR(favorites))}) exitWith {};
|
||||||
|
|
||||||
// If item is not in the arsenal, it must be unique
|
// If item is not in the arsenal, it must be unique
|
||||||
if (!_isUnique && {!(_className in GVAR(virtualItemsFlat))}) then {
|
if (!_isUnique && {!(_className in GVAR(virtualItemsFlat))}) then {
|
||||||
_isUnique = true;
|
_isUnique = true;
|
||||||
@ -94,11 +98,16 @@ private _fnc_fillRightContainer = {
|
|||||||
}, true]) params ["_displayName", "_picture", "_mass"];
|
}, true]) params ["_displayName", "_picture", "_mass"];
|
||||||
|
|
||||||
private _lbAdd = _ctrlPanel lnbAddRow ["", _displayName, "0"];
|
private _lbAdd = _ctrlPanel lnbAddRow ["", _displayName, "0"];
|
||||||
|
_ctrlPanel lnbSetText [[_lbAdd, 1], _displayName];
|
||||||
_ctrlPanel lnbSetData [[_lbAdd, 0], _className];
|
_ctrlPanel lnbSetData [[_lbAdd, 0], _className];
|
||||||
_ctrlPanel lnbSetPicture [[_lbAdd, 0], _picture];
|
_ctrlPanel lnbSetPicture [[_lbAdd, 0], _picture];
|
||||||
_ctrlPanel lnbSetValue [[_lbAdd, 0], _mass];
|
_ctrlPanel lnbSetValue [[_lbAdd, 0], _mass];
|
||||||
_ctrlPanel lnbSetValue [[_lbAdd, 2], [0, 1] select _isUnique];
|
_ctrlPanel lnbSetValue [[_lbAdd, 2], [0, 1] select _isUnique];
|
||||||
_ctrlPanel lnbSetTooltip [[_lbAdd, 0], format ["%1\n%2", _displayName, _className]];
|
_ctrlPanel lnbSetTooltip [[_lbAdd, 0], format ["%1\n%2", _displayName, _className]];
|
||||||
|
if ((toLower _className) in GVAR(favorites)) then {
|
||||||
|
_ctrlPanel lnbSetColor [[_lbAdd, 1], FAVORITES_COLOR];
|
||||||
|
_ctrlPanel lnbSetColorRight [[_lbAdd, 1], FAVORITES_COLOR];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
private _ctrlPanel = _display displayCtrl IDC_rightTabContent;
|
private _ctrlPanel = _display displayCtrl IDC_rightTabContent;
|
||||||
|
@ -94,10 +94,9 @@ _actionsCurrentPageCtrl ctrlCommit 0;
|
|||||||
case ACTION_TYPE_BUTTON: {
|
case ACTION_TYPE_BUTTON: {
|
||||||
_actionButtonCtrl ctrlRemoveAllEventHandlers "ButtonClick";
|
_actionButtonCtrl ctrlRemoveAllEventHandlers "ButtonClick";
|
||||||
_actionButtonCtrl ctrlAddEventHandler ["ButtonClick", {
|
_actionButtonCtrl ctrlAddEventHandler ["ButtonClick", {
|
||||||
if (is3DEN) exitWith {call FUNC(refresh)};
|
if (is3DEN) exitWith {[true] call FUNC(refresh)};
|
||||||
|
|
||||||
[{
|
[{
|
||||||
call FUNC(refresh);
|
[true] call FUNC(refresh);
|
||||||
}] call CBA_fnc_execNextFrame;
|
}] call CBA_fnc_execNextFrame;
|
||||||
}];
|
}];
|
||||||
_actionButtonCtrl ctrlAddEventHandler ["ButtonClick", _statement];
|
_actionButtonCtrl ctrlAddEventHandler ["ButtonClick", _statement];
|
||||||
|
@ -127,6 +127,10 @@ GVAR(statsInfo) = nil;
|
|||||||
GVAR(showActions) = nil;
|
GVAR(showActions) = nil;
|
||||||
GVAR(currentActionPage) = nil;
|
GVAR(currentActionPage) = nil;
|
||||||
|
|
||||||
|
profileNamespace setVariable [QGVAR(favorites), GVAR(favorites)];
|
||||||
|
GVAR(favoritesOnly) = nil;
|
||||||
|
GVAR(favorites) = nil;
|
||||||
|
|
||||||
GVAR(center) = nil;
|
GVAR(center) = nil;
|
||||||
GVAR(centerNotPlayer) = nil;
|
GVAR(centerNotPlayer) = nil;
|
||||||
|
|
||||||
|
@ -95,6 +95,10 @@ GVAR(currentActionPage) = 0;
|
|||||||
// Update current item list
|
// Update current item list
|
||||||
call FUNC(updateCurrentItemsList);
|
call FUNC(updateCurrentItemsList);
|
||||||
|
|
||||||
|
// Setup favorites button text and switch to default mode defined by setting
|
||||||
|
[_display, _display displayCtrl IDC_buttonFavorites] call FUNC(buttonFavorites);
|
||||||
|
GVAR(favorites) = profileNamespace getVariable [QGVAR(favorites), createHashMap];
|
||||||
|
|
||||||
// This takes care of unique inventory items and unique equipment (arsenal doesn't have items/equipment whitelisted)
|
// This takes care of unique inventory items and unique equipment (arsenal doesn't have items/equipment whitelisted)
|
||||||
call FUNC(updateUniqueItemsList);
|
call FUNC(updateUniqueItemsList);
|
||||||
|
|
||||||
|
50
addons/arsenal/functions/fnc_onPanelDblClick.sqf
Normal file
50
addons/arsenal/functions/fnc_onPanelDblClick.sqf
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
|
#include "\a3\ui_f\hpp\defineResincl.inc"
|
||||||
|
/*
|
||||||
|
* Author: LinkIsGrim
|
||||||
|
* Add or remove item(s) to favorites when LShift is pressed
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Left panel control <CONTROL>
|
||||||
|
* 1: Left panel selection <NUMBER>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
params ["_control", "_curSel"];
|
||||||
|
|
||||||
|
if !(GVAR(shiftState)) exitWith {};
|
||||||
|
|
||||||
|
if (GVAR(currentLeftPanel) in [IDC_buttonFace, IDC_buttonVoice, IDC_buttonInsigina]) exitWith {};
|
||||||
|
|
||||||
|
private _isLnB = (ctrlType _control) == CT_LISTNBOX;
|
||||||
|
|
||||||
|
private _favorited = false;
|
||||||
|
|
||||||
|
// Favorites/blacklist will always be lowercase to handle configCase changes
|
||||||
|
private _item = "";
|
||||||
|
if (_isLnB) then {
|
||||||
|
_item = toLower (_control lnbData [_curSel, 0]);
|
||||||
|
} else {
|
||||||
|
_item = toLower (_control lbData _curSel);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_item in GVAR(favorites)) then {
|
||||||
|
GVAR(favorites) deleteAt _item;
|
||||||
|
} else {
|
||||||
|
GVAR(favorites) set [_item, nil];
|
||||||
|
_favorited = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
private _color = ([[1, 1, 1], GVAR(favoritesColor)] select _favorited) + [1];
|
||||||
|
|
||||||
|
if (_isLnB) then {
|
||||||
|
_control lnbSetColor [[_curSel, 1], _color];
|
||||||
|
_control lnbSetColorRight [[_curSel, 1], _color];
|
||||||
|
} else {
|
||||||
|
_control lbSetColor [_curSel, _color];
|
||||||
|
_control lbSetSelectColor [_curSel, _color];
|
||||||
|
};
|
@ -4,17 +4,26 @@
|
|||||||
* Author: Brett Mayson, johnb43
|
* Author: Brett Mayson, johnb43
|
||||||
* Refreshes the arsenal to show external changes.
|
* Refreshes the arsenal to show external changes.
|
||||||
*
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Update current and unique items lists <BOOL> (default: true)
|
||||||
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Public: No
|
* Example:
|
||||||
|
* call ace_arsenal_fnc_refresh
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
params [["_updateItems", true, [true]]];
|
||||||
|
|
||||||
// Update current item list
|
if (_updateItems) then {
|
||||||
call FUNC(updateCurrentItemsList);
|
// Update current item list
|
||||||
|
call FUNC(updateCurrentItemsList);
|
||||||
|
|
||||||
// This takes care of unique inventory items (arsenal doesn't have it whitelisted)
|
// This takes care of unique inventory items (arsenal doesn't have it whitelisted)
|
||||||
call FUNC(updateUniqueItemsList);
|
call FUNC(updateUniqueItemsList);
|
||||||
|
};
|
||||||
|
|
||||||
// Don't refresh left panel if in loadout tab
|
// Don't refresh left panel if in loadout tab
|
||||||
if (!isNull findDisplay IDD_loadouts_display) exitWith {};
|
if (!isNull findDisplay IDD_loadouts_display) exitWith {};
|
||||||
|
@ -22,15 +22,18 @@ private _rightPanelCache = uiNamespace getVariable [QGVAR(rightPanelCache), crea
|
|||||||
|
|
||||||
private _mass = -1;
|
private _mass = -1;
|
||||||
private _color = [];
|
private _color = [];
|
||||||
|
private _alpha = 1;
|
||||||
|
|
||||||
// Grey out items that are too big to fit in remaining space of the container
|
// Grey out items that are too big to fit in remaining space of the container
|
||||||
for "_row" from 0 to (lnbSize _control select 0) - 1 do {
|
for "_row" from 0 to (lnbSize _control select 0) - 1 do {
|
||||||
_mass = _rightPanelCache getOrDefault [_control lnbData [_row, 0], 0];
|
_mass = _rightPanelCache getOrDefault [_control lnbData [_row, 0], 0];
|
||||||
|
_color = _control lnbColor [_row, 1];
|
||||||
|
|
||||||
// Lower alpha on color for items that can't fit
|
// Lower alpha on color for items that can't fit
|
||||||
_color = [1, 1, 1, [0.25, 1] select (_mass <= _loadRemaining)];
|
_alpha = [0.25, 1] select (_mass <= _loadRemaining);
|
||||||
|
_color set [3, _alpha];
|
||||||
_control lnbSetColor [[_row, 1], _color];
|
_control lnbSetColor [[_row, 1], _color];
|
||||||
_control lnbSetColor [[_row, 2], _color];
|
_control lnbSetColor [[_row, 2], [1, 1, 1, _alpha]];
|
||||||
};
|
};
|
||||||
|
|
||||||
private _display = ctrlParent _control;
|
private _display = ctrlParent _control;
|
||||||
|
@ -33,10 +33,29 @@ private _category = LLSTRING(settingCategory);
|
|||||||
true
|
true
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
|
[
|
||||||
|
QGVAR(defaultToFavorites),
|
||||||
|
"CHECKBOX",
|
||||||
|
[LSTRING(defaultToFavoritesSetting), LSTRING(defaultToFavoritesTooltip)],
|
||||||
|
_category,
|
||||||
|
false,
|
||||||
|
2 // never overwrite the client
|
||||||
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
|
[
|
||||||
|
QGVAR(favoritesColor),
|
||||||
|
"COLOR",
|
||||||
|
[LSTRING(favoritesColorSetting), LSTRING(favoritesColorTooltip)],
|
||||||
|
_category,
|
||||||
|
[0.9, 0.875, 0.6],
|
||||||
|
2 // never overwrite the client
|
||||||
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
private _loadoutCategory = LLSTRING(loadoutSubcategory);
|
private _loadoutCategory = LLSTRING(loadoutSubcategory);
|
||||||
|
|
||||||
// Arsenal loadouts
|
// Arsenal loadouts
|
||||||
[QGVAR(allowDefaultLoadouts),
|
[
|
||||||
|
QGVAR(allowDefaultLoadouts),
|
||||||
"CHECKBOX",
|
"CHECKBOX",
|
||||||
[LSTRING(allowDefaultLoadoutsSetting), LSTRING(defaultLoadoutsTooltip)],
|
[LSTRING(allowDefaultLoadoutsSetting), LSTRING(defaultLoadoutsTooltip)],
|
||||||
[_category, _loadoutCategory],
|
[_category, _loadoutCategory],
|
||||||
@ -44,7 +63,8 @@ private _loadoutCategory = LLSTRING(loadoutSubcategory);
|
|||||||
true
|
true
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
[QGVAR(allowSharedLoadouts),
|
[
|
||||||
|
QGVAR(allowSharedLoadouts),
|
||||||
"CHECKBOX",
|
"CHECKBOX",
|
||||||
LLSTRING(allowSharingSetting),
|
LLSTRING(allowSharingSetting),
|
||||||
[_category, _loadoutCategory],
|
[_category, _loadoutCategory],
|
||||||
@ -52,7 +72,8 @@ private _loadoutCategory = LLSTRING(loadoutSubcategory);
|
|||||||
true
|
true
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
[QGVAR(EnableRPTLog),
|
[
|
||||||
|
QGVAR(EnableRPTLog),
|
||||||
"CHECKBOX",
|
"CHECKBOX",
|
||||||
[LSTRING(printToRPTSetting),
|
[LSTRING(printToRPTSetting),
|
||||||
LSTRING(printToRPTTooltip)],
|
LSTRING(printToRPTTooltip)],
|
||||||
@ -61,21 +82,24 @@ private _loadoutCategory = LLSTRING(loadoutSubcategory);
|
|||||||
false
|
false
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
[QGVAR(loadoutsSaveFace),
|
[
|
||||||
|
QGVAR(loadoutsSaveFace),
|
||||||
"CHECKBOX",
|
"CHECKBOX",
|
||||||
LLSTRING(loadoutsSaveFaceSetting),
|
LLSTRING(loadoutsSaveFaceSetting),
|
||||||
[_category, _loadoutCategory],
|
[_category, _loadoutCategory],
|
||||||
false
|
false
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
[QGVAR(loadoutsSaveVoice),
|
[
|
||||||
|
QGVAR(loadoutsSaveVoice),
|
||||||
"CHECKBOX",
|
"CHECKBOX",
|
||||||
LLSTRING(loadoutsSaveVoiceSetting),
|
LLSTRING(loadoutsSaveVoiceSetting),
|
||||||
[_category, _loadoutCategory],
|
[_category, _loadoutCategory],
|
||||||
false
|
false
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
[QGVAR(loadoutsSaveInsignia),
|
[
|
||||||
|
QGVAR(loadoutsSaveInsignia),
|
||||||
"CHECKBOX",
|
"CHECKBOX",
|
||||||
LLSTRING(loadoutsSaveInsigniaSetting),
|
LLSTRING(loadoutsSaveInsigniaSetting),
|
||||||
[_category, _loadoutCategory],
|
[_category, _loadoutCategory],
|
||||||
|
@ -1572,5 +1572,20 @@
|
|||||||
<Key ID="STR_ACE_Arsenal_statMagCount">
|
<Key ID="STR_ACE_Arsenal_statMagCount">
|
||||||
<English>Ammo count</English>
|
<English>Ammo count</English>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Arsenal_defaultToFavoritesSetting">
|
||||||
|
<English>Default to Favorites</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Arsenal_defaultToFavoritesTooltip">
|
||||||
|
<English>Controls whether the ACE Arsenal defaults to showing all items or favorites.</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Arsenal_favoritesColorSetting">
|
||||||
|
<English>Favorites Color</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Arsenal_favoritesColorTooltip">
|
||||||
|
<English>Highlight color for favorited items.</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Arsenal_buttonFavoritesTooltip">
|
||||||
|
<English>Switch between displaying all items or your favorites.\nDouble click while holding Shift to add or remove an item.</English>
|
||||||
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -176,6 +176,7 @@ class GVAR(display) {
|
|||||||
text = CSTRING(buttonHideText);
|
text = CSTRING(buttonHideText);
|
||||||
sizeEx = QUOTE(5 * GRID_H);
|
sizeEx = QUOTE(5 * GRID_H);
|
||||||
tooltip = CSTRING(buttonHideTooltip);
|
tooltip = CSTRING(buttonHideTooltip);
|
||||||
|
onMouseEnter = QUOTE(ctrlSetFocus (_this select 0));
|
||||||
onButtonClick = QUOTE([ctrlParent (_this select 0)] call FUNC(buttonHide));
|
onButtonClick = QUOTE([ctrlParent (_this select 0)] call FUNC(buttonHide));
|
||||||
};
|
};
|
||||||
class buttonLoadouts: buttonHide {
|
class buttonLoadouts: buttonHide {
|
||||||
@ -199,10 +200,17 @@ class GVAR(display) {
|
|||||||
tooltip = CSTRING(buttonImportTooltip);
|
tooltip = CSTRING(buttonImportTooltip);
|
||||||
onButtonClick = QUOTE([ctrlParent (_this select 0)] call FUNC(buttonImport));
|
onButtonClick = QUOTE([ctrlParent (_this select 0)] call FUNC(buttonImport));
|
||||||
};
|
};
|
||||||
|
class buttonFavorites: buttonHide {
|
||||||
|
idc = IDC_buttonFavorites;
|
||||||
|
x = QUOTE(5 * WIDTH_GAP + 4 * WIDTH_SINGLE);
|
||||||
|
text = "";
|
||||||
|
tooltip = CSTRING(buttonFavoritesTooltip);
|
||||||
|
onButtonClick = QUOTE([ARR_2(ctrlParent (_this select 0), (_this select 0))] call FUNC(buttonFavorites));
|
||||||
|
};
|
||||||
class buttonClose: ctrlButtonOK {
|
class buttonClose: ctrlButtonOK {
|
||||||
idc = IDC_menuBarClose;
|
idc = IDC_menuBarClose;
|
||||||
colorBackground[] = {0,0,0,0.8};
|
colorBackground[] = {0,0,0,0.8};
|
||||||
x = QUOTE(5 * WIDTH_GAP + 4 * WIDTH_SINGLE);
|
x = QUOTE(6 * WIDTH_GAP + 5 * WIDTH_SINGLE);
|
||||||
y = QUOTE(0);
|
y = QUOTE(0);
|
||||||
w = QUOTE(WIDTH_SINGLE);
|
w = QUOTE(WIDTH_SINGLE);
|
||||||
h = QUOTE(7 * GRID_H);
|
h = QUOTE(7 * GRID_H);
|
||||||
@ -559,6 +567,7 @@ class GVAR(display) {
|
|||||||
colorSelect2[] = {1,1,1,1};
|
colorSelect2[] = {1,1,1,1};
|
||||||
colorPictureRightSelected[] = {1,1,1,1};
|
colorPictureRightSelected[] = {1,1,1,1};
|
||||||
onLBSelChanged = QUOTE(_this call FUNC(onSelChangedLeft));
|
onLBSelChanged = QUOTE(_this call FUNC(onSelChangedLeft));
|
||||||
|
onLBDblClick = QUOTE(_this call FUNC(onPanelDblClick));
|
||||||
onSetFocus = QUOTE(GVAR(leftTabFocus) = true);
|
onSetFocus = QUOTE(GVAR(leftTabFocus) = true);
|
||||||
onKillFocus = QUOTE(GVAR(leftTabFocus) = false);
|
onKillFocus = QUOTE(GVAR(leftTabFocus) = false);
|
||||||
x = QUOTE(safezoneX + 13 * GRID_W);
|
x = QUOTE(safezoneX + 13 * GRID_W);
|
||||||
@ -572,6 +581,7 @@ class GVAR(display) {
|
|||||||
drawSideArrows = 1;
|
drawSideArrows = 1;
|
||||||
disableOverflow = 1;
|
disableOverflow = 1;
|
||||||
onLBSelChanged = QUOTE(_this call FUNC(onSelChangedRight));
|
onLBSelChanged = QUOTE(_this call FUNC(onSelChangedRight));
|
||||||
|
onLBDblClick = QUOTE(_this call FUNC(onPanelDblClick));
|
||||||
onSetFocus = QUOTE(GVAR(rightTabFocus) = true);
|
onSetFocus = QUOTE(GVAR(rightTabFocus) = true);
|
||||||
onKillFocus = QUOTE(GVAR(rightTabFocus) = false);
|
onKillFocus = QUOTE(GVAR(rightTabFocus) = false);
|
||||||
x = QUOTE(safezoneX + safezoneW - 93 * GRID_W);
|
x = QUOTE(safezoneX + safezoneW - 93 * GRID_W);
|
||||||
@ -592,6 +602,7 @@ class GVAR(display) {
|
|||||||
drawSideArrows = 1;
|
drawSideArrows = 1;
|
||||||
disableOverflow = 1;
|
disableOverflow = 1;
|
||||||
onLBSelChanged = QUOTE(_this call FUNC(onSelChangedRightListnBox));
|
onLBSelChanged = QUOTE(_this call FUNC(onSelChangedRightListnBox));
|
||||||
|
onLBDblClick = QUOTE(_this call FUNC(onPanelDblClick));
|
||||||
onSetFocus = QUOTE(GVAR(rightTabLnBFocus) = true);
|
onSetFocus = QUOTE(GVAR(rightTabLnBFocus) = true);
|
||||||
onKillFocus = QUOTE(GVAR(rightTabLnBFocus) = false);
|
onKillFocus = QUOTE(GVAR(rightTabLnBFocus) = false);
|
||||||
x = QUOTE(safezoneX + safezoneW - 93 * GRID_W);
|
x = QUOTE(safezoneX + safezoneW - 93 * GRID_W);
|
||||||
|
@ -29,6 +29,7 @@ ACE Arsenal has a pretty large number of improvements over BI Virtual Arsenal, h
|
|||||||
- An other setting to invert horizontal camera controls.
|
- An other setting to invert horizontal camera controls.
|
||||||
- Settings to disable the "Default loadouts" and "Public loadouts" tabs.
|
- Settings to disable the "Default loadouts" and "Public loadouts" tabs.
|
||||||
- Custom sub item categories for misc items
|
- Custom sub item categories for misc items
|
||||||
|
- Items can be saved as favorites to filter for your preferences.
|
||||||
|
|
||||||
<sup>*</sup> Items not currently available in ACE Arsenal but in the unit's inventory, unique items will be omitted when loading loadouts and they can only be removed from containers.
|
<sup>*</sup> Items not currently available in ACE Arsenal but in the unit's inventory, unique items will be omitted when loading loadouts and they can only be removed from containers.
|
||||||
|
|
||||||
@ -66,14 +67,26 @@ You can import loadouts from Virtual Arsenal into ACE Arsenal, face, voice, insi
|
|||||||
- In the 3DEN top toolbar, click on the `TOOLS` tab
|
- In the 3DEN top toolbar, click on the `TOOLS` tab
|
||||||
- Click on `Import BI VA Loadouts to Ace Arsenal`
|
- Click on `Import BI VA Loadouts to Ace Arsenal`
|
||||||
|
|
||||||
## 2. Shortcuts
|
## 2. Favorites
|
||||||
|
|
||||||
|
To switch between displaying all items or just favorites, press the `Items:` button on the bottom of the interface.
|
||||||
|
|
||||||
|
Items can be saved to favorites by pressing <kbd>Shift</kbd> + <kbd>2x LMB</kbd>. Favorites are saved to your profile, along with loadouts, and persist between missions and mod changes.
|
||||||
|
|
||||||
|
Favorited items will be shown in a light gold color by default, but this can be changed under `ACE Arsenal -> Favorites Color` in CBA Settings.
|
||||||
|
|
||||||
|
It is also possible to toggle between showing all items or favorites by default upon opening the arsenal via `ACE Arsenal -> Default to Favorites` in CBA Settings.
|
||||||
|
|
||||||
|
Those settings cannot be overwritten by mission makers and are exclusively player preference.
|
||||||
|
|
||||||
|
## 3. Shortcuts
|
||||||
|
|
||||||
<div class="panel callout">
|
<div class="panel callout">
|
||||||
<h5>Note:</h5>
|
<h5>Note:</h5>
|
||||||
<p><kbd>Ctrl</kbd> + <kbd>V</kbd> does NOT work in multiplayer due to a BI safety, however <kbd>Ctrl</kbd> + <kbd>C</kbd> does since it's using the ACE3 clipboard extension.</p>
|
<p><kbd>Ctrl</kbd> + <kbd>V</kbd> does NOT work in multiplayer due to a BI safety, however <kbd>Ctrl</kbd> + <kbd>C</kbd> does since it's using the ACE3 clipboard extension.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### 2.1 Outside of search bars
|
### 3.1 Outside of search bars
|
||||||
|
|
||||||
- <kbd>Ctrl</kbd> + <kbd>C</kbd>: Export current loadout to clipboard.
|
- <kbd>Ctrl</kbd> + <kbd>C</kbd>: Export current loadout to clipboard.
|
||||||
- <kbd>Ctrl</kbd> + <kbd>V</kbd>: Import loadout from clipboard.
|
- <kbd>Ctrl</kbd> + <kbd>V</kbd>: Import loadout from clipboard.
|
||||||
@ -81,13 +94,14 @@ You can import loadouts from Virtual Arsenal into ACE Arsenal, face, voice, insi
|
|||||||
- Arrow keys can be used to naviguate the left and right panels.
|
- Arrow keys can be used to naviguate the left and right panels.
|
||||||
- <kbd>Shift</kbd> + <kbd>LMB</kbd> on the `+` or `-` buttons on the right panel to add or remove 5 of the selected item.
|
- <kbd>Shift</kbd> + <kbd>LMB</kbd> on the `+` or `-` buttons on the right panel to add or remove 5 of the selected item.
|
||||||
- <kbd>Ctrl</kbd> + <kbd>F</kbd> Selects the left search bar.
|
- <kbd>Ctrl</kbd> + <kbd>F</kbd> Selects the left search bar.
|
||||||
|
- <kbd>Shift</kbd> + <kbd>2x LMB</kbd> on an item will add or remove it from favorites.
|
||||||
|
|
||||||
<div class="panel callout">
|
<div class="panel callout">
|
||||||
<h5>Note:</h5>
|
<h5>Note:</h5>
|
||||||
<p><kbd>Shift</kbd> + arrow keys can be used to add or remove a large amount of items in a short amount of time from the right panel.</p>
|
<p><kbd>Shift</kbd> + arrow keys can be used to add or remove a large amount of items in a short amount of time from the right panel.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### 2.2 Inside of search bars
|
### 3.2 Inside of search bars
|
||||||
|
|
||||||
- Search bars support copy / cut and paste (same limitations as importing apply in multiplayer).
|
- Search bars support copy / cut and paste (same limitations as importing apply in multiplayer).
|
||||||
- <kbd>Ctrl</kbd> + <kbd>A</kbd> is supported.
|
- <kbd>Ctrl</kbd> + <kbd>A</kbd> is supported.
|
||||||
|
Loading…
Reference in New Issue
Block a user