Jump to content
Sign in to follow this  
ward1591

How do i get my defines for my Dialog?

Recommended Posts

I made this dialog as a first project since this is my first time working with the GUI editor. I was wondering how you get your defines from you dialogue you made in the editor. Why i need this is i think it might fix the whole problem with my game crashing me every time i load the file in editor with the error message posted below.

BUG1_zps7bbbb843.png?t=1390634809

In case this help here is my defines and dialogs

Defines

#define ST_CENTER         0x02
#define ST_TITLE_BAR      0x20
#define ST_PICTURE        0x30
#define ST_FRAME          0x40
#define ST_BACKGROUND     0x50
#define ST_GROUP_BOX      0x60
#define ST_GROUP_BOX2     0x70
#define ST_HUD_BACKGROUND 0x80
#define ST_TILE_PICTURE   0x90
#define ST_WITH_RECT      0xA0
#define ST_LINE           0xB0

#define ST_SHADOW         0x100
#define ST_NO_RECT        0x200
#define ST_KEEP_ASPECT_RATIO  0x800

#define ST_TITLE          ST_TITLE_BAR + ST_CENTER

// Slider styles
#define SL_DIR            0x400
#define SL_VERT           0
#define SL_HORZ           0x400

#define SL_TEXTURES       0x10

// progress bar 
#define ST_VERTICAL       0x01
#define ST_HORIZONTAL     0

// Listbox styles
#define LB_TEXTURES       0x10
#define LB_MULTI          0x20

// Tree styles
#define TR_SHOWROOT       1
#define TR_AUTOCOLLAPSE   2

// MessageBox styles
#define MB_BUTTON_OK      1
#define MB_BUTTON_CANCEL  2
#define MB_BUTTON_USER    4


////////////////
//Base Classes//
////////////////

class RscText
{
   access = 0;
   idc = -1;
   type = CT_STATIC;
   style = ST_MULTI;
   linespacing = 1;
   colorBackground[] = {0,0,0,0};
   colorText[] = {1,1,1,.5};
   text = "";
   shadow = 2;
   font = "default";
   SizeEx = 0.02300;
   fixedWidth = 0;
   x = 0;
   y = 0;
   h = 0;
   w = 0;

};

class RscPicture
{
   access = 0;
   idc = -1;
   type = CT_STATIC;
   style = ST_PICTURE;
   colorBackground[] = {0,0,0,0};
   colorText[] = {1,1,1,1};
   font = "default";
   sizeEx = 0;
   lineSpacing = 0;
   text = "";
   fixedWidth = 0;
   shadow = 0;
   x = 0;
   y = 0;
   w = 0.2;
   h = 0.15;
};

class RscButton
{

  access = 0;
   type = CT_BUTTON;
   text = "";
   colorText[] = {1,1,1,.9};
   colorDisabled[] = {0.4,0.4,0.4,0};
   colorBackground[] = {0.75,0.75,0.75,0.8};
   colorBackgroundDisabled[] = {0,0.0,0};
   colorBackgroundActive[] = {0.75,0.75,0.75,1};
   colorFocused[] = {0.75,0.75,0.75,.5};
   colorShadow[] = {0.023529,0,0.0313725,1};
   colorBorder[] = {0.023529,0,0.0313725,1};
   soundEnter[] = {"\ca\ui\data\sound\onover",0.09,1};
   soundPush[] = {"\ca\ui\data\sound\new1",0,0};
   soundClick[] = {"\ca\ui\data\sound\onclick",0.07,1};
   soundEscape[] = {"\ca\ui\data\sound\onescape",0.09,1};
   style = 2;
   x = 0;
   y = 0;
   w = 0.055589;
   h = 0.039216;
   shadow = 2;
   font = "default";
   sizeEx = 0.03921;
   offsetX = 0.003;
   offsetY = 0.003;
   offsetPressedX = 0.002;
   offsetPressedY = 0.002;
   borderSize = 0;
};

