Jump to content
BomosBoy

Muliple Dialogs / One "main" Dialog

Recommended Posts

I want to create a loadout dialog with the use of multiple buttons, labels, etc.I've a menu with a headline etc.

My problem is that the menu is sometimes looking different. (Image)

I thought it might be possible to have a "super" control where different controls are children of the super control. So that i only need to hide the body of my menu not the header. I know i cant explain it good enough. I hope the picture helps.

I only want a way where i dont need to hide every single control.

 

IP6CWHZ.png

Share this post


Link to post
Share on other sites

can you show the dialog code you have so far?

 

thx

Share this post


Link to post
Share on other sites

Its nothing special....

I just want like a "controlbox" where i can put other controls in and access them via one idc.


class loadoutMenu {
	
	idd = 1200;
	movingEnable = 0;
	enableSimulation = 1;
	
	class controls {
		
		class BackgroundTitle : RscText
		{
			idc = 1211;
			x = 0.25 * safezoneW + safezoneX;
			y = 0.20 * safezoneH + safezoneY;
			w = 0.5 * safezoneW;
			h = 0.058 * safezoneH;
		};

		class BackgroundLoadout : RscText
		{
			idc = 1212;
			x = 0.422656 * safezoneW + safezoneX;
			y = 0.324 * safezoneH + safezoneY;
			w = 0.37125 * safezoneW;
			h = 0.319 * safezoneH;
		};
		
		class ButtonLoadoutDefault : RscButton
		{
			idc = 1201;
			text = "default"; //--- ToDo: Localize;
			x = 0.25 * safezoneW + safezoneX;
			y = (0.26 + 0.0015) * safezoneH + safezoneY;
			w = 0.071 * safezoneW;
			h = 0.022 * safezoneH;
		};
		class ButtonLoadoutCustom : RscButton
		{
			idc = 1202;
			text = "custom"; //--- ToDo: Localize;
			x = (0.25 + (0.07) + (0.0015)) * safezoneW + safezoneX;
			y = (0.26 + 0.0015) * safezoneH + safezoneY;
			w = 0.071 * safezoneW;
			h = 0.022 * safezoneH;
		};
/* MY IDEA #############################

class supercontrol {
  idc = 2000;
  button1 : RscButton
  button2 : RscButton

};
class supercontrol2 {
idc = 2001;
button1 : RscButton
button2 : RscButton

};

######################################*/
	};
	
};



Share this post


Link to post
Share on other sites

You can only have one at a time. The best way to go about structuring dialogs with lots of controls is with multiple ControlGroups (which are basically containers for controls). The only way I have managed to get two dialogs to be layered (where the bottom layer is inactive) is to create them using the following code:

_nul = createDialog "RscDialog1";
([] call BIS_fnc_displayMission) createDisplay "RscDialog2";

This will create a dialog "RscDialog1" and then another dialog "RscDialog2" on top of the first.

 

 

Hope this helps,

 

Bull

  • Like 1

Share this post


Link to post
Share on other sites

You can only have one at a time. The best way to go about structuring dialogs with lots of controls is with multiple ControlGroups (which are basically containers for controls). The only way I have managed to get two dialogs to be layered (where the bottom layer is inactive) is to create them using the following code:

_nul = createDialog "RscDialog1";
([] call BIS_fnc_displayMission) createDisplay "RscDialog2";

This will create a dialog "RscDialog1" and then another dialog "RscDialog2" on top of the first.

 

 

Hope this helps,

 

Bull

 

Yea it helps alot thx!

I only need to understand now the concept of the ControlsGroup ^^ but i will read the wiki!

Share this post


Link to post
Share on other sites

Sorry that i post again, but has someone an example of ControlsGroup?

I try to the example in the wiki / gui editor but my button is invisible / not added.

Share this post


Link to post
Share on other sites

Did you remember to change your button positions? Positons of controls in a ctrlsGrp are relative to the ctrlGrp. So dependent on whether you added scrollbars to the ctrlGrp(may not be obvious), the button may not be invisible, just wildly offset from where you think it should be.

  • Like 1

Share this post


Link to post
Share on other sites

Yes that was my problem. And the ControlsGroup has a really big border at the bottom. I made a small ControlsGroup so there was nothing to see ^^.

Thx for the answer larrow!

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

×