Jump to content
CreativeProduct

Help required for Dialogs.

Recommended Posts

Hello there,

 

I am having problems figuring this out, its probably just some dull misake by myself, but the lack of knowledge lead me to create this topic.

 

I have used the ArmA Dialog Creator to create a dialog, so far soo good. Everything works like a charm when using CreateDialog. However, I need to call it with CutRsc (if I remember correctly) to make the displa appear but still be able to moeve and use the mouse.

 

This is the main dialog, if "Customcontrolclasses.h" are just below.

#include "CustomControlClasses.h"
class IslandDialog
{
	idd = -1;
	duration = 9999999;
	onLoad = "uiNamespace setVariable ['HUD', _this select 0];";
	class Controls
	{
		class Box
		{
			type = 0;
			idc = 1000;
			x = safeZoneX + safeZoneW * 0.908125;
			y = safeZoneY + safeZoneH * 0.83333334;
			w = safeZoneW * 0.115;
			h = safeZoneH * 0.20777778;
			style = 0;
			text = "";
			colorBackground[] = {0.2,0.2,0.2,0.7858};
			colorText[] = {0.5608,0.3059,0.6549,1};
			font = "PuristaMedium";
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			
		};
		class HUNGER
		{
			type = 0;
			idc = 1001;
			x = safeZoneX + safeZoneW * 0.911875;
			y = safeZoneY + safeZoneH * 0.87;
			w = safeZoneW * 0.0375;
			h = safeZoneH * 0.03666667;
			style = 0;
			text = "HUNGER";
			colorBackground[] = {0,0,0,0};
			colorText[] = {0.7098,0.7059,0.1882,1};
			font = "PuristaMedium";
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			
		};
		class ThirstCtrl
		{
			type = 0;
			idc = 1002;
			x = safeZoneX + safeZoneW * 0.911875;
			y = safeZoneY + safeZoneH * 0.91;
			w = safeZoneW * 0.0375;
			h = safeZoneH * 0.03666667;
			style = 0;
			text = "THIRST";
			colorBackground[] = {0,0,0,0};
			colorText[] = {0.7098,0.7059,0.1882,1};
			font = "PuristaMedium";
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			
		};
		class HealthCtrl
		{
			type = 0;
			idc = 1003;
			x = safeZoneX + safeZoneW * 0.911875;
			y = safeZoneY + safeZoneH * 0.95;
			w = safeZoneW * 0.0375;
			h = safeZoneH * 0.03666667;
			style = 0;
			text = "HEALTH";
			colorBackground[] = {0,0,0,0};
			colorText[] = {0.7098,0.7059,0.1882,1};
			font = "PuristaMedium";
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			
		};
		class FPSCtrl
		{
			type = 0;
			idc = 1005;
			x = safeZoneX + safeZoneW * 0.911875;
			y = safeZoneY + safeZoneH * 0.83;
			w = safeZoneW * 0.0375;
			h = safeZoneH * 0.03666667;
			style = 0;
			text = "FPS";
			colorBackground[] = {0,0,0,0};
			colorText[] = {0.7098,0.7059,0.1882,1};
			font = "PuristaMedium";
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			
		};
		
	};
	
};

CustomControlClasses.h:

#ifndef HG_CustomControlClassesh
#define HG_CustomControlClassesh 1
//Create a header guard to prevent duplicate include.

class RscListBox_WS
{
	type = 5;
	style = 0;
	idc = -1;
	colorSelect[] = {0,0.2,0.4,1};
	colorSelectBackground[] = {0,0.2,0.4,0.1};
	colorText[] = {0.2,0.2,0.2,1};
	colorBackground[] = {0.4,0.4,0.4,0};
	font = "Bitstream";
	sizeEx = 0.04;
	rowHeight = 0.025;
	maxHistoryDelay = "";
	
};
class RscPictureKeepAspect_WS
{
	type = 0;
	style = 48+2048;
	idc = -1;
	colorBackground[] = {0,0,0,0};
	colorText[] = {1,1,1,1};
	font = "Bitstream";
	sizeEx = 0;
	lineSpacing = 0;
	text = "";
	
};
class RscText_WS
{
	type = 0;
	style = 0;
	idc = -1;
	colorBackground[] = {0,0,0,0};
	colorText[] = {0.2,0.2,0.2,1};
	font = "Bitstream";
	sizeEx = 0.03;
	text = "";
	
};
class RscControlsGroup_WS
{
	type = 15;
	style = 0;
	idc = -1;
	maxHistoryDelay = "";
	
};
class RscButton_WS
{
	type = 1;
	style = 2;
	idc = -1;
	font = "Bitstream";
	sizeEx = 0.03;
	default = false;
	colorText[] = {0,0,0,1};
	colorDisabled[] = {0.4,0.4,0.4,1};
	colorBackground[] = {1,1,1,1};
	colorBackgroundDisabled[] = {0.7,0.7,0.7,0.8};
	colorBackgroundActive[] = {1,0.5,0,1};
	colorFocused[] = {1,0.5,0,1};
	colorShadow[] = {0.72,0.36,0,0.8};
	colorBorder[] = {0.72,0.36,0,0};
	soundEnter[] = {"",0.1,1.0};
	soundPush[] = {"",0.1,1.0};
	soundClick[] = {"",0.1,1.0};
	soundEscape[] = {"",0.1,1.0};
	offsetX = 0.0030;
	offsetY = 0.0030;
	offsetPressedX = 0.0020;
	offsetPressedY = 0.0020;
	borderSize = 0.0;
	
};
class RscTextMulti_WS : RscText_WS 
{
	lineSpacing = 1;
	style = 0+16+512;
	
};
#endif

