Jump to content
Sign in to follow this  
finguide

Dialog not appearing to player's screen

Recommended Posts

How to make dialog appear to player's screen?

I have copied this "as is" from Dialog Control in Bohemia Wiki:

#define true 1
#define false 0

class MyHelloWorldDialog {
idd = -1;                      // set to -1, because we don't require a unique ID
movingEnable = true;           // the dialog can be moved with the mouse (see "moving" below)
enableSimulation = false;      // freeze the game
controlsBackground[] = { };    // no background controls needed
objects[] = { };               // no objects needed
controls[] = { MyHelloText };  // our "Hello world" text as seen below:

class MyHelloText {
	idc = -1;              // set to -1, unneeded
	moving = 1;            // left click (and hold) this control to move the dialog
	                       // (requires "movingEnabled" to be 1, see above)
	type = CT_STATIC;      // constant
	style = ST_LEFT;       // constant
	text = "Hello world";
	font = FontM;
	sizeEx = 0.023;

	colorBackground[] = { 1, 1, 1, 0.3 };
	colorText[] = { 0, 0, 0, 1 };

	x = 0.8;
	y = 0.1;
	w = 0.2;
	h = 0.05;
};
};

I put it straight to the missions description.ext, saved the mission in the editor and went to the preview, but the dialog didn't appear. What am I doing wrong?

Thanks in advance,

finguide

Share this post


Link to post
Share on other sites

There are defines missing for CT_STATIC and ST_LEFT. Check the linked page again, there are a bit further down, just copy/paste them in the description.ext at the other defines you already have.

Share this post


Link to post
Share on other sites

Thanks for your reply,

now it's

#define true 1
#define false 0
#define CT_STATIC 0
#define ST_LEFT           0x00

class MyHelloWorldDialog {
idd = -1;                      // set to -1, because we don't require a unique ID
movingEnable = true;           // the dialog can be moved with the mouse (see "moving" below)
enableSimulation = false;      // freeze the game
controlsBackground[] = { };    // no background controls needed
objects[] = { };               // no objects needed
controls[] = { MyHelloText };  // our "Hello world" text as seen below:

class MyHelloText {
	idc = -1;              // set to -1, unneeded
	moving = 1;            // left click (and hold) this control to move the dialog
	                       // (requires "movingEnabled" to be 1, see above)
	type = CT_STATIC;      // constant
	style = ST_LEFT;       // constant
	text = "Hello world";
	font = FontM;
	sizeEx = 0.023;

	colorBackground[] = { 1, 1, 1, 0.3 };
	colorText[] = { 0, 0, 0, 1 };

	x = 0.8;
	y = 0.1;
	w = 0.2;
	h = 0.05;
};
};

but still not working. Did I fail?

Share this post


Link to post
Share on other sites

Oh, I thought that the dialog would appear straight in the beginning of mission... :o

Share this post


Link to post
Share on other sites

you need to call, possibly from a script - something like

_callGUI = createDialog "MyHelloWorldDialog"

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  

×