ACE3/addons/arsenal/functions/fnc_refresh.sqf
Grim d33a158e2e
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>
2023-08-19 23:56:59 -04:00

34 lines
830 B
Plaintext

#include "script_component.hpp"
#include "..\defines.hpp"
/*
* Author: Brett Mayson, johnb43
* Refreshes the arsenal to show external changes.
*
* Arguments:
* 0: Update current and unique items lists <BOOL> (default: true)
*
* Return Value:
* None
*
* Example:
* call ace_arsenal_fnc_refresh
*
* Public: Yes
*/
params [["_updateItems", true, [true]]];
if (_updateItems) then {
// Update current item list
call FUNC(updateCurrentItemsList);
// This takes care of unique inventory items (arsenal doesn't have it whitelisted)
call FUNC(updateUniqueItemsList);
};
// Don't refresh left panel if in loadout tab
if (!isNull findDisplay IDD_loadouts_display) exitWith {};
private _display = findDisplay IDD_ace_arsenal;
[_display, _display displayCtrl GVAR(currentLeftPanel)] call FUNC(fillLeftPanel);