mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 19:56:38 +00:00 
			
		
		
		
	don't allow opening a window multiple times, primarily the console
This commit is contained in:
		
							parent
							
								
									2be60041f3
								
							
						
					
					
						commit
						3d7146cd50
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -772,6 +772,13 @@ void WindowManager::pushGuiMode(GuiMode mode) | |||
|     if (mode==GM_Inventory && mAllowed==GW_None) | ||||
|         return; | ||||
| 
 | ||||
| 
 | ||||
|     // If this mode already exists somewhere in the stack, just bring it to the front.
 | ||||
|     if (std::find(mGuiModes.begin(), mGuiModes.end(), mode) != mGuiModes.end()) | ||||
|     { | ||||
|         mGuiModes.erase(std::find(mGuiModes.begin(), mGuiModes.end(), mode)); | ||||
|     } | ||||
| 
 | ||||
|     mGuiModes.push_back(mode); | ||||
| 
 | ||||
|     bool gameMode = !isGuiMode(); | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue