dolphin/Source/Core/DolphinWX/WiimoteConfigDiag.h

78 lines
2.0 KiB
C
Raw Normal View History

#pragma once
#include <map>
2014-02-22 22:36:30 +00:00
#include <wx/dialog.h>
#include <wx/event.h>
#include <wx/windowid.h>
2014-02-22 22:36:30 +00:00
#include "Common/SysConf.h"
#include "Core/ConfigManager.h"
#include "Core/HW/Wiimote.h"
2014-02-22 22:36:30 +00:00
class InputConfig;
2014-02-22 22:36:30 +00:00
class wxButton;
class wxStaticBoxSizer;
2014-02-22 22:36:30 +00:00
class wxWindow;
class WiimoteConfigDiag : public wxDialog
{
public:
WiimoteConfigDiag(wxWindow* const parent, InputConfig& config);
void RefreshRealWiimotes(wxCommandEvent& event);
void SelectSource(wxCommandEvent& event);
void RevertSource();
void ConfigEmulatedWiimote(wxCommandEvent& event);
void Save(wxCommandEvent& event);
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();
}
2013-02-11 23:58:56 +00:00
void OnContinuousScanning(wxCommandEvent& event)
{
SConfig::GetInstance().m_WiimoteContinuousScanning = event.IsChecked();
WiimoteReal::Initialize();
event.Skip();
}
void OnEnableSpeaker(wxCommandEvent& event)
{
SConfig::GetInstance().m_WiimoteEnableSpeaker = event.IsChecked();
event.Skip();
}
private:
wxStaticBoxSizer* CreateGamecubeSizer();
wxStaticBoxSizer* CreateWiimoteConfigSizer();
wxStaticBoxSizer* CreateBalanceBoardSizer();
wxStaticBoxSizer* CreateRealWiimoteSizer();
wxStaticBoxSizer* CreateGeneralWiimoteSettingsSizer();
void Cancel(wxCommandEvent& event);
InputConfig& m_config;
std::map<wxWindowID, unsigned int> m_wiimote_index_from_ctrl_id;
unsigned int m_orig_wiimote_sources[MAX_BBMOTES];
wxButton* wiimote_configure_bt[MAX_WIIMOTES];
std::map<wxWindowID, unsigned int> m_wiimote_index_from_conf_bt_id;
};