1 /*
2 	This file is part of Warzone 2100.
3 	Copyright (C) 1999-2004  Eidos Interactive
4 	Copyright (C) 2005-2020  Warzone 2100 Project
5 
6 	Warzone 2100 is free software; you can redistribute it and/or modify
7 	it under the terms of the GNU General Public License as published by
8 	the Free Software Foundation; either version 2 of the License, or
9 	(at your option) any later version.
10 
11 	Warzone 2100 is distributed in the hope that it will be useful,
12 	but WITHOUT ANY WARRANTY; without even the implied warranty of
13 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 	GNU General Public License for more details.
15 
16 	You should have received a copy of the GNU General Public License
17 	along with Warzone 2100; if not, write to the Free Software
18 	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 /*
21  * titleui/titleui.cpp
22  *
23  * WzTitleUI common stuff
24  */
25 
26 #include "titleui.h"
27 #include "../intdisplay.h"
28 #include "../hci.h"
29 
30 std::shared_ptr<WzTitleUI> wzTitleUICurrent;
31 char serverName[128];
32 
~WzTitleUI()33 WzTitleUI::~WzTitleUI()
34 {
35 }
36 
screenSizeDidChange(unsigned int oldWidth,unsigned int oldHeight,unsigned int newWidth,unsigned int newHeight)37 void WzTitleUI::screenSizeDidChange(unsigned int oldWidth, unsigned int oldHeight, unsigned int newWidth, unsigned int newHeight)
38 {
39 }
40 
changeTitleUI(std::shared_ptr<WzTitleUI> target)41 void changeTitleUI(std::shared_ptr<WzTitleUI> target)
42 {
43 	wzTitleUICurrent = target;
44 	// Deletes the backdrop, which in turn deletes the rest of the UI from whatever was on screen before this UI
45 	widgDelete(psWScreen, FRONTEND_BACKDROP);
46 	if (target)
47 		target->start();
48 }
49