class RscFrame
{
   type = CT_STATIC;
   idc = -1;
   style = ST_FRAME;
   shadow = 2;
   colorBackground[] = {1,1,1,1};
   colorText[] = {1,1,1,0.9};
   font = "default";
   sizeEx = 0.03;
   text = "";
};

class BOX
{ 
  type = CT_STATIC;
   idc = -1;
   style = ST_CENTER;
   shadow = 2;
   colorText[] = {1,1,1,1};
   font = "default";
   sizeEx = 0.02;
   colorBackground[] = { 0.2,0.2,0.2, 0.9 }; 
   text = ""; 

};

Dialogs

class Bank 
{
movingEnable = 0;//--- The dialog window can be moved.
enableSimulation = true;
controlsBackround[] = {};
idd = 10001;
onLoad = "ExecVM '\banking\list.sqf'"; //--- Script loaded upon creation.
controls[] = {bank_blackback1,bank_dlist,bank_blackback2,bank_wlist,bank_dtitle,bank_wtitle,bank_check,bank_moneylogo1,bank_moneylogo2,bank_title};


class bank_blackback1: RscPicture
{
	idc = 1200;
	text = "#(argb,8,8,3)color(1,1,1,1)";
	x = 1 * GUI_GRID_W + GUI_GRID_X;
	y = 14 * GUI_GRID_H + GUI_GRID_Y;
	w = 14 * GUI_GRID_W;
	h = 10 * GUI_GRID_H;
	colorBackground[] = {0,0,0,1};
	colorActive[] = {0,0,0,1};
};
class bank_dlist: RscListbox
{
	idc = 1500;
	x = 1 * GUI_GRID_W + GUI_GRID_X;
	y = 14 * GUI_GRID_H + GUI_GRID_Y;
	w = 14 * GUI_GRID_W;
	h = 10 * GUI_GRID_H;
	sizeEx = 1 * GUI_GRID_H;
};
class bank_blackback2: RscPicture
{
	idc = 1201;
	text = "#(argb,8,8,3)color(1,1,1,1)";
	x = 25 * GUI_GRID_W + GUI_GRID_X;
	y = 14 * GUI_GRID_H + GUI_GRID_Y;
	w = 14 * GUI_GRID_W;
	h = 10 * GUI_GRID_H;
	colorBackground[] = {0,0,0,1};
	colorActive[] = {0,0,0,1};
};
class bank_wlist: RscListbox
{
	idc = 1501;
	x = 25 * GUI_GRID_W + GUI_GRID_X;
	y = 14 * GUI_GRID_H + GUI_GRID_Y;
	w = 14 * GUI_GRID_W;
	h = 10 * GUI_GRID_H;
	sizeEx = 1 * GUI_GRID_H;
};
class bank_dtitle: RscText
{
	idc = 1000;
	text = "Deposit"; //--- ToDo: Localize;
	x = 2.5 * GUI_GRID_W + GUI_GRID_X;
	y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
	w = 10.5 * GUI_GRID_W;
	h = 3.5 * GUI_GRID_H;
	sizeEx = 3 * GUI_GRID_H;
};
class bank_wtitle: RscText
{
	idc = 1001;
	text = "Withdraw"; //--- ToDo: Localize;
	x = 25.5 * GUI_GRID_W + GUI_GRID_X;
	y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
	w = 13.5 * GUI_GRID_W;
	h = 3.5 * GUI_GRID_H;
	sizeEx = 3 * GUI_GRID_H;
};
class bank_check: RscButton
{
	idc = 1600;
	text = "Check Balance"; //--- ToDo: Localize;
	x = 9.8 * GUI_GRID_W + GUI_GRID_X;
	y = 5 * GUI_GRID_H + GUI_GRID_Y;
	w = 20.5 * GUI_GRID_W;
	h = 4 * GUI_GRID_H;
	sizeEx = 3 * GUI_GRID_H;
};
class bank_moneylogo1: RscPicture
{
	idc = 1202;
	text = "#(argb,8,8,3)color(1,1,1,1)";
	x = 0 * GUI_GRID_W + GUI_GRID_X;
	y = 3.5 * GUI_GRID_H + GUI_GRID_Y;
	w = 9 * GUI_GRID_W;
	h = 7 * GUI_GRID_H;
};
class bank_moneylogo2: RscPicture
{
	idc = 1203;
	text = "#(argb,8,8,3)color(1,1,1,1)";
	x = 31 * GUI_GRID_W + GUI_GRID_X;
	y = 3.5 * GUI_GRID_H + GUI_GRID_Y;
	w = 9 * GUI_GRID_W;
	h = 7 * GUI_GRID_H;
};
class bank_title: RscText
{
	idc = 1002;
	text = "Bank"; //--- ToDo: Localize;
	x = 15.5 * GUI_GRID_W + GUI_GRID_X;
	y = 0 * GUI_GRID_H + GUI_GRID_Y;
	w = 9.5 * GUI_GRID_W;
	h = 4.5 * GUI_GRID_H;
	sizeEx = 4 * GUI_GRID_H;
};
};

