1 /////////////////////////////////////////
2 //
3 //             OpenLieroX
4 //
5 // code under LGPL, based on JasonBs work,
6 // enhanced by Dark Charlie and Albert Zeyer
7 //
8 //
9 /////////////////////////////////////////
10 
11 
12 // Menu header file
13 // Created 30/6/02
14 // Jason Boettcher
15 
16 
17 #ifndef __MENU_H__DEPRECATED_GUI__
18 #define __MENU_H__DEPRECATED_GUI__
19 
20 #include <SDL.h>
21 #include <string>
22 
23 #include "DeprecatedGUI/CWidgetList.h"
24 #include "DeprecatedGUI/CCombobox.h"
25 #include "DeprecatedGUI/CInputBox.h"
26 #include "Networking.h"
27 #include "CBytestream.h"
28 #include "DeprecatedGUI/CListview.h"
29 #include "CWpnRest.h"
30 #include "CClient.h" // for MAX_PLAYERS
31 #include "CGameSkin.h"
32 #include "CWorm.h"
33 #include "Color.h"
34 #include "HTTP.h"
35 
36 void GotoJoinLobby();
37 
38 
39 namespace DeprecatedGUI {
40 
41 enum {
42 // Menu sockets
43 	SCK_LAN = 0,
44 	SCK_NET = 1,
45 	SCK_FOO = 2,
46 // Serverlist timeout
47 	SVRLIST_TIMEOUT =  7000,
48 // Server info dialog dimensions
49 	INFO_W = 400,
50 	INFO_H = 420,
51 
52 	MAX_QUERIES = 3
53 };
54 
55 
56 // Menu types
57 enum {
58 	MNU_MAIN=0,
59 	MNU_LOCAL,
60 	MNU_NETWORK,
61 	MNU_PLAYER,
62 	MNU_OPTIONS,
63 	MNU_MAPED,
64 	MNU_GUISKIN
65 };
66 
67 
68 // Layout IDs
69 enum {
70 	L_MAINMENU=0,
71 	L_LOCALPLAY,
72 	L_GAMESETTINGS,
73 	L_WEAPONOPTIONS,
74 	L_LOADWEAPONS,
75 	L_SAVEWEAPONS,
76 	L_NET,
77 	L_NETINTERNET,
78 	L_INTERNETDETAILS,
79 	L_ADDSERVER,
80 	L_NETLAN,
81 	L_LANDETAILS,
82 	L_NETHOST,
83 	L_NETFAVOURITES,
84 	L_FAVOURITESDETAILS,
85 	L_RENAMESERVER,
86 	L_ADDFAVOURITE,
87 	L_CONNECTING,
88 	L_NETJOINLOBBY,
89 	L_NETHOSTLOBBY,
90 	L_SERVERSETTINGS,
91 	L_BANLIST,
92 	L_PLAYERPROFILES,
93 	L_CREATEPLAYER,
94 	L_VIEWPLAYERS,
95 	L_LEVELEDITOR,
96 	L_NEWDIALOG,
97 	L_SAVELOADLEVEL,
98 	L_OPTIONS,
99 	L_OPTIONSCONTROLS,
100 	L_OPTIONSGAME,
101 	L_OPTIONSSYSTEM,
102 	L_MESSAGEBOXOK,
103 	L_MESSAGEBOXYESNO,
104 	LAYOUT_COUNT
105 };
106 
107 // Box types
108 enum {
109 	BX_OUTSET = 0,
110 	BX_INSET,
111 	BX_SOLID
112 };
113 
114 
115 // Sub title id's
116 enum {
117 	SUB_LOCAL=0,
118 	SUB_NETWORK,
119 	SUB_PLAYER,
120 	SUB_MAPED,
121 	SUB_OPTIONS,
122 	SUB_LOBBY
123 };
124 
125 
126 // Message box types
127 enum MessageBoxType {
128 	LMB_OK = 0,
129 	LMB_YESNO
130 };
131 
132 enum MessageBoxReturnType {
133 	// Return types
134 	MBR_INVALID = -1,
135 	MBR_OK = 0,
136 	MBR_YES,
137 	MBR_NO
138 };
139 
140 
141 // Buttons
142 enum {
143 	BUT_MAIN=0,
144 	BUT_INTERNET,
145 	BUT_LAN,
146 	BUT_HOST,
147 	BUT_FAVOURITES,
148 	BUT_BACK,
149 	BUT_OK,
150 	BUT_CREATE,
151 	BUT_NEW,
152 	BUT_RANDOM,
153 	BUT_LOAD,
154 	BUT_SAVE,
155 	BUT_QUIT,
156 	BUT_CANCEL,
157 	BUT_QUITGAME,
158 	BUT_PLAYAGAIN,
159 	BUT_YES,
160 	BUT_NO,
161 	BUT_CONTROLS,
162 	BUT_GAME,
163 	BUT_SYSTEM,
164 	BUT_APPLY,
165 	BUT_RESUME,
166 	BUT_NEWPLAYER,
167 	BUT_VIEWPLAYERS,
168 	BUT_DELETE,
169 	BUT_START,
170 	BUT_JOIN,
171 	BUT_REFRESH,
172 	BUT_ADD,
173 	BUT_READY,
174 	BUT_LEAVE,
175 	BUT_GAMESETTINGS,
176 	BUT_UPDATELIST,
177     BUT_WEAPONOPTIONS,
178     BUT_RESET,
179     BUT_DEFAULT,
180 	BUT_BANNED,
181 	BUT_UNBAN,
182 	BUT_CLEAR,
183 	BUT_SERVERSETTINGS,
184 	BUT_FILTER,
185 	BUT_ADDTOFAVOURITES,
186 	BUT_NEWS,
187 	BUT_GENERAL,
188 	BUT_BONUS,
189 	BUT_CHAT,
190 	BUT_TEST,
191 	BUT_MORE,
192 	BUT_LESS
193 };
194 
195 // Button names
196 typedef const char * ConstCharP_t; // Workaround for error in MSVC which won't allow type "const char * const" allowed by G++
197 ConstCharP_t const sButtonNames[] =  {
198 	"Main",
199 	"Internet",
200 	"LAN",
201 	"Host",
202 	"Favourites",
203 	"Back",
204 	"Ok",
205 	"Create",
206 	"New",
207 	"Random",
208 	"Load",
209 	"Save",
210 	"Quit",
211 	"Cancel",
212 	"Quit Game",
213 	"Play Again",
214 	"Yes",
215 	"No",
216 	"Controls",
217 	"Game",
218 	"System",
219 	"Apply",
220 	"Resume",
221 	"New Player",
222 	"View Players",
223 	"Delete",
224 	"Start",
225 	"Join",
226 	"Refresh",
227 	"Add",
228 	"Ready",
229 	"Leave",
230 	"Game Settings",
231 	"Update List",
232 	"Weapon Options",
233 	"Reset",
234 	"Default",
235 	"Ban List",
236 	"Unban",
237 	"Clear",
238 	"Server Settings",
239 	"Filter",
240 	"Add to Favourites",
241 	"News",
242 	"General",
243 	"Bonus",
244 	"Chat",
245 	"Test",
246 	"More >>",
247 	"<< Less"
248 };
249 
250 // Frontend info
251 class frontendinfo_t { public:
252 	int				iMainTitlesLeft;
253 	int				iMainTitlesTop;
254 	int				iMainTitlesSpacing;
255 	int				iCreditsLeft;
256 	int				iCreditsTop;
257 	int				iCreditsSpacing;
258 	bool			bPageBoxes;
259 	std::string		sFrontendCredits;
260 	float			fLoadingAnimFrameTime;
261 	int				iLoadingAnimLeft;
262 	int				iLoadingAnimTop;
263 	int				iLoadingBarLeft;
264 	int				iLoadingBarTop;
265 	int				iLoadingLabelLeft;
266 	int				iLoadingLabelTop;
267 };
268 
269 // Menu structure
270 class menu_t { public:
271 
272 	// Graphics
273 	//SmartPointer<SDL_Surface> bmpMainBack;
274     //SmartPointer<SDL_Surface> bmpMainBack_lg;
275     SmartPointer<SDL_Surface> bmpMainBack_wob;
276 	SmartPointer<SDL_Surface> bmpMainBack_common;
277 	SmartPointer<SDL_Surface> bmpBuffer;
278 
279 	SmartPointer<SDL_Surface> bmpMsgBuffer;
280     SmartPointer<SDL_Surface> bmpMiniMapBuffer;
281 
282 	SmartPointer<SDL_Surface> bmpLieroXtreme;
283 	SmartPointer<SDL_Surface> bmpMainTitles;
284 	SmartPointer<SDL_Surface> bmpTitles;
285 	SmartPointer<SDL_Surface> bmpSubTitles;
286 	SmartPointer<SDL_Surface> bmpButtons;
287 	SmartPointer<SDL_Surface> bmpCheckbox;
288 	SmartPointer<SDL_Surface> bmpInputbox;
289 	SmartPointer<SDL_Surface> bmpChatBackgroundMain;
290 	SmartPointer<SDL_Surface> bmpChatBackground;
291 
292 	SmartPointer<SDL_Surface> bmpMainLocal;
293 	SmartPointer<SDL_Surface> bmpMainNet;
294 	SmartPointer<SDL_Surface> bmpLobbyReady;
295 	SmartPointer<SDL_Surface> bmpLobbyNotReady;
296 	SmartPointer<SDL_Surface> bmpHost;
297 	SmartPointer<SDL_Surface> bmpConnectionSpeeds[5];
298 	SmartPointer<SDL_Surface> bmpSpeech;
299     SmartPointer<SDL_Surface> bmpHandicap;
300 	SmartPointer<SDL_Surface> bmpDownload;
301 
302 	SmartPointer<SDL_Surface> bmpTriangleUp;
303 	SmartPointer<SDL_Surface> bmpTriangleDown;
304 
305 	SmartPointer<SDL_Surface> bmpAI;
306 	CWormSkin cSkin;
307 
308 	SmartPointer<SDL_Surface> bmpMapEdTool;
309 
310 	// Other
311 	bool			bMenuRunning;
312 	int				iMenuType;
313 	frontendinfo_t	tFrontendInfo;
314 	std::string		sSavedChatText;
315 	CWorm			sLocalPlayers[MAX_PLAYERS];
316 	bool			bForbidConsole;  // Don't show console
317 	int				iListItemHeight;
318 	bool			bFingerDrag;
319 
320 	// Map Editor
321 	int				iEditMode;
322 	int				iCurHole;
323 	int				iCurStone;
324 	int				iCurMisc;
325 	int				iCurDirt;
326 
327 	int				iReturnTo;
328 
329 	// Socket for pinging
330 	SmartPointer<NetworkSocket>	tSocket[3];
331 
332 	CHttp			CheckForNewDevelopmentVersion_http; // I don't want to mess up with static data deallocation, so just putting this here
333 
334 };
335 
336 
337 // Net menu types
338 enum {
339 	net_main=0,
340 	net_internet,
341 	net_lan,
342 	net_host,
343 	net_favourites,
344 	net_news,
345 	net_chat,
346 	net_join
347 };
348 
349 
350 // Server structure
351 class server_t { public:
server_t()352 	server_t() {
353 		SetNetAddrValid(sAddress, false);
354 		bAllowConnectDuringGame = false;
355 		bBehindNat = false;
356 		lastPingedPort = 0;
357 	}
358 
getBestAddress()359 	NetworkAddr & getBestAddress() {
360 		if( IsNetAddrValid(sAddress6) && nPing6 <= nPing4 )
361 			return sAddress6;
362 		return sAddress;
363 	}
364 
365 	bool	bIgnore;
366 	bool	bProcessing;
367     bool    bManual;
368 	int		nPings;
369 	int		nQueries;
370 	bool	bgotPong;
371 	bool	bgotQuery;
372 	bool	bgotQuery6;
373 	AbsTime	fInitTime;
374 	bool	bAddrReady;
375 	AbsTime	fLastPing;
376 	AbsTime	fLastQuery;
377 	AbsTime	fQueryTimes[MAX_QUERIES+1];
378 
379 	// Server address
380 	std::string	szAddress; // IPv4 or IPv6, depending on ping
381 	NetworkAddr	sAddress; // Does not include port
382 	NetworkAddr	sAddress6; // Includes port, there is no NAT for IPv6
383 
384 	// Server details
385 	std::string	szName;
386 	int		nState;
387 	int		nNumPlayers;
388 	int		nMaxPlayers;
389 	int		nPing;
390 	int		nPing4;
391 	int		nPing6;
392 	bool	bAllowConnectDuringGame;
393 	Version tVersion;
394 
395 	// First int is port, second is UDP masterserver idx
396 	// If server responds to ping the port which responded moved to the top of the list
397 	std::vector< std::pair<int, int> > ports;
398 	int		lastPingedPort;
399 	bool	bBehindNat;	// Accessible only from UDP masterserver
400 };
401 
402 
403 // Menu globals
404 extern	menu_t		*tMenu;
405 extern	bool		*bGame;
406 extern	int			iNetMode;
407 extern	int			iJoinMenu;
408 extern	int			iHostType;
409 extern	int			iSkipStart;
410 extern  bool		bHost_Update;
411 extern	bool		bJoin_Update;
412 extern  CWidgetList	LayoutWidgets[LAYOUT_COUNT];
413 
414 extern	bool		bGotDetails;
415 extern	bool		bOldLxBug;
416 extern	int			nTries;
417 extern	AbsTime		fStart;
418 extern bool		bShowFloatingOptions;
419 
420 // AbsTime to wait before pinging/querying the server again (in milliseconds)
421 #define	PingWait  1000
422 #define	QueryWait  1000
423 
424 
425 // Routines
426 bool	Menu_Initialize(bool *game);
427 void	Menu_LoadFrontendInfo();
428 void	Menu_Shutdown();
429 void	Menu_Start();
430 void	Menu_RedrawMouse(bool total);
431 void	Menu_Loop();
432 void    Menu_SetSkipStart(int s);
433 void	Menu_DrawSubTitle(SDL_Surface * bmpDest, int id);
434 void    Menu_DrawSubTitleAdv(SDL_Surface * bmpDest, int id, int y);
435 void	Menu_DrawBox(SDL_Surface * bmpDest, int x, int y, int x2, int y2);
436 void	Menu_DrawBoxAdv(SDL_Surface * bmpDest, int x, int y, int x2, int y2, int border, Color LightColour, Color DarkColour, Color BgColour, uchar type);
437 void    Menu_DrawBoxInset(SDL_Surface * bmpDest, int x, int y, int x2, int y2);
438 void    Menu_DrawWinButton(SDL_Surface * bmpDest, int x, int y, int w, int h, bool down);
439 bool	Menu_LoadWormGfx(profile_t *ply);
440 MessageBoxReturnType Menu_MessageBox(const std::string& sTitle, const std::string& sText, MessageBoxType type = LMB_OK);
441 void	Menu_AddDefaultWidgets();
442 void	Menu_FillLevelList(CCombobox *cmb, int random);
443 void    Menu_redrawBufferRect(int x, int y, int w, int h);
444 void	Menu_DisableNetEvents();
445 void	Menu_EnableNetEvents();
446 bool	Menu_IsKeyboardNavigationUsed();
447 void	Menu_WarpMouse(int x, int y);
448 void	Menu_ProcessMouseMotion(int x, int y);
449 
450 // Server list
451 void		Menu_SvrList_Clear();
452 void        Menu_SvrList_ClearAuto();
453 void		Menu_SvrList_Shutdown();
454 void		Menu_SvrList_PingLAN();
455 server_t	*Menu_SvrList_AddServer(const std::string& address, bool bManual, const std::string & name = "Untitled", int udpMasterserverIndex = -1, const std::string& v4address = "");
456 server_t    *Menu_SvrList_FindServerStr(const std::string& szAddress, const std::string & name = "");
457 void        Menu_SvrList_RemoveServer(const std::string& szAddress);
458 bool		Menu_SvrList_Process();
459 bool		Menu_SvrList_ParsePacket(CBytestream *bs, const SmartPointer<NetworkSocket>& sock);
460 server_t	*Menu_SvrList_FindServer(const NetworkAddr& addr, const std::string & name = "");
461 void		Menu_SvrList_PingServer(server_t *svr);
462 bool		Menu_SvrList_RemoveDuplicateNATServers(server_t *defaultServer);
463 bool		Menu_SvrList_RemoveDuplicateDownServers(server_t *defaultServer);
464 void		Menu_SvrList_WantsJoin(const std::string& Nick, server_t *svr);
465 void		Menu_SvrList_QueryServer(server_t *svr);
466 void		Menu_SvrList_GetServerInfo(server_t *svr);
467 void		Menu_SvrList_ParseQuery(server_t *svr, CBytestream *bs, bool ipv6);
468 void		Menu_SvrList_ParseUdpServerlist(CBytestream *bs, int UdpMasterserverIndex, bool v4AddressIncluded = false);
469 void		Menu_SvrList_RefreshList();
470 void        Menu_SvrList_RefreshServer(server_t *s, bool updategui = true);
471 void		Menu_SvrList_UpdateList();
472 void		Menu_SvrList_UpdateUDPList();
473 void		Menu_SvrList_FillList(CListview *lv);
474 void        Menu_SvrList_SaveList(const std::string& szFilename);
475 void        Menu_SvrList_LoadList(const std::string& szFilename);
476 void        Menu_SvrList_DrawInfo(const std::string& szAddress, int w, int h);
477 void		Menu_SvrList_AddFavourite(const std::string& szName, const std::string& szAddress);
478 // Returns non-empty UDP masterserver address if server is registered on this UDP masterserver and won't respond on pinging
479 std::string	Menu_SvrList_GetUdpMasterserverForServer(const std::string& szAddress);
480 
481 // Main menu
482 void	Menu_MainInitialize();
483 void	Menu_MainShutdown();
484 void	Menu_MainFrame();
485 void	Menu_MainDrawTitle(int x, int y, int id, int selected);
486 
487 
488 // Local menu
489 void	Menu_LocalInitialize();
490 void	Menu_LocalFrame();
491 void	Menu_LocalAddProfiles();
492 void	Menu_LocalStartGame();
493 bool	Menu_LocalCheckPlaying(int index);
494 void	Menu_Local_FillModList( CCombobox *cb );
495 void	Menu_LocalShowMinimap(bool bReload);
496 void	Menu_LocalAddPlaying(int index = -1);
497 void	Menu_LocalRemovePlaying(int index = -1);
498 void	Menu_LocalShutdown();
499 
500 
501 // Player menu
502 void	Menu_PlayerInitialize();
503 void	Menu_PlayerFrame();
504 void    Menu_Player_NewPlayerInit();
505 void    Menu_Player_ViewPlayerInit();
506 void	Menu_Player_NewPlayer(int mouse);
507 void	Menu_Player_ViewPlayers(int mouse);
508 void	Menu_Player_AddPlayer(const std::string& sName, Uint8 r, Uint8 g, Uint8 b);
509 void    Menu_Player_DrawWormImage(SDL_Surface * bmpDest, int Frame, int dx, int dy, int ColR, int ColG, int ColB);
510 void	Menu_Player_DeletePlayer(int index);
511 void    Menu_Player_FillSkinCombo(CCombobox *cb);
512 void	Menu_PlayerShutdown();
513 
514 // Map editor
515 bool	Menu_MapEdInitialize();
516 void	Menu_MapEdFrame(SDL_Surface * bmpDest, int process);
517 void	Menu_MapEd_New();
518 void	Menu_MapEd_LoadSave(int save);
519 bool	Menu_MapEd_OkSave(const std::string& szFilename);
520 void	Menu_MapEdShutdown();
521 
522 // Game Settings
523 void	Menu_GameSettings();
524 void	Menu_GameSettingsShutdown();
525 bool	Menu_GameSettings_Frame();
526 void	Menu_GameSettings_GrabInfo();
527 void    Menu_GameSettings_Default();
528 
529 
530 // Weapons Restrictions
531 void    Menu_WeaponsRestrictions(const std::string& szMod);
532 bool    Menu_WeaponsRestrictions_Frame();
533 void	Menu_WeaponsRestrictionsShutdown();
534 
535 // Load/save dialog
536 void	Menu_WeaponPresets(bool save, CWpnRest *gamescript);
537 bool	Menu_WeaponPresetsOkSave(const std::string& szFilename);
538 void	Menu_WeaponPresetsShutdown();
539 
540 // Ban List
541 void	Menu_BanList();
542 bool	Menu_BanList_Frame();
543 void	Menu_BanListShutdown();
544 
545 // Server settings
546 void	Menu_ServerSettings();
547 bool	Menu_ServerSettings_Frame();
548 void	Menu_ServerSettingsShutdown();
549 
550 
551 // Options
552 bool	Menu_OptionsInitialize(bool floating = false);
553 void	Menu_OptionsShutdown();
554 void	Menu_OptionsFrame();
555 void	Menu_OptionsWaitInput(int ply, const std::string& name, CInputbox *b);
556 
557 // Floating Options
558 bool	Menu_FloatingOptionsInitialize();
559 void	Menu_FloatingOptionsShutdown();
560 void	Menu_FloatingOptionsFrame();
561 void	Menu_FloatingOptionsWaitInput(int ply, const std::string& name, CInputbox *b);
562 
563 // Speed test
564 void	Menu_SpeedTest_Initialize();
565 bool	Menu_SpeedTest_Frame();
566 void	Menu_SpeedTest_Shutdown();
567 float	Menu_SpeedTest_GetSpeed();
568 
569 
570 // Main net
571 bool	Menu_NetInitialize(bool withSubMenu = true);
572 void	Menu_Net_GotoHostLobby();
573 void	Menu_NetFrame();
574 void	Menu_NetShutdown();
575 
576 
577 // Net::Main menu
578 bool	Menu_Net_MainInitialize();
579 void	Menu_Net_MainFrame(int mouse);
580 void	Menu_Net_MainShutdown();
581 void	Menu_Net_AddTabBarButtons(CGuiLayout * layout);
582 bool	Menu_Net_ProcessTabBarButtons(gui_event_t *ev);
583 
584 
585 // Net::Host menu
586 bool	Menu_Net_HostInitialize();
587 void	Menu_Net_HostShutdown();
588 void	Menu_Net_HostFrame(int mouse);
589 void	Menu_Net_HostPlyFrame(int mouse);
590 void	Menu_Net_HostPlyShutdown();
591 
592 bool	Menu_Net_HostLobbyInitialize();
593 void    Menu_Net_HostLobbyDraw();
594 void    Menu_Net_HostLobbyCreateGui();
595 void	Menu_Net_HostGotoLobby();
596 void	Menu_Net_HostLobbyFrame(int mouse);
597 void	Menu_Net_HostLobbyShutdown();
598 std::string	Menu_Net_HostLobbyGetText();
599 void Menu_Net_HostLobbySetText(const std::string& str);
600 void	Menu_HostDrawLobby(SDL_Surface * bmpDest);
601 void	Menu_HostShowMinimap();
602 void	Menu_Net_HostDeregister();
603 bool	Menu_Net_HostStartGame();
604 void	Menu_Net_HostLobbySetMod(const std::string& moddir);
605 void	Menu_Net_HostLobbySetLevel(const std::string& filename);
606 
607 void Menu_HostActionsPopupMenuInitialize( CGuiLayout & layout, int id_PopupMenu, int id_PopupPlayerInfo, int wormid );
608 void Menu_HostActionsPopupMenuClick(CGuiLayout & layout, int id_PopupMenu, int id_PopupPlayerInfo, int wormid, int menuItem);
609 void Menu_HostActionsPopupPlayerInfoClick(CGuiLayout & layout, int id_PopupMenu, int id_PopupPlayerInfo, int wormid, int menuItem);
610 
611 
612 // Net::LAN menu
613 bool	Menu_Net_LANInitialize();
614 void	Menu_Net_LANShutdown();
615 void	Menu_Net_LANFrame(int mouse);
616 void	Menu_Net_LANSendPing();
617 void	Menu_Net_LANJoinServer(const std::string& sAddress, const std::string& sName);
618 void    Menu_Net_LanShowServer(const std::string& szAddress);
619 
620 
621 // Net::Joining menu
622 bool	Menu_Net_JoinInitialize(const std::string& sAddress);
623 void	Menu_Net_JoinShutdown();
624 void	Menu_Net_JoinFrame(int mouse);
625 
626 // Net::Favourites menu
627 bool	Menu_Net_FavouritesInitialize();
628 void	Menu_Net_FavouritesShutdown();
629 void	Menu_Net_FavouritesFrame(int mouse);
630 void	Menu_Net_FavouritesJoinServer(const std::string& sAddress, const std::string& sName);
631 void	Menu_Net_FavouritesShowServer(const std::string& szAddress);
632 void	Menu_Net_RenameServer(std::string& szName);
633 void	Menu_Net_FavouritesAddServer();
634 
635 // Net::News menu
636 bool	Menu_Net_NewsInitialize();
637 void	Menu_Net_NewsShutdown();
638 void	Menu_Net_NewsFrame(int mouse);
639 
640 // Net::Chat menu
641 bool	Menu_Net_ChatInitialize();
642 void	Menu_Net_ChatShutdown();
643 void	Menu_Net_ChatFrame(int mouse);
644 
645 bool	Menu_Net_JoinConnectionInitialize(const std::string& sAddress);
646 void	Menu_Net_JoinConnectionFrame(int mouse);
647 void	Menu_Net_JoinConnectionShutdown();
648 
649 bool	Menu_Net_JoinLobbyInitialize();
650 void    Menu_Net_JoinDrawLobby();
651 void    Menu_Net_JoinLobbyCreateGui();
652 void	Menu_Net_JoinGotoLobby();
653 std::string	Menu_Net_JoinLobbyGetText();
654 void	Menu_Net_JoinLobbySetText(const std::string& str);
655 void	Menu_Net_JoinLobbyFrame(int mouse);
656 void	Menu_Net_JoinLobbyShutdown();
657 
658 
659 // Net::Internet menu
660 bool	Menu_Net_NETInitialize();
661 void	Menu_Net_NETShutdown();
662 void	Menu_Net_NETFrame(int mouse);
663 void	Menu_Net_NETJoinServer(const std::string& sAddress, const std::string& sName);
664 void	Menu_Net_NETAddServer();
665 void	Menu_Net_NETUpdateList();
666 void	Menu_Net_NETParseList(class CHttp& http);
667 void    Menu_Net_NETShowServer(const std::string& szAddress);
668 
669 void	Menu_Current_Shutdown();
670 
671 } // namespace DeprecatedGUI
672 
673 #endif  //  __MENU_H__DEPRECATED_GUI__
674