I just added a pause button to my game, using most of this code: http://msdn.microsoft.com/en-us/library/bb195026%28v=xnagamestudio.31%29.aspx

For some reason it changes the Window.Title to "[GameName] - Paused" and even though it's unpaused it still says paused in the title. I never told it to change the title so I guess it assumes when the "P" key is hit to print out "Paused" in the title but how do I make it go away when it's unpaused?

Edit: I figured out it's getting "Paused" from the 'menu' I'm printing out which is just a Paused texture2D in the top right of the screen. I don't understand how that's affecting the Window.Title though.

Do a search for all references of Window.Title in your IDE. That should tell you where it is being changed.

Does the title say paused, before you pause the game for the first time?

No it does not. I have declared Window.Title("[GameName]") in the initialization. Besides that, I've never done anything with it. It adds "- Paused" to the title once I hit the P key. I assume it's a built in function of XNA but I don't want it to be doing that.

Sorry, but XNA does not know when your game is "Paused", unless you told it how. Slap a breakpoint at where the code for the P key is executed. Press p, and then step through each line, you must have missed something.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.