Share this post


Link to post
Share on other sites

Before "class Bank {......." at the top of your dialog.hpp, try entering:

class RscPicture;

class RscListbox;

class RscText;

class RscButton;

so it looks like this:

class RscPicture;
class RscListbox;
class RscText;
class RscButton;
class Bank  
{ 
   movingEnable = 0;//--- The dialog window can be moved. 
   enableSimulation = true; 
   controlsBackround[] = {}; 
   idd = 10001; 
   onLoad = "ExecVM '\banking\list.sqf'"; //--- Script loaded upon creation. 
   controls[] = {bank_blackback1,bank_dlist,bank_blackback2,bank_wlist,bank_dtitle,bank_wtitle,bank_check,bank_moneylogo1,bank_moneylogo2,bank_title}; 


   class bank_blackback1: RscPicture 
   { 
       idc = 1200; 
       text = "#(argb,8,8,3)color(1,1,1,1)"; 
       x = 1 * GUI_GRID_W + GUI_GRID_X; 
       y = 14 * GUI_GRID_H + GUI_GRID_Y; 
       w = 14 * GUI_GRID_W; 
       h = 10 * GUI_GRID_H; 
       colorBackground[] = {0,0,0,1}; 
       colorActive[] = {0,0,0,1}; 
   }; 
   class bank_dlist: RscListbox 
   { 
       idc = 1500; 
       x = 1 * GUI_GRID_W + GUI_GRID_X; 
       y = 14 * GUI_GRID_H + GUI_GRID_Y; 
       w = 14 * GUI_GRID_W; 
       h = 10 * GUI_GRID_H; 
       sizeEx = 1 * GUI_GRID_H; 
   }; 
   class bank_blackback2: RscPicture 
   { 
       idc = 1201; 
       text = "#(argb,8,8,3)color(1,1,1,1)"; 
       x = 25 * GUI_GRID_W + GUI_GRID_X; 
       y = 14 * GUI_GRID_H + GUI_GRID_Y; 
       w = 14 * GUI_GRID_W; 
       h = 10 * GUI_GRID_H; 
       colorBackground[] = {0,0,0,1}; 
       colorActive[] = {0,0,0,1}; 
   }; 
   class bank_wlist: RscListbox 
   { 
       idc = 1501; 
       x = 25 * GUI_GRID_W + GUI_GRID_X; 
       y = 14 * GUI_GRID_H + GUI_GRID_Y; 
       w = 14 * GUI_GRID_W; 
       h = 10 * GUI_GRID_H; 
       sizeEx = 1 * GUI_GRID_H; 
   }; 
   class bank_dtitle: RscText 
   { 
       idc = 1000; 
       text = "Deposit"; //--- ToDo: Localize; 
       x = 2.5 * GUI_GRID_W + GUI_GRID_X; 
       y = 10.5 * GUI_GRID_H + GUI_GRID_Y; 
       w = 10.5 * GUI_GRID_W; 
       h = 3.5 * GUI_GRID_H; 
       sizeEx = 3 * GUI_GRID_H; 
   }; 
   class bank_wtitle: RscText 
   { 
       idc = 1001; 
       text = "Withdraw"; //--- ToDo: Localize; 
       x = 25.5 * GUI_GRID_W + GUI_GRID_X; 
       y = 10.5 * GUI_GRID_H + GUI_GRID_Y; 
       w = 13.5 * GUI_GRID_W; 
       h = 3.5 * GUI_GRID_H; 
       sizeEx = 3 * GUI_GRID_H; 
   }; 
   class bank_check: RscButton 
   { 
       idc = 1600; 
       text = "Check Balance"; //--- ToDo: Localize; 
       x = 9.8 * GUI_GRID_W + GUI_GRID_X; 
       y = 5 * GUI_GRID_H + GUI_GRID_Y; 
       w = 20.5 * GUI_GRID_W; 
       h = 4 * GUI_GRID_H; 
       sizeEx = 3 * GUI_GRID_H; 
   }; 
   class bank_moneylogo1: RscPicture 
   { 
       idc = 1202; 
       text = "#(argb,8,8,3)color(1,1,1,1)"; 
       x = 0 * GUI_GRID_W + GUI_GRID_X; 
       y = 3.5 * GUI_GRID_H + GUI_GRID_Y; 
       w = 9 * GUI_GRID_W; 
       h = 7 * GUI_GRID_H; 
   }; 
   class bank_moneylogo2: RscPicture 
   { 
       idc = 1203; 
       text = "#(argb,8,8,3)color(1,1,1,1)"; 
       x = 31 * GUI_GRID_W + GUI_GRID_X; 
       y = 3.5 * GUI_GRID_H + GUI_GRID_Y; 
       w = 9 * GUI_GRID_W; 
       h = 7 * GUI_GRID_H; 
   }; 
   class bank_title: RscText 
   { 
       idc = 1002; 
       text = "Bank"; //--- ToDo: Localize; 
       x = 15.5 * GUI_GRID_W + GUI_GRID_X; 
       y = 0 * GUI_GRID_H + GUI_GRID_Y; 
       w = 9.5 * GUI_GRID_W; 
       h = 4.5 * GUI_GRID_H; 
       sizeEx = 4 * GUI_GRID_H; 
   }; 
};