My goal is to have the display up at any time.

 

Thanks in advance,

 

CP.

Share this post


Link to post
Share on other sites

If you want to use a dialog with cutRsc or any other Rsc command you have to put it in the RscTitles config:

class RscTitles
{
	class TER_RscDisplayTargetDebug
	{
		idd = 73042;
		fadeIn = 0;
		fadeOut = 0;
		duration = 1e+6;
		onLoad = "uiNamespace setVariable [""TER_3den_RscTargetDebug_display"",_this select 0]";
		class controls
		{
			...
		};
	};
};

These kinds of displays behave a little different from "normal" dialogs, eg they are not accessible via findDisplay.

Share this post


Link to post
Share on other sites
class IslandDialog
{
	idd = -1;
c	lass TER_RscDisplayTargetDebug
	{
		idd = 73042;
		fadeIn = 0;
		fadeOut = 0;
		duration = 1e+6;
		onLoad = "uiNamespace setVariable [""TER_3den_RscTargetDebug_display"",_this select 0]";
	class Controls
	{
		class Box
		{
			type = 0;
			idc = 1000;
			x = safeZoneX + safeZoneW * 0.908125;
			y = safeZoneY + safeZoneH * 0.83333334;
			w = safeZoneW * 0.115;
			h = safeZoneH * 0.20777778;
			style = 0;
			text = "";
			colorBackground[] = {0.2,0.2,0.2,0.7858};
			colorText[] = {0.5608,0.3059,0.6549,1};
			font = "PuristaMedium";
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			
		};
};

Somewhat like that?

Share this post


Link to post
Share on other sites

More like

Spoiler

class RscTitles
{
	class IslandDialog
	{
		idd = -1;
		duration = 9999999;
		onLoad = "uiNamespace setVariable ['HUD', _this select 0];";
		class Controls
		{
			class Box
			{
				type = 0;
				idc = 1000;
				x = safeZoneX + safeZoneW * 0.908125;
				y = safeZoneY + safeZoneH * 0.83333334;
				w = safeZoneW * 0.115;
				h = safeZoneH * 0.20777778;
				style = 0;
				text = "";
				colorBackground[] = {0.2,0.2,0.2,0.7858};
				colorText[] = {0.5608,0.3059,0.6549,1};
				font = "PuristaMedium";
				sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);

			};
			class HUNGER
			{
				type = 0;
				idc = 1001;
				x = safeZoneX + safeZoneW * 0.911875;
				y = safeZoneY + safeZoneH * 0.87;
				w = safeZoneW * 0.0375;
				h = safeZoneH * 0.03666667;
				style = 0;
				text = "HUNGER";
				colorBackground[] = {0,0,0,0};
				colorText[] = {0.7098,0.7059,0.1882,1};
				font = "PuristaMedium";
				sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);

			};
			class ThirstCtrl
			{
				type = 0;
				idc = 1002;
				x = safeZoneX + safeZoneW * 0.911875;
				y = safeZoneY + safeZoneH * 0.91;
				w = safeZoneW * 0.0375;
				h = safeZoneH * 0.03666667;
				style = 0;
				text = "THIRST";
				colorBackground[] = {0,0,0,0};
				colorText[] = {0.7098,0.7059,0.1882,1};
				font = "PuristaMedium";
				sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);

			};
			class HealthCtrl
			{
				type = 0;
				idc = 1003;
				x = safeZoneX + safeZoneW * 0.911875;
				y = safeZoneY + safeZoneH * 0.95;
				w = safeZoneW * 0.0375;
				h = safeZoneH * 0.03666667;
				style = 0;
				text = "HEALTH";
				colorBackground[] = {0,0,0,0};
				colorText[] = {0.7098,0.7059,0.1882,1};
				font = "PuristaMedium";
				sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);

			};
			class FPSCtrl
			{
				type = 0;
				idc = 1005;
				x = safeZoneX + safeZoneW * 0.911875;
				y = safeZoneY + safeZoneH * 0.83;
				w = safeZoneW * 0.0375;
				h = safeZoneH * 0.03666667;
				style = 0;
				text = "FPS";
				colorBackground[] = {0,0,0,0};
				colorText[] = {0.7098,0.7059,0.1882,1};
				font = "PuristaMedium";
				sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);

			};

		};

	};
};

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Alright, I got it working. Had a long break from scripting and well, the result speak for themselves.

 

Thank you for your help!

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

×