2009-07-28 21:32:10 +00:00
|
|
|
// Copyright (C) 2003 Dolphin Project.
|
2009-07-06 02:10:26 +00:00
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, version 2.0.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official SVN repository and contact information can be found at
|
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
|
|
|
#ifndef _NETWINDOW_H_
|
|
|
|
#define _NETWINDOW_H_
|
|
|
|
|
2010-05-01 19:10:35 +00:00
|
|
|
#include "CommonTypes.h"
|
|
|
|
|
|
|
|
#include <queue>
|
2009-07-06 02:10:26 +00:00
|
|
|
#include <string>
|
2010-05-01 19:10:35 +00:00
|
|
|
|
2009-07-06 02:10:26 +00:00
|
|
|
#include <wx/wx.h>
|
|
|
|
#include <wx/sizer.h>
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
#include <wx/notebook.h>
|
|
|
|
#include <wx/gbsizer.h>
|
|
|
|
#include <wx/listbox.h>
|
2010-05-05 04:31:21 +00:00
|
|
|
#include <wx/spinctrl.h>
|
2010-05-01 19:10:35 +00:00
|
|
|
//#include <wx/thread.h>
|
|
|
|
|
|
|
|
#include "GameListCtrl.h"
|
|
|
|
|
|
|
|
// just leaving these here so i can find something later if i need it
|
|
|
|
//#include "Frame.h"
|
|
|
|
//#include "Globals.h"
|
|
|
|
//#include "BootManager.h"
|
|
|
|
//#include "Common.h"
|
|
|
|
//#include "NetStructs.h"
|
|
|
|
//#include "Core.h"
|
|
|
|
//#include "pluginspecs_pad.h"
|
|
|
|
//#include "HW/SI.h"
|
|
|
|
//#include "HW/SI_Device.h"
|
|
|
|
//#include "HW/SI_DeviceGCController.h"
|
|
|
|
//#include "Timer.h"
|
|
|
|
|
|
|
|
#include "LockingQueue.h"
|
|
|
|
|
2010-05-02 23:01:50 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
NP_GUI_EVT_CHANGE_GAME = 45,
|
|
|
|
NP_GUI_EVT_START_GAME,
|
|
|
|
NP_GUI_EVT_STOP_GAME,
|
|
|
|
};
|
|
|
|
|
2010-05-01 19:10:35 +00:00
|
|
|
class NetPlaySetupDiag : public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
2010-05-02 23:01:50 +00:00
|
|
|
NetPlaySetupDiag(wxWindow* const parent, const CGameListCtrl* const game_list);
|
2009-07-06 02:10:26 +00:00
|
|
|
|
2010-05-01 19:10:35 +00:00
|
|
|
private:
|
|
|
|
void OnJoin(wxCommandEvent& event);
|
|
|
|
void OnHost(wxCommandEvent& event);
|
|
|
|
void OnQuit(wxCommandEvent& event);
|
2009-07-06 02:10:26 +00:00
|
|
|
|
2010-05-01 19:10:35 +00:00
|
|
|
wxTextCtrl *m_nickname_text,
|
|
|
|
*m_host_port_text,
|
|
|
|
*m_connect_port_text,
|
|
|
|
*m_connect_ip_text;
|
2009-07-06 02:10:26 +00:00
|
|
|
|
2010-05-01 19:10:35 +00:00
|
|
|
wxListBox* m_game_lbox;
|
2009-07-06 02:10:26 +00:00
|
|
|
|
2010-05-01 19:10:35 +00:00
|
|
|
const CGameListCtrl* const m_game_list;
|
2009-07-06 02:10:26 +00:00
|
|
|
};
|
|
|
|
|
2010-05-01 19:10:35 +00:00
|
|
|
class NetPlayDiag : public wxFrame
|
2009-07-06 02:10:26 +00:00
|
|
|
{
|
2010-05-01 19:10:35 +00:00
|
|
|
public:
|
2010-05-02 23:01:50 +00:00
|
|
|
NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game_list
|
2010-05-01 19:10:35 +00:00
|
|
|
, const std::string& game, const bool is_hosting = false);
|
|
|
|
~NetPlayDiag();
|
2009-07-06 02:10:26 +00:00
|
|
|
|
2010-05-01 19:10:35 +00:00
|
|
|
LockingQueue<std::string> chat_msgs;
|
|
|
|
//std::string chat_msg;
|
|
|
|
|
|
|
|
void OnStart(wxCommandEvent& event);
|
2010-05-02 23:01:50 +00:00
|
|
|
void OnStop(wxCommandEvent& event);
|
2010-05-01 19:10:35 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
|
|
|
void OnChat(wxCommandEvent& event);
|
|
|
|
void OnQuit(wxCommandEvent& event);
|
2010-05-05 04:31:21 +00:00
|
|
|
void OnPadBuffHelp(wxCommandEvent& event);
|
2010-05-01 19:10:35 +00:00
|
|
|
void OnThread(wxCommandEvent& event);
|
2010-05-02 23:01:50 +00:00
|
|
|
void OnChangeGame(wxCommandEvent& event);
|
2010-05-05 04:31:21 +00:00
|
|
|
void OnAdjustBuffer(wxCommandEvent& event);
|
2010-05-01 19:10:35 +00:00
|
|
|
|
|
|
|
wxListBox* m_player_lbox;
|
|
|
|
wxTextCtrl* m_chat_text;
|
|
|
|
wxTextCtrl* m_chat_msg_text;
|
|
|
|
|
|
|
|
std::string m_selected_game;
|
|
|
|
wxButton* m_game_btn;
|
|
|
|
|
|
|
|
const CGameListCtrl* const m_game_list;
|
|
|
|
//NetPlay* const m_netplay;
|
2009-07-06 02:10:26 +00:00
|
|
|
};
|
|
|
|
|
2010-05-01 19:10:35 +00:00
|
|
|
DECLARE_EVENT_TYPE(wxEVT_THREAD, -1)
|
|
|
|
|
2010-05-02 23:01:50 +00:00
|
|
|
class ChangeGameDiag : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ChangeGameDiag(wxWindow* const parent, const CGameListCtrl* const game_list, wxString& game_name);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void OnPick(wxCommandEvent& event);
|
|
|
|
|
|
|
|
wxListBox* m_game_lbox;
|
|
|
|
wxString& m_game_name;
|
|
|
|
};
|
|
|
|
|
2009-07-06 02:10:26 +00:00
|
|
|
#endif // _NETWINDOW_H_
|
|
|
|
|