Jump to content
The Dark Mod Forums

Help with custom mainmenu_briefing.gui


datiswous

Recommended Posts

I modified the standard mainmenu_briefing.gui file to add an extra button in the center that directs to another page:

deadeye(2023-04-0614-32-17)(000).thumb.jpg.f1373ee24101b6ae118fa19b6b9ad82f.jpg

 

Then If you click on button StartLocation, you get to another page, where I still have to add the starter locations and you have a Briefing button, to get back to the briefingtext:

deadeye(2023-04-0614-32-23)(000).thumb.jpg.af7b3cbd6539c972dabad1a5c57a1412.jpg

 

Code for only this part (might still have some unneeded code) :

Spoiler
	// Mission location
	
	windowDef Startlocation
	{
		//rect		60, 70, 530, 300 -- Old Values
		rect		90, 75, 458, 150
		bordercolor	1,1,1,1
		text		"Select a location to start the mission"
//		font		BRIEFING_TEXT_FONT
//		textscale	BRIEFING_TEXT_SCALE
		forecolor	0, 0, 0, 1
		visible		0
	}
	
	windowDef BriefingButton
	{
		rect 270, 445, 100, 100
//		textalign 1
		MM_BUTTON_HUGE
		forecolor	GLOW_WHITE_COLOR
		text		"Briefing"
		visible		0
		onAction
		{
		set "BriefingText::visible" "1";
		set "StartLocationButton::visible" "1";
		set "Startlocation::visible" "0";
		set "BriefingButton::visible" "0";
		}
	}
	
	windowDef StartLocationButton
	{
		rect 270, 445, 110, 100
//		textalign 1
		MM_BUTTON_HUGE
		forecolor	GLOW_WHITE_COLOR
		text		"StartLocation"
		visible		1
		onAction
		{
		set "BriefingText::visible" "0";
		set "StartLocationButton::visible" "0";
		set "Startlocation::visible" "1";
		set "BriefingButton::visible" "1";

		}
	}

 

 

Question:

How do I remove the up and down navigation-buttons that are still present on this page?

I already tried:

set "scrollDown::visible" "0";
set "scrollUp::visible" "0";

 

Edited by datiswous
Link to comment
Share on other sites

mainmenu_briefing.gui has a windowDef called 'scrollDown'. It contains the following line:

        visible        ("gui::ScrollDownVisible" == 1)

ScrollDownVisible is set in C++ code, based on whether the briefing has more pages. Maybe you need to change this logic to be TRUE only if the briefing text is also visible. Something like:

 

       visible        ("gui::ScrollDownVisible" == 1 && "BriefingText::visible" == 1)

That way when your start location page is up, the arrow won't display.

  • Thanks 1
Link to comment
Share on other sites

I have now 2 possible screens in the briefing page:

  1. The Briefing text
  2. The Startlocation selection

If I'm in the Startlocation screen, but click on Back and then in the mainmenu start the mission again, I see the Startlocation screen again, instead of the briefing text. How can I set it so that it will go back to the briefing text every time I start the mission in the main menu?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...