Jump to content
Sign in to follow this  
aaronhance

Need help with Dialog(not visable)

Recommended Posts

I'm attempting to add a gui. When activated the mouse appears and input to movement is stopped, but the gui is not visible.

dialogs.hpp

class ItemMenu{

idd = -1;
movingEnable = true;
enableSimulation = true;
controlsBackground[] = {};
objects[] = {};


class ITEM_FRAME: RscFrame
{
	idc = 12800;
	x = 13.5 * GUI_GRID_W + GUI_GRID_X;
	y = 4 * GUI_GRID_H + GUI_GRID_Y;
	w = 11 * GUI_GRID_W;
	h = 12 * GUI_GRID_H;
};
class RscButton_12600: BaseRscButton
{
	idc = 12600;
	x = 14.5 * GUI_GRID_W + GUI_GRID_X;
	y = 5 * GUI_GRID_H + GUI_GRID_Y;
	w = 9 * GUI_GRID_W;
	h = 1 * GUI_GRID_H;
};
class RscButton_12601: BaseRscButton
{
	 idc = 12601;
	x = 14.5 * GUI_GRID_W + GUI_GRID_X;
	y = 7 * GUI_GRID_H + GUI_GRID_Y;
	w = 9 * GUI_GRID_W;
	h = 1 * GUI_GRID_H;
};
class RscButton_12602: BaseRscButton
{
	idc = 12602;
	x = 14.5 * GUI_GRID_W + GUI_GRID_X;
	y = 9 * GUI_GRID_H + GUI_GRID_Y;
	w = 9 * GUI_GRID_W;
	h = 1 * GUI_GRID_H;
};
class RscButton_12603: BaseRscButton
{
	idc = 12603;
	x = 14.5 * GUI_GRID_W + GUI_GRID_X;
	y = 11.5 * GUI_GRID_H + GUI_GRID_Y;
	w = 9 * GUI_GRID_W;
	h = 1 * GUI_GRID_H;
};
class RscButton_12604: BaseRscButton
{
	idc = 12604;
	x = 14.5 * GUI_GRID_W + GUI_GRID_X;
	y = 14 * GUI_GRID_H + GUI_GRID_Y;
	w = 9 * GUI_GRID_W;
	h = 1 * GUI_GRID_H;
};
};

I have yet to add 'action = "";' to the buttons.

itemmenu.sqf

createDialog "ItemMenu";
ctrlSetText[12600,format["Bargates: %1", bargateAmmount]];

Share this post


Link to post
Share on other sites

Your missing controls class

try this

class ItemMenu{

idd = -1;
movingEnable = true;
enableSimulation = true;
controlsBackground[] = {};
objects[] = {};

[b]class Controls[/b]
{
	class ITEM_FRAME: RscFrame
	{
		idc = 12800;
		x = 13.5 * GUI_GRID_W + GUI_GRID_X;
		y = 4 * GUI_GRID_H + GUI_GRID_Y;
		w = 11 * GUI_GRID_W;
		h = 12 * GUI_GRID_H;
	};
	class RscButton_12600: BaseRscButton
	{
		idc = 12600;
		x = 14.5 * GUI_GRID_W + GUI_GRID_X;
		y = 5 * GUI_GRID_H + GUI_GRID_Y;
		w = 9 * GUI_GRID_W;
		h = 1 * GUI_GRID_H;
	};
	class RscButton_12601: BaseRscButton
	{
		 idc = 12601;
		x = 14.5 * GUI_GRID_W + GUI_GRID_X;
		y = 7 * GUI_GRID_H + GUI_GRID_Y;
		w = 9 * GUI_GRID_W;
		h = 1 * GUI_GRID_H;
	};
	class RscButton_12602: BaseRscButton
	{
		idc = 12602;
		x = 14.5 * GUI_GRID_W + GUI_GRID_X;
		y = 9 * GUI_GRID_H + GUI_GRID_Y;
		w = 9 * GUI_GRID_W;
		h = 1 * GUI_GRID_H;
	};
	class RscButton_12603: BaseRscButton
	{
		idc = 12603;
		x = 14.5 * GUI_GRID_W + GUI_GRID_X;
		y = 11.5 * GUI_GRID_H + GUI_GRID_Y;
		w = 9 * GUI_GRID_W;
		h = 1 * GUI_GRID_H;
	};
	class RscButton_12604: BaseRscButton
	{
		idc = 12604;
		x = 14.5 * GUI_GRID_W + GUI_GRID_X;
		y = 14 * GUI_GRID_H + GUI_GRID_Y;
		w = 9 * GUI_GRID_W;
		h = 1 * GUI_GRID_H;
	};
};
};

Share this post


Link to post
Share on other sites

I can get it to work, but only if i change the base class from BaseRscButton to the one I normally use

class RscButton
{
access = 0;
type = 1;
text = "";
colorText[] = 
{
	1,
	1,
	1,
	1
};
colorDisabled[] = 
{
	0.4,
	0.4,
	0.4,
	1
};
colorBackground[] = 
{
	"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",
	"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])",
	"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",
	0.7
};
colorBackgroundDisabled[] = 
{
	0.95,
	0.95,
	0.95,
	1
};
colorBackgroundActive[] = 
{
	"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",
	"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])",
	"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",
	1
};
colorFocused[] = 
{
	"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",
	"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])",
	"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",
	1
};
colorShadow[] = 
{
	0,
	0,
	0,
	1
};
colorBorder[] = 
{
	0,
	0,
	0,
	1
};
soundEnter[] = 
{
	"\A3\ui_f\data\sound\RscButton\soundEnter",
	0.09,
	1
};
soundPush[] = 
{
	"\A3\ui_f\data\sound\RscButton\soundPush",
	0.09,
	1
};
soundClick[] = 
{
	"\A3\ui_f\data\sound\RscButton\soundClick",
	0.09,
	1
};
soundEscape[] = 
{
	"\A3\ui_f\data\sound\RscButton\soundEscape",
	0.09,
	1
};
style = 2;
x = 0;
y = 0;
w = 0.095589;
h = 0.039216;
shadow = 2;
font = "PuristaMedium";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
offsetX = 0.003;
offsetY = 0.003;
offsetPressedX = 0.002;
offsetPressedY = 0.002;
borderSize = 0;
};

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  

×