2015-04-10 23:24:45 -06:00
|
|
|
// Copyright 2015 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2015-04-10 23:24:45 -06:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2015-04-30 19:11:28 -06:00
|
|
|
#include <algorithm>
|
2015-04-10 23:24:45 -06:00
|
|
|
#include <string>
|
|
|
|
#include <wx/frame.h>
|
|
|
|
|
|
|
|
class CGameListCtrl;
|
|
|
|
class wxCheckBox;
|
|
|
|
class wxChoice;
|
|
|
|
class wxListBox;
|
2015-09-20 05:08:37 -06:00
|
|
|
class wxSpinCtrl;
|
2015-04-10 23:24:45 -06:00
|
|
|
class wxStaticText;
|
|
|
|
class wxTextCtrl;
|
|
|
|
|
|
|
|
class NetPlaySetupFrame final : public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
2016-06-24 02:43:46 -06:00
|
|
|
NetPlaySetupFrame(wxWindow* const parent, const CGameListCtrl* const game_list);
|
|
|
|
~NetPlaySetupFrame();
|
2015-04-10 23:24:45 -06:00
|
|
|
|
|
|
|
private:
|
2016-02-02 08:35:27 -07:00
|
|
|
static constexpr int CONNECT_TAB = 0;
|
|
|
|
static constexpr int HOST_TAB = 1;
|
|
|
|
|
|
|
|
static constexpr int DIRECT_CHOICE = 0;
|
|
|
|
static constexpr int TRAVERSAL_CHOICE = 1;
|
|
|
|
|
2016-10-03 16:57:32 -06:00
|
|
|
void GetWindowRect(const IniFile::Section& section, wxRect* rect) const;
|
2016-06-24 02:43:46 -06:00
|
|
|
void OnJoin(wxCommandEvent& event);
|
|
|
|
void OnHost(wxCommandEvent& event);
|
2016-02-02 08:35:27 -07:00
|
|
|
void DoJoin();
|
|
|
|
void DoHost();
|
2016-06-24 02:43:46 -06:00
|
|
|
void OnQuit(wxCommandEvent& event);
|
2016-02-02 08:35:27 -07:00
|
|
|
void OnDirectTraversalChoice(wxCommandEvent& event);
|
2016-06-24 02:43:46 -06:00
|
|
|
void OnResetTraversal(wxCommandEvent& event);
|
|
|
|
void OnTraversalListenPortChanged(wxCommandEvent& event);
|
2016-02-02 08:35:27 -07:00
|
|
|
void OnKeyDown(wxKeyEvent& event);
|
2016-07-12 12:31:35 -06:00
|
|
|
void OnTabChanged(wxCommandEvent& event);
|
|
|
|
void OnAfterTabChange(wxIdleEvent& event);
|
2016-02-02 08:35:27 -07:00
|
|
|
void DispatchFocus();
|
2016-06-24 02:43:46 -06:00
|
|
|
|
|
|
|
wxStaticText* m_ip_lbl;
|
|
|
|
wxStaticText* m_client_port_lbl;
|
|
|
|
wxTextCtrl* m_nickname_text;
|
|
|
|
wxStaticText* m_host_port_lbl;
|
|
|
|
wxTextCtrl* m_host_port_text;
|
|
|
|
wxTextCtrl* m_connect_port_text;
|
|
|
|
wxTextCtrl* m_connect_ip_text;
|
2016-02-02 08:35:27 -07:00
|
|
|
wxTextCtrl* m_connect_hashcode_text;
|
2016-06-24 02:43:46 -06:00
|
|
|
wxChoice* m_direct_traversal;
|
|
|
|
wxStaticText* m_traversal_lbl;
|
|
|
|
wxButton* m_trav_reset_btn;
|
|
|
|
wxCheckBox* m_traversal_listen_port_enabled;
|
|
|
|
wxSpinCtrl* m_traversal_listen_port;
|
2016-02-02 08:35:27 -07:00
|
|
|
wxNotebook* m_notebook;
|
2016-06-24 02:43:46 -06:00
|
|
|
|
|
|
|
wxListBox* m_game_lbox;
|
2015-04-10 23:24:45 -06:00
|
|
|
#ifdef USE_UPNP
|
2016-06-24 02:43:46 -06:00
|
|
|
wxCheckBox* m_upnp_chk;
|
2015-04-10 23:24:45 -06:00
|
|
|
#endif
|
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
const CGameListCtrl* const m_game_list;
|
2015-04-10 23:24:45 -06:00
|
|
|
};
|