Skip to content

Commit

Permalink
Merge pull request #3291 from jaj22/fix-buy-vehicle-tagging
Browse files Browse the repository at this point in the history
Fix buy vehicle menu function tagging
  • Loading branch information
Bob-Murphy authored Jun 15, 2024
2 parents ab92d81 + 863717c commit 131573e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions A3A/addons/gui/dialogues/buyVehicleDialog.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class A3A_BuyVehicleDialog : A3A_TabbedDialog
{
idd = A3A_IDD_BUYVEHICLEDIALOG;
onLoad = "[""onLoad""] spawn A3A_fnc_buyVehicleDialog";
idd = A3A_IDD_BUYVEHICLEDIALOG;
onLoad = "[""onLoad""] spawn A3A_GUI_fnc_buyVehicleDialog";

class Controls
{
Expand Down Expand Up @@ -29,7 +29,7 @@ class A3A_BuyVehicleDialog : A3A_TabbedDialog
{
idc = -1;
text = $STR_antistasi_dialogs_vehicle_tab_civ;
onButtonClick = "[""switchTab"", [""civilian""]] call A3A_fnc_buyVehicleDialog";
onButtonClick = "[""switchTab"", [""civilian""]] call A3A_GUI_fnc_buyVehicleDialog";
x = 0;
y = 0;
w = 30 * GRID_W;
Expand All @@ -40,7 +40,7 @@ class A3A_BuyVehicleDialog : A3A_TabbedDialog
{
idc = -1;
text = $STR_antistasi_dialogs_vehicle_tab_reb;
onButtonClick = "[""switchTab"", [""rebel""]] call A3A_fnc_buyVehicleDialog";
onButtonClick = "[""switchTab"", [""rebel""]] call A3A_GUI_fnc_buyVehicleDialog";
x = 30 * GRID_W;
y = 0;
w = 30 * GRID_W;
Expand All @@ -51,7 +51,7 @@ class A3A_BuyVehicleDialog : A3A_TabbedDialog
{
idc = -1;
text = $STR_antistasi_dialogs_vehicle_tab_static;
onButtonClick = "[""switchTab"", [""static""]] call A3A_fnc_buyVehicleDialog";
onButtonClick = "[""switchTab"", [""static""]] call A3A_GUI_fnc_buyVehicleDialog";
x = 60 * GRID_W;
y = 0;
w = 30 * GRID_W;
Expand All @@ -62,7 +62,7 @@ class A3A_BuyVehicleDialog : A3A_TabbedDialog
{
idc = -1;
text = $STR_antistasi_dialogs_vehicle_tab_other;
onButtonClick = "[""switchTab"", [""other""]] call A3A_fnc_buyVehicleDialog";
onButtonClick = "[""switchTab"", [""other""]] call A3A_GUI_fnc_buyVehicleDialog";
x = 90 * GRID_W;
y = 0;
w = 30 * GRID_W;
Expand Down Expand Up @@ -179,4 +179,4 @@ class A3A_BuyVehicleDialog : A3A_TabbedDialog
zoomDuration = 0.001;
};
};
};
};
12 changes: 6 additions & 6 deletions A3A/addons/gui/functions/GUI/fn_buyVehicleDialog.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Public: No
Dependencies:
None
Example:
["onLoad"] spawn A3A_fnc_buyVehicleDialog; // initialization
["onLoad"] spawn A3A_GUI_fnc_buyVehicleDialog; // initialization
*/

#include "..\..\dialogues\ids.inc"
Expand Down Expand Up @@ -98,10 +98,10 @@ switch (_mode) do
(A3A_faction_reb get 'staticAT') +
(A3A_faction_reb get 'staticAA');

["vehicles", [A3A_IDC_BUYCIVVEHICLEMAIN, A3A_IDC_CIVVEHICLESGROUP, _civilianVehicles]] call A3A_fnc_buyVehicleTabs;
["vehicles", [A3A_IDC_BUYREBVEHICLEMAIN, A3A_IDC_REBVEHICLESGROUP, _militaryVehicles]] call A3A_fnc_buyVehicleTabs;
["vehicles", [A3A_IDC_BUYSTATICMAIN, A3A_IDC_STATICSGROUP, _statics]] call A3A_fnc_buyVehicleTabs;
["other"] call A3A_fnc_buyVehicleTabs;
["vehicles", [A3A_IDC_BUYCIVVEHICLEMAIN, A3A_IDC_CIVVEHICLESGROUP, _civilianVehicles]] call A3A_GUI_fnc_buyVehicleTabs;
["vehicles", [A3A_IDC_BUYREBVEHICLEMAIN, A3A_IDC_REBVEHICLESGROUP, _militaryVehicles]] call A3A_GUI_fnc_buyVehicleTabs;
["vehicles", [A3A_IDC_BUYSTATICMAIN, A3A_IDC_STATICSGROUP, _statics]] call A3A_GUI_fnc_buyVehicleTabs;
["other"] call A3A_GUI_fnc_buyVehicleTabs;

// show the vehicle tab so that user don't freak out
private _display = findDisplay A3A_IDD_BUYVEHICLEDIALOG;
Expand All @@ -115,4 +115,4 @@ switch (_mode) do
// Log error if attempting to call a mode that doesn't exist
Error_1("BuyVehicleDialog mode does not exist: %1", _mode);
};
};
};
4 changes: 2 additions & 2 deletions A3A/addons/gui/functions/GUI/fn_buyVehicleTabs.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Dependencies:
None
Example:
["logistics"] call A3A_fnc_buyVehicleTab;
["logistics"] call A3A_GUI_fnc_buyVehicleTab;
*/

#include "..\..\dialogues\ids.inc"
Expand Down Expand Up @@ -60,7 +60,7 @@ if (_tab isEqualTo "vehicles") then
private _configClass = configFile >> "CfgVehicles" >> _className;
if (!isClass _configClass) then { continue };

private _crewCount = [_className] call A3A_fnc_getVehicleCrewCount;
private _crewCount = [_className] call A3A_GUI_fnc_getVehicleCrewCount;
_crewCount params ["_driver", "_coPilot", "_commander", "_gunners", "_passengers", "_passengersFFV"];

private _displayName = getText (_configClass >> "displayName");
Expand Down

0 comments on commit 131573e

Please sign in to comment.