Skip to content

Commit

Permalink
Fix incorrect licensing and slow-server UI issue in arsenal limits di…
Browse files Browse the repository at this point in the history
…alog
  • Loading branch information
jaj22 committed Jul 10, 2024
1 parent 53cd15a commit 6c73bde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions A3A/addons/gui/dialogues/arsenalLimitsDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class A3A_ArsenalLimitsDialog : A3A_DefaultDialog {
idc = A3A_IDC_ARSLIMTYPESBASE + 0;
text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\PrimaryWeapon_ca.paa";
tooltip="$STR_A3_RscDisplayArsenal_tab_PrimaryWeapon";
onLoad = "(_this # 0) ctrlEnable false"; // disable until init is complete
onButtonClick = "['typeSelect', [ctrlIDC (_this#0)]] call A3A_GUI_fnc_arsenalLimitsDialog";
colorDisabled[] = {0,0,0,1};
colorBackgroundDisabled[] = {1,1,1,1};
Expand Down
10 changes: 4 additions & 6 deletions A3A/addons/gui/functions/GUI/fn_arsenalLimitsDialog.sqf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Maintainer: Caleb Serafin, DoomMetal
Maintainer: John Jordan
Handles the initialization and updating of the arsenal guest limits dialog.
Arguments:
Expand All @@ -12,8 +12,6 @@ Returns:
Environment:
Should not be called by onLoad because findDisplay and ctrlParent do not work in that context.
License: APL-ND
*/

#include "..\..\dialogues\ids.inc"
Expand Down Expand Up @@ -46,7 +44,7 @@ switch (_mode) do
[localize "STR_antistasi_arsenal_limits_dialog_hint_title", localize "STR_antistasi_arsenal_limits_dialog_guest_warning"] call A3A_fnc_customHint;
(_display displayctrl A3A_IDC_ARSLIMRESETBUTTON) ctrlEnable false;
};
["typeSelect", [A3A_IDC_ARSLIMTYPESBASE]] call A3A_GUI_fnc_ArsenalLimitsDialog;
["typeSelect", [A3A_IDC_ARSLIMTYPESBASE]] call A3A_GUI_fnc_arsenalLimitsDialog;
};

case ("typeSelect"):
Expand Down Expand Up @@ -95,7 +93,7 @@ switch (_mode) do
_button ctrlCommit 0;
_button ctrlSetText _text;
_button setVariable ["A3A_params", [_valCtrl, _adjust]];
_button ctrlAddEventHandler ["ButtonClick", { ["listButton", _this] call A3A_GUI_fnc_ArsenalLimitsDialog }];
_button ctrlAddEventHandler ["ButtonClick", { ["listButton", _this] call A3A_GUI_fnc_arsenalLimitsDialog }];
} forEach [["R", "R", 66], ["-", -5, 70], ["+", 5, 82], ["U", "U", 86]];

} forEach (jna_datalist#_typeIndex select {_x#1>0}); // only show non-unlocked items
Expand Down Expand Up @@ -142,7 +140,7 @@ switch (_mode) do
A3A_arsenalLimits deleteAt (_x#0);
} forEach (jna_datalist#_typeIndex);

["typeSelect", [_typeIndex + A3A_IDC_ARSLIMTYPESBASE]] call A3A_GUI_fnc_ArsenalLimitsDialog; // refresh the display
["typeSelect", [_typeIndex + A3A_IDC_ARSLIMTYPESBASE]] call A3A_GUI_fnc_arsenalLimitsDialog; // refresh the display
};

/* case ("stepButton"):
Expand Down

0 comments on commit 6c73bde

Please sign in to comment.