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

Fix slow-server UI issue and incorrect licensing in arsenal limits #3338

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
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