Prepare the SQF base for the loadouts display

This commit is contained in:
Josuan Albin
2017-10-23 18:12:16 +02:00
parent 489427f755
commit a19774ce34
11 changed files with 53 additions and 12 deletions

View File

@ -5,7 +5,10 @@ PREP(buttonClearAll);
PREP(buttonExport);
PREP(buttonHide);
PREP(buttonImport);
PREP(buttonLoadouts);
PREP(buttonLoadoutsLoad);
PREP(buttonLoadoutsSave);
PREP(buttonLoadoutsSaveAs);
PREP(buttonLoadoutsShare);
PREP(clearSearchbar);
PREP(fillLeftPanel);
PREP(fillRightPanel);
@ -15,10 +18,13 @@ PREP(handleSearchbar);
PREP(handleStats);
PREP(initBox);
PREP(itemInfo);
PREP(loadoutsChangeTab);
PREP(message);
PREP(onArsenalClose);
PREP(onArsenalOpen);
PREP(onKeyDown);
PREP(onLoadoutsClose);
PREP(onLoadoutsOpen);
PREP(onMouseButtonDown);
PREP(onMouseButtonUp);
PREP(onSelChangedLeft);

View File

@ -99,6 +99,9 @@
#define IDC_centerTitle 301
#define IDC_contentPanel 302
#define IDC_centerBoxButtonLoad 303
#define IDC_buttonMyLoadouts 401
#define IDC_buttonDefaultLoadouts 402
#define IDC_buttonSharedLoadouts 403
#define FADE_DELAY 0.15
#define CAM_DIS_MAX 5

View File

@ -1,4 +0,0 @@
#include "script_component.hpp"
params ["_display"];
_display createDisplay QGVAR(loadoutsDisplay);

View File

@ -0,0 +1,4 @@
#include "script_component.hpp"
#include "..\defines.hpp"
params ["_display"];

View File

@ -0,0 +1,4 @@
#include "script_component.hpp"
#include "..\defines.hpp"
params ["_display"];

View File

@ -0,0 +1,4 @@
#include "script_component.hpp"
#include "..\defines.hpp"
params ["_display"];

View File

@ -0,0 +1,4 @@
#include "script_component.hpp"
#include "..\defines.hpp"
params ["_display"];

View File

@ -0,0 +1,8 @@
#include "script_component.hpp"
#include "..\defines.hpp"
params ["_display", "_control"];
systemChat str [_display, _control];
if !(ctrlEnabled _control) exitWith {};

View File

@ -0,0 +1,5 @@
#include "script_component.hpp"
#include "..\defines.hpp"
params ["", "_args"];
_args params ["_display"];

View File

@ -0,0 +1,7 @@
#include "script_component.hpp"
#include "..\defines.hpp"
params ["", "_args"];
_args params ["_display"];
systemChat str _display;

View File

@ -173,7 +173,7 @@ class GVAR(display) {
x = QUOTE(25 * GRID_W);
text="Loadouts"; // TBL
tooltip="Displays loadouts screen"; // TBL
onButtonClick = QUOTE([ctrlparent (_this select 0)] call FUNC(buttonLoadouts));
onButtonClick = QUOTE(ctrlparent (_this select 0) createDisplay QQGVAR(loadoutsDisplay));
};
class buttonExport: buttonHide {
idc = -1;
@ -711,6 +711,8 @@ class GVAR(display) {
class GVAR(loadoutsDisplay) {
idd = IDD_loadouts_display;
onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(loadoutsDisplay))] call FUNC(onLoadoutsOpen));
onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(loadoutsDisplay))] call FUNC(onLoadoutsClose));
class controls {
class centerBox: ctrlControlsGroupNoScrollbars {
idc = IDC_centerBox;
@ -804,7 +806,7 @@ class GVAR(loadoutsDisplay) {
h = QUOTE(10 * GRID_H);
class controls {
class buttonMyLoadouts: ctrlButton {
idc = -1;
idc = IDC_buttonMyLoadouts;
colorBackground[] = {0,0,0,0.8};
x = QUOTE(0 * GRID_W);
y = QUOTE(0 * GRID_H);
@ -813,21 +815,19 @@ class GVAR(loadoutsDisplay) {
sizeEx = QUOTE(4.5 * GRID_H);
text="My loadouts"; // TBL
tooltip="Save selected loadout"; // TBL
onButtonClick = "";
onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), _this select 0)] call FUNC(loadoutsChangeTab));
};
class buttonDefaultLoadouts: buttonMyLoadouts {
idc = -1;
idc = IDC_buttonDefaultLoadouts;
x = QUOTE(41 * GRID_W);
text="Default loadouts"; // TBL
tooltip=""; // TBL
onButtonClick = "";
};
class buttonSharedLoadouts: buttonMyLoadouts {
idc = -1;
idc = IDC_buttonSharedLoadouts;
x = QUOTE(82 * GRID_W);
text="Shared loadouts"; // TBL
tooltip=""; // TBL
onButtonClick = "";
};
};
};