Jump to content
Sign in to follow this  

GUI Scripting where do I start?

Recommended Posts

Hello guys!

In the world of Arma-scripting some parts looks terrible complex and some parts just easy. Designing GUIs seems to be one of the more terrible parts, I currently dont know where to start. At the moment I am using the description.ext to design my interface. At the beginning I just want output permanently(!) some text and some variables on the users screen.

My current description.ext is containg this: EDIT: Removed my old and wrong description.ext.

Just two basic lines, one above the other. How do I call this GUI in my sqf right now? It seems that there are different ways to tell the GUI to draw itself.

cutRsc["ExampleTitle","PLAIN"]; //draw the GUI just for some seconds and fades out

or something like:

_ChildControl = (findDisplay 72014) displayCtrl 22; //does not work :X

Whats the better one and where is the difference and how does it work? I guess the command to change the texts of the GUI is depening on what kind of function I use to draw my GUI.

Please note, that I am new to arma-scripting and that are my first tries.

Best regards


Edited by 7rust

Share this post

Link to post
Share on other sites

idc = 22;

idc (id control) supposed to be inside control not in display which by the way already has idd (id display) defined. Put it into newExample or otherNewExample.

To have RscTitle not disappear right away, add

duration = 1e+011;

into display (ExampleTitle)

Share this post

Link to post
Share on other sites

Thanks guys! The guide helped me alot, but there is one thing I dont not understand. Where is the difference between cutRsc and this displayCtrl-stuff? If I understand it correctly, cutRsc is to splash a dialog and the display commands to create something like a display where the gui is drawed on?

Now I have createn an interface (with the A3 gui-editor) exported it and included it into the description.ext (now with correct idds, idcs and durration). But how to splash the GUI and how do I splash and remove it from the screen and how to I change the text of a certain class?

Thanks for your time!

best regards

Share this post

Link to post
Share on other sites

Small update, after reworking my description.ext I was able to output my GUI to the users screen using: 1 cutRsc["LIGHT_IED_DIALOG","PLAIN"];

But I am unable to find my display (via idd) to change some content of the Text :X

		_disp = findDisplay 123; //outputs "no display" so it cant find the display idd which I have defined in my dialog.

		_test = _disp displayCtrl 1000;
		_test ctrlSetText "kjdsfkjdsf";	


class rscTitles
	idd = 123;
	movingEnable = false;
	enableSimulation = true;
	duration = 2;
       fadeIn = 0;
       fadeOut = 0; 

	//class RscText;

	class Controls

		class MY_CLASS_NAME: RscText
			idc = 1000;
			text = "";
			x = 0.171875 * safezoneW + safezoneX;
			y = 0.612 * safezoneH + safezoneY;
			w = 0.177188 * safezoneW;
			h = 0.028 * safezoneH;

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