Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arsenal - Various additions and fixes #6347

Merged
merged 8 commits into from
May 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addons/arsenal/ACE_Arsenal_Stats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class GVAR(stats) {
displayName= "$STR_a3_rscdisplayarsenal_stat_rof";
showBar = 1;
showText = 1;
barStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_3([ARR_2(-1.4, 0.31)], [ARR_2(1, 0.01)], true)])] call FUNC(statBarStatement_default));
barStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_2([ARR_2(-1.4, 0.31)], [ARR_2(1, 0.01)])])] call FUNC(statBarStatement_default));
textStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_2([ARR_2(-1.4, 0.31)], false)])] call FUNC(statTextStatement_rateOfFire));
tabs[] = {{0,1}, {}};
};
Expand All @@ -44,7 +44,7 @@ class GVAR(stats) {
displayName = "$STR_a3_rscdisplayarsenal_stat_dispersion";
showBar = 1;
showText = 1;
barStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_3([ARR_2(-4, -1.7)], [ARR_2(1, 0.01)], true)])] call FUNC(statBarStatement_default));
barStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_3([ARR_2(-4, -1.7)], [ARR_2(1, 0.01)], true)])] call FUNC(statBarStatement_accuracy));
textStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_2([ARR_2(-4, -1.7)], false)])] call FUNC(statTextStatement_accuracy));
tabs[] = {{0,1}, {}};
};
Expand Down
1 change: 1 addition & 0 deletions addons/arsenal/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ PREP(removeVirtualItems);
PREP(scanConfig);
PREP(showItem);
PREP(sortPanel);
PREP(statBarStatement_accuracy);
PREP(statBarStatement_default);
PREP(statBarStatement_impact);
PREP(statTextStatement_accuracy);
Expand Down
6 changes: 6 additions & 0 deletions addons/arsenal/functions/fnc_fillLeftPanel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ private _ctrlPanel = _display displayCtrl IDC_leftTabContent;
_ctrlBackground ctrlSetFade 0;
_ctrlBackground ctrlCommit FADE_DELAY;

// Force a "refresh" animation of the panel
_ctrlPanel ctrlSetFade 1;
_ctrlPanel ctrlCommit 0;
_ctrlPanel ctrlSetFade 0;
_ctrlPanel ctrlCommit FADE_DELAY;

_ctrlPanel lbSetCurSel -1;

// Handle icons and filling
Expand Down
8 changes: 8 additions & 0 deletions addons/arsenal/functions/fnc_fillLoadoutsList.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ _textEditBoxCtrl ctrlSetText "";
private _sharingEnabled = (GVAR(allowSharedLoadouts) && {isMultiplayer});
private _sharedLoadoutsVars = GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars);

// Force a "refresh" animation of the panel
_contentPanelCtrl ctrlSetFade 1;
_contentPanelCtrl ctrlCommit 0;
_contentPanelCtrl ctrlSetFade 0;
_contentPanelCtrl ctrlCommit FADE_DELAY;

_contentPanelCtrl lnbSetCurSelRow -1;
lnbClear _contentPanelCtrl;

Expand Down Expand Up @@ -115,4 +121,6 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
} foreach (_sharedLoadoutsVars apply {GVAR(sharedLoadoutsNamespace) getVariable _x});
};

[QGVAR(loadoutsListFilled), [_display, _control]] call CBA_fnc_localEvent;

_contentPanelCtrl lnbSort [1, false];
10 changes: 7 additions & 3 deletions addons/arsenal/functions/fnc_fillRightPanel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ switch (GVAR(currentLeftPanel)) do {
};
};

// Force a "refresh" animation of the panel
_ctrlPanel ctrlSetFade 1;
_ctrlPanel ctrlCommit 0;
_ctrlPanel ctrlSetFade 0;
_ctrlPanel ctrlCommit FADE_DELAY;

_itemsToCheck = _itemsToCheck apply {toLower _x};
_compatibleItems = _compatibleItems apply {toLower _x};

Expand Down Expand Up @@ -280,9 +286,7 @@ switch (_ctrlIDC) do {
};
};

if (GVAR(currentRightPanel) != _ctrlIDC) then {
(_display displayCtrl IDC_rightSearchbar) ctrlSetText "";
};
(_display displayCtrl IDC_rightSearchbar) ctrlSetText "";

GVAR(currentRightPanel) = _ctrlIDC;

Expand Down
2 changes: 2 additions & 0 deletions addons/arsenal/functions/fnc_loadoutsChangeTab.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,6 @@ switch (ctrlIDC _control) do {

GVAR(currentLoadoutsTab) = ctrlIDC _control;

[QGVAR(loadoutsTabChanged), [_display, _control]] call CBA_fnc_localEvent;

[_display, _control] call FUNC(fillLoadoutsList);
2 changes: 2 additions & 0 deletions addons/arsenal/functions/fnc_onLoadoutsClose.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ _mouseBlockCtrl ctrlCommit 0;

[_arsenalDisplay] call FUNC(buttonHide);

[QGVAR(loadoutsDisplayClosed), []] call CBA_fnc_localEvent;

[_arsenalDisplay , _arsenalDisplay displayCtrl GVAR(currentLeftPanel)] call FUNC(fillLeftPanel);
2 changes: 2 additions & 0 deletions addons/arsenal/functions/fnc_onLoadoutsOpen.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ if !(GVAR(allowSharedLoadouts) && {isMultiplayer}) then {
_buttonShareLoadoutsBackgroundCtrl ctrlCommit 0;
};

[QGVAR(loadoutsDisplayOpened), [_display]] call CBA_fnc_localEvent;

[_display, _display displayCtrl IDC_buttonMyLoadouts] call FUNC(loadoutsChangeTab);
Loading