Pausing and Loading GUI overlap

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
chrislow19
Posts: 34
Joined: Mon Dec 30, 2019 4:26 pm

Pausing and Loading GUI overlap

Post by chrislow19 »

Hi, I'm wondering if there's a way to minimize (or maybe turn the alpha to 0) the pause menu once you've hit load game. What's happening is the Load screen is overlapping the Pause menu, but both are clearly visible.
GUI issue0.jpg
GUI issue0.jpg (63.8 KiB) Viewed 586 times
GUI issue.png
GUI issue.png (248.46 KiB) Viewed 586 times
I've tried adding a new method to On Open() in the LoadGamePanel by adding the Pause panel and utilizing UIPanel ->Close(). That works for closing the Pausepanel, but unpauses the game while I'm in the load screen. I've tried other methods as well, but I didn't see a clear answer.

Thanks!
chrislow19
Posts: 34
Joined: Mon Dec 30, 2019 4:26 pm

Re: Pausing and Loading GUI overlap

Post by chrislow19 »

One other issue I'd like a little more detail about - I'm trying to add the scene name details (and time/date) to my load game summary, and I'm having a bit of a hard time following your documentation on that specific portion. If you don't mind providing a little guidance I'd appreciate that. Thanks!

Edit: It should be mentioned that I've swapped text for textmeshpro, if that makes any difference
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Pausing and Loading GUI overlap

Post by Tony Li »

Hi,
chrislow19 wrote: Sat Jan 11, 2020 4:13 pmHi, I'm wondering if there's a way to minimize (or maybe turn the alpha to 0) the pause menu once you've hit load game. What's happening is the Load screen is overlapping the Pause menu, but both are clearly visible.
Here's one way:

1. Make a copy of the LoadGamePanel for use in gameplay scenes (i.e., from the PausePanel). Continue using the original LoadGamePanel for the TitleMenu.

2. Configure the PausePanel's LoadButton OnClick() with 2 event handlers:
  • LoadGamePanel (the new copy): UIPanel.Open
  • PausePanel: Animator.SetTrigger(Hide)
2. Configure the new LoadGamePanel's LoadGameBack button OnClick() with 2 event handlers:
  • PausePanel: Animator.SetTrigger(Hide)
  • LoadGamePanel: UIPanel.Close
chrislow19 wrote: Sat Jan 11, 2020 6:40 pmOne other issue I'd like a little more detail about - I'm trying to add the scene name details (and time/date) to my load game summary, and I'm having a bit of a hard time following your documentation on that specific portion. If you don't mind providing a little guidance I'd appreciate that.
Set a Dialogue System variable named "CurrentStage" whenever you enter a scene. For example, you can add an empty GameObject with a Dialogue System Trigger to each scene. Set the trigger to OnStart. Select Action > Run Lua Code. Configure the Lua code to set "CurrentStage":

Code: Select all

Variable["CurrentStage"] = "my scene name"
where "my scene name" is the name of the scene. The value of this variable will be included in the saved game summary info.

Alternatively, you can a subclass of SaveHelper and override the GetCurrentDetails(slot#) method return whatever string you want. This string will be used for the saved game summary info.
chrislow19
Posts: 34
Joined: Mon Dec 30, 2019 4:26 pm

Re: Pausing and Loading GUI overlap

Post by chrislow19 »

I didn't get your first method to work, but I was able to work around in the Title screen by setting PausePanel: Animator.SetTrigger(Hide) in the areas I needed, and PausePanel: Animator.SetTrigger(Show) on the back buttons. I'll apply these to the save panels and quit to menu panels as well. Hopefully there shouldn't be any snags, since I don't run the Menu system in any other scenes.

Thank you so much, everything is looking good!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Pausing and Loading GUI overlap

Post by Tony Li »

Glad it's working now. BTW, my suggestion above was a 2-step process. You'd need to do both of them to make the suggestion work.
Post Reply