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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...