2009-07-28 21:32:10 +00:00
|
|
|
// Copyright (C) 2003 Dolphin Project.
|
2009-07-05 04:29:00 +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 __BASICCONFIGDIALOG_h__
|
|
|
|
#define __BASICCONFIGDIALOG_h__
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <wx/wx.h>
|
|
|
|
#include <wx/textctrl.h>
|
|
|
|
#include <wx/button.h>
|
|
|
|
#include <wx/stattext.h>
|
|
|
|
#include <wx/combobox.h>
|
|
|
|
#include <wx/checkbox.h>
|
|
|
|
#include <wx/notebook.h>
|
|
|
|
#include <wx/panel.h>
|
|
|
|
#include <wx/gbsizer.h>
|
2009-12-27 19:31:02 +00:00
|
|
|
#include "wiimote_hid.h"
|
2009-07-05 04:29:00 +00:00
|
|
|
|
|
|
|
class WiimoteBasicConfigDialog : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
WiimoteBasicConfigDialog(wxWindow *parent,
|
|
|
|
wxWindowID id = 1,
|
|
|
|
const wxString &title = wxT("Wii Remote Plugin Configuration"),
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_DIALOG_STYLE | wxWANTS_CHARS);
|
2009-07-06 00:27:32 +00:00
|
|
|
virtual ~WiimoteBasicConfigDialog(){;}
|
2009-07-05 04:29:00 +00:00
|
|
|
|
|
|
|
// General open, close and event functions
|
2009-12-27 19:31:02 +00:00
|
|
|
void UpdateGUI();
|
2009-07-05 04:29:00 +00:00
|
|
|
void ButtonClick(wxCommandEvent& event);
|
|
|
|
void ShutDown(wxTimerEvent& WXUNUSED(event));
|
|
|
|
void UpdateOnce(wxTimerEvent& event);
|
|
|
|
|
|
|
|
// Timers
|
|
|
|
wxTimer *m_TimeoutOnce,
|
|
|
|
*m_ShutDownTimer;
|
2009-12-11 13:57:25 +00:00
|
|
|
|
2009-07-05 04:29:00 +00:00
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE();
|
|
|
|
|
2009-12-11 13:57:25 +00:00
|
|
|
bool ControlsCreated, m_bEnableUseRealWiimote;
|
2009-12-27 19:31:02 +00:00
|
|
|
int m_Page;
|
2009-07-05 04:29:00 +00:00
|
|
|
|
|
|
|
wxNotebook *m_Notebook;
|
2009-12-27 19:31:02 +00:00
|
|
|
wxPanel *m_Controller[MAX_WIIMOTES];
|
|
|
|
|
2009-12-14 02:23:14 +00:00
|
|
|
wxButton *m_OK,
|
|
|
|
*m_Cancel,
|
2009-07-05 04:29:00 +00:00
|
|
|
*m_ButtonMapping,
|
2010-01-01 16:50:11 +00:00
|
|
|
*m_Recording,
|
2010-01-05 17:38:37 +00:00
|
|
|
*m_ButtonPairUp,
|
2010-01-01 16:50:11 +00:00
|
|
|
*m_RefreshRealWiiMote[MAX_WIIMOTES];
|
2009-07-05 04:29:00 +00:00
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
wxChoice *m_InputSource[MAX_WIIMOTES],
|
|
|
|
*m_Extension[MAX_WIIMOTES];
|
2009-07-05 04:29:00 +00:00
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
wxSlider *m_SliderWidth[MAX_WIIMOTES],
|
|
|
|
*m_SliderHeight[MAX_WIIMOTES],
|
|
|
|
*m_SliderLeft[MAX_WIIMOTES],
|
|
|
|
*m_SliderTop[MAX_WIIMOTES];
|
2009-07-05 04:29:00 +00:00
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
wxCheckBox *m_ConnectRealWiimote[MAX_WIIMOTES],
|
|
|
|
*m_SidewaysWiimote[MAX_WIIMOTES],
|
|
|
|
*m_UprightWiimote[MAX_WIIMOTES],
|
|
|
|
*m_WiiMotionPlusConnected[MAX_WIIMOTES],
|
|
|
|
*m_CheckAR43[MAX_WIIMOTES],
|
|
|
|
*m_CheckAR169[MAX_WIIMOTES],
|
|
|
|
*m_Crop[MAX_WIIMOTES];
|
2009-07-05 04:29:00 +00:00
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
wxStaticText *m_TextScreenWidth[MAX_WIIMOTES],
|
|
|
|
*m_TextScreenHeight[MAX_WIIMOTES],
|
|
|
|
*m_TextScreenLeft[MAX_WIIMOTES],
|
|
|
|
*m_TextScreenTop[MAX_WIIMOTES],
|
2010-01-01 16:50:11 +00:00
|
|
|
*m_TextAR[MAX_WIIMOTES],
|
|
|
|
*m_FoundWiimote[MAX_WIIMOTES];
|
2009-12-11 13:57:25 +00:00
|
|
|
|
|
|
|
wxBoxSizer *m_MainSizer,
|
2009-12-27 19:31:02 +00:00
|
|
|
*m_SizeBasicGeneral[MAX_WIIMOTES],
|
|
|
|
*m_SizeBasicGeneralLeft[MAX_WIIMOTES],
|
|
|
|
*m_SizeBasicGeneralRight[MAX_WIIMOTES],
|
|
|
|
*m_SizerIRPointerWidth[MAX_WIIMOTES],
|
|
|
|
*m_SizerIRPointerHeight[MAX_WIIMOTES],
|
|
|
|
*m_SizerIRPointerScreen[MAX_WIIMOTES];
|
|
|
|
|
|
|
|
wxStaticBoxSizer *m_SizeBasic[MAX_WIIMOTES],
|
|
|
|
*m_SizeEmu[MAX_WIIMOTES],
|
|
|
|
*m_SizeReal[MAX_WIIMOTES],
|
|
|
|
*m_SizeExtensions[MAX_WIIMOTES],
|
|
|
|
*m_SizerIRPointer[MAX_WIIMOTES];
|
2009-07-05 04:29:00 +00:00
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
2009-12-14 02:23:14 +00:00
|
|
|
ID_OK = 1000,
|
|
|
|
ID_CANCEL,
|
2009-07-05 04:29:00 +00:00
|
|
|
ID_BUTTONMAPPING,
|
|
|
|
ID_BUTTONRECORDING,
|
|
|
|
IDTM_SHUTDOWN,
|
|
|
|
IDTM_UPDATE,
|
|
|
|
IDTM_UPDATE_ONCE,
|
|
|
|
|
|
|
|
ID_NOTEBOOK,
|
|
|
|
ID_CONTROLLERPAGE1,
|
|
|
|
ID_CONTROLLERPAGE2,
|
|
|
|
ID_CONTROLLERPAGE3,
|
|
|
|
ID_CONTROLLERPAGE4,
|
|
|
|
|
|
|
|
// Emulated Wiimote
|
2009-12-27 19:31:02 +00:00
|
|
|
IDC_INPUT_SOURCE,
|
2009-12-11 13:57:25 +00:00
|
|
|
IDC_SIDEWAYSWIIMOTE,
|
|
|
|
IDC_UPRIGHTWIIMOTE,
|
|
|
|
IDC_MOTIONPLUSCONNECTED,
|
|
|
|
IDC_EXTCONNECTED,
|
|
|
|
|
|
|
|
// Real
|
|
|
|
IDC_CONNECT_REAL,
|
2010-01-01 16:50:11 +00:00
|
|
|
ID_FOUND_REAL,
|
|
|
|
ID_REFRESH_REAL,
|
2009-12-11 13:57:25 +00:00
|
|
|
|
2009-07-05 04:29:00 +00:00
|
|
|
IDS_WIDTH,
|
|
|
|
IDS_HEIGHT,
|
|
|
|
IDS_LEFT,
|
|
|
|
IDS_TOP,
|
2010-01-05 17:38:37 +00:00
|
|
|
|
|
|
|
ID_BUTTONPAIRUP,
|
2009-07-05 04:29:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void CreateGUIControls();
|
2009-12-27 19:31:02 +00:00
|
|
|
void OnClose(wxCloseEvent& event);
|
|
|
|
void NotebookPageChanged(wxNotebookEvent& event);
|
2009-07-05 04:29:00 +00:00
|
|
|
void GeneralSettingsChanged(wxCommandEvent& event);
|
|
|
|
void IRCursorChanged(wxScrollEvent& event);
|
|
|
|
|
|
|
|
void DoConnectReal(); // Real
|
2010-01-01 16:50:11 +00:00
|
|
|
void DoRefreshReal();
|
2009-07-05 04:29:00 +00:00
|
|
|
void DoUseReal();
|
|
|
|
|
|
|
|
void DoExtensionConnectedDisconnected(int Extension = -1); // Emulated
|
|
|
|
};
|
|
|
|
|
|
|
|
extern WiimoteBasicConfigDialog *m_BasicConfigFrame;
|
|
|
|
#endif
|