New Wiimote configuration dialog design.

Uses a single page for configuring ALL wiimotes now.

Due to the use of wxWindow::NewControlId, this might increase our wx version requirements (irrelevant for windows users). Works fine with wx 2.8.10 at least, but the docs aren't more specific about when wxWindow::NewControlId was introduced. If anyone doesn't like this, I'll change it.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7692 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2011-08-06 14:38:23 +00:00
parent c351743986
commit 2a829fe36c
2 changed files with 138 additions and 136 deletions

View File

@ -15,27 +15,29 @@
#include "InputConfigDiag.h"
#include "ConfigManager.h"
#include <HW/Wiimote.h>
class WiimoteConfigPage : public wxNotebookPage
#include <map>
class WiimoteConfigDiag : public wxDialog
{
public:
WiimoteConfigPage(wxWindow* const parent, const int index);
WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin);
#ifdef _WIN32
void PairUpRealWiimotes(wxCommandEvent& event);
#endif
void RefreshRealWiimotes(wxCommandEvent& event);
void SelectSource(wxCommandEvent& event);
void UpdateWiimoteStatus();
void RevertSource();
wxStaticText* connected_wiimotes_txt;
private:
const int m_index;
unsigned int orig_source;
};
class WiimoteGeneralConfigPage : public wxPanel
{
public:
WiimoteGeneralConfigPage(wxWindow* const parent);
void ConfigEmulatedWiimote(wxCommandEvent& event);
void Save(wxCommandEvent& event);
void UpdateGUI();
void OnSensorBarPos(wxCommandEvent& event)
{
@ -63,29 +65,19 @@ public:
event.Skip();
}
private:
};
class WiimoteConfigDiag : public wxDialog
{
public:
WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin);
#ifdef _WIN32
void PairUpRealWiimotes(wxCommandEvent& event);
#endif
void RefreshRealWiimotes(wxCommandEvent& event);
void ConfigEmulatedWiimote(wxCommandEvent& event);
void Save(wxCommandEvent& event);
void UpdateGUI();
private:
void Cancel(wxCommandEvent& event);
InputPlugin& m_plugin;
wxNotebook* m_pad_notebook;
std::vector<WiimoteConfigPage*> m_wiimote_config_pages;
std::map<wxWindowID, unsigned int> m_wiimote_index_from_ctrl_id;
unsigned int m_orig_wiimote_sources[4];
wxButton* wiimote_configure_bt[4];
std::map<wxWindowID, unsigned int> m_wiimote_index_from_conf_bt_id;
wxStaticText* connected_wiimotes_txt;
};