Re-add saving position of netplay window.

This commit is contained in:
Shawn Hoffman
2016-10-03 15:57:32 -07:00
parent 41e7c43d0d
commit 2b0f7d2669
6 changed files with 44 additions and 14 deletions

View File

@ -7,16 +7,19 @@
#include "Common/IniFile.h"
class CGameListCtrl;
class wxRect;
class wxWindow;
class NetPlayLaunchConfig
{
public:
static std::string GetTraversalHostFromIniConfig(IniFile::Section& netplay_section);
static u16 GetTraversalPortFromIniConfig(IniFile::Section& netplay_section);
static std::string GetTraversalHostFromIniConfig(const IniFile::Section& netplay_section);
static u16 GetTraversalPortFromIniConfig(const IniFile::Section& netplay_section);
void SetDialogInfo(const IniFile::Section& section, wxWindow* parent);
static const std::string DEFAULT_TRAVERSAL_HOST;
static const u16 DEFAULT_TRAVERSAL_PORT;
static constexpr u16 DEFAULT_TRAVERSAL_PORT = 6262;
const wxRect window_defaults{wxDefaultCoord, wxDefaultCoord, 768, 768 - 128};
std::string player_name;
const CGameListCtrl* game_list_ctrl;
@ -24,6 +27,7 @@ public:
bool use_traversal;
std::string traversal_host;
u16 traversal_port;
wxRect window_pos{window_defaults};
};
class NetPlayHostConfig : public NetPlayLaunchConfig
@ -31,7 +35,7 @@ class NetPlayHostConfig : public NetPlayLaunchConfig
public:
void FromIniConfig(IniFile::Section& netplay_section);
static const u16 DEFAULT_LISTEN_PORT;
static constexpr u16 DEFAULT_LISTEN_PORT = 2626;
std::string game_name;
u16 listen_port = 0;