2010-07-03 08:04:10 +00:00
|
|
|
|
|
|
|
#ifndef WIIMOTE_CONFIG_DIAG_H
|
|
|
|
#define WIIMOTE_CONFIG_DIAG_H
|
|
|
|
|
|
|
|
#include <wx/wx.h>
|
|
|
|
#include <wx/listbox.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/spinctrl.h>
|
|
|
|
|
2010-10-12 19:42:29 +00:00
|
|
|
#include "InputConfigDiag.h"
|
2011-06-02 19:32:34 +00:00
|
|
|
#include "ConfigManager.h"
|
2011-08-06 14:38:23 +00:00
|
|
|
#include <HW/Wiimote.h>
|
2010-07-03 08:04:10 +00:00
|
|
|
|
2011-08-06 14:38:23 +00:00
|
|
|
#include <map>
|
|
|
|
|
|
|
|
class WiimoteConfigDiag : public wxDialog
|
2010-07-03 08:04:10 +00:00
|
|
|
{
|
|
|
|
public:
|
2011-08-06 14:38:23 +00:00
|
|
|
WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin);
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
void PairUpRealWiimotes(wxCommandEvent& event);
|
|
|
|
#endif
|
|
|
|
void RefreshRealWiimotes(wxCommandEvent& event);
|
|
|
|
|
2010-07-03 08:04:10 +00:00
|
|
|
|
|
|
|
void SelectSource(wxCommandEvent& event);
|
2011-02-23 03:06:16 +00:00
|
|
|
void UpdateWiimoteStatus();
|
|
|
|
void RevertSource();
|
2010-07-03 08:04:10 +00:00
|
|
|
|
2010-09-18 16:43:43 +00:00
|
|
|
|
2011-08-06 14:38:23 +00:00
|
|
|
void ConfigEmulatedWiimote(wxCommandEvent& event);
|
|
|
|
void Save(wxCommandEvent& event);
|
|
|
|
void UpdateGUI();
|
2011-06-02 19:32:34 +00:00
|
|
|
|
|
|
|
void OnSensorBarPos(wxCommandEvent& event)
|
|
|
|
{
|
|
|
|
SConfig::GetInstance().m_SYSCONF->SetData("BT.BAR", event.GetInt());
|
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
void OnSensorBarSensitivity(wxCommandEvent& event)
|
|
|
|
{
|
|
|
|
SConfig::GetInstance().m_SYSCONF->SetData("BT.SENS", event.GetInt());
|
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
void OnSpeakerVolume(wxCommandEvent& event)
|
|
|
|
{
|
|
|
|
SConfig::GetInstance().m_SYSCONF->SetData("BT.SPKV", event.GetInt());
|
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
void OnMotor(wxCommandEvent& event)
|
|
|
|
{
|
|
|
|
SConfig::GetInstance().m_SYSCONF->SetData("BT.MOT", event.GetInt());
|
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
void OnReconnectOnLoad(wxCommandEvent& event)
|
|
|
|
{
|
2012-12-23 06:53:15 +00:00
|
|
|
SConfig::GetInstance().m_WiimoteReconnectOnLoad = event.IsChecked();
|
2011-06-02 19:32:34 +00:00
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
|
2010-07-03 08:04:10 +00:00
|
|
|
private:
|
2011-03-15 14:37:04 +00:00
|
|
|
void Cancel(wxCommandEvent& event);
|
2010-07-03 08:04:10 +00:00
|
|
|
|
2011-02-23 03:06:16 +00:00
|
|
|
InputPlugin& m_plugin;
|
2010-07-03 08:04:10 +00:00
|
|
|
wxNotebook* m_pad_notebook;
|
2011-08-06 14:38:23 +00:00
|
|
|
|
|
|
|
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;
|
2010-07-03 08:04:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-07-22 07:55:35 +00:00
|
|
|
#endif
|