Untested but let me know how you get on.

Share this post


Link to post
Share on other sites
Before "class Bank {......." at the top of your dialog.hpp, try entering:

class RscPicture;

class RscListbox;

class RscText;

class RscButton;

so it looks like this:

class RscPicture;
class RscListbox;
class RscText;
class RscButton;
class Bank  
{ 
   movingEnable = 0;//--- The dialog window can be moved. 
   enableSimulation = true; 
   controlsBackround[] = {}; 
   idd = 10001; 
   onLoad = "ExecVM '\banking\list.sqf'"; //--- Script loaded upon creation. 
   controls[] = {bank_blackback1,bank_dlist,bank_blackback2,bank_wlist,bank_dtitle,bank_wtitle,bank_check,bank_moneylogo1,bank_moneylogo2,bank_title}; 


   class bank_blackback1: RscPicture 
   { 
       idc = 1200; 
       text = "#(argb,8,8,3)color(1,1,1,1)"; 
       x = 1 * GUI_GRID_W + GUI_GRID_X; 
       y = 14 * GUI_GRID_H + GUI_GRID_Y; 
       w = 14 * GUI_GRID_W; 
       h = 10 * GUI_GRID_H; 
       colorBackground[] = {0,0,0,1}; 
       colorActive[] = {0,0,0,1}; 
   }; 
   class bank_dlist: RscListbox 
   { 
       idc = 1500; 
       x = 1 * GUI_GRID_W + GUI_GRID_X; 
       y = 14 * GUI_GRID_H + GUI_GRID_Y; 
       w = 14 * GUI_GRID_W; 
       h = 10 * GUI_GRID_H; 
       sizeEx = 1 * GUI_GRID_H; 
   }; 
   class bank_blackback2: RscPicture 
   { 
       idc = 1201; 
       text = "#(argb,8,8,3)color(1,1,1,1)"; 
       x = 25 * GUI_GRID_W + GUI_GRID_X; 
       y = 14 * GUI_GRID_H + GUI_GRID_Y; 
       w = 14 * GUI_GRID_W; 
       h = 10 * GUI_GRID_H; 
       colorBackground[] = {0,0,0,1}; 
       colorActive[] = {0,0,0,1}; 
   }; 
   class bank_wlist: RscListbox 
   { 
       idc = 1501; 
       x = 25 * GUI_GRID_W + GUI_GRID_X; 
       y = 14 * GUI_GRID_H + GUI_GRID_Y; 
       w = 14 * GUI_GRID_W; 
       h = 10 * GUI_GRID_H; 
       sizeEx = 1 * GUI_GRID_H; 
   }; 
   class bank_dtitle: RscText 
   { 
       idc = 1000; 
       text = "Deposit"; //--- ToDo: Localize; 
       x = 2.5 * GUI_GRID_W + GUI_GRID_X; 
       y = 10.5 * GUI_GRID_H + GUI_GRID_Y; 
       w = 10.5 * GUI_GRID_W; 
       h = 3.5 * GUI_GRID_H; 
       sizeEx = 3 * GUI_GRID_H; 
   }; 
   class bank_wtitle: RscText 
   { 
       idc = 1001; 
       text = "Withdraw"; //--- ToDo: Localize; 
       x = 25.5 * GUI_GRID_W + GUI_GRID_X; 
       y = 10.5 * GUI_GRID_H + GUI_GRID_Y; 
       w = 13.5 * GUI_GRID_W; 
       h = 3.5 * GUI_GRID_H; 
       sizeEx = 3 * GUI_GRID_H; 
   }; 
   class bank_check: RscButton 
   { 
       idc = 1600; 
       text = "Check Balance"; //--- ToDo: Localize; 
       x = 9.8 * GUI_GRID_W + GUI_GRID_X; 
       y = 5 * GUI_GRID_H + GUI_GRID_Y; 
       w = 20.5 * GUI_GRID_W; 
       h = 4 * GUI_GRID_H; 
       sizeEx = 3 * GUI_GRID_H; 
   }; 
   class bank_moneylogo1: RscPicture 
   { 
       idc = 1202; 
       text = "#(argb,8,8,3)color(1,1,1,1)"; 
       x = 0 * GUI_GRID_W + GUI_GRID_X; 
       y = 3.5 * GUI_GRID_H + GUI_GRID_Y; 
       w = 9 * GUI_GRID_W; 
       h = 7 * GUI_GRID_H; 
   }; 
   class bank_moneylogo2: RscPicture 
   { 
       idc = 1203; 
       text = "#(argb,8,8,3)color(1,1,1,1)"; 
       x = 31 * GUI_GRID_W + GUI_GRID_X; 
       y = 3.5 * GUI_GRID_H + GUI_GRID_Y; 
       w = 9 * GUI_GRID_W; 
       h = 7 * GUI_GRID_H; 
   }; 
   class bank_title: RscText 
   { 
       idc = 1002; 
       text = "Bank"; //--- ToDo: Localize; 
       x = 15.5 * GUI_GRID_W + GUI_GRID_X; 
       y = 0 * GUI_GRID_H + GUI_GRID_Y; 
       w = 9.5 * GUI_GRID_W; 
       h = 4.5 * GUI_GRID_H; 
       sizeEx = 4 * GUI_GRID_H; 
   }; 
};

Untested but let me know how you get on.

No it came up with the same error message upon loading in editor.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×