2015-05-23 22:32:32 -06:00
|
|
|
// Copyright 2010 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2010-07-03 02:04:10 -06:00
|
|
|
|
2014-11-22 13:29:13 -07:00
|
|
|
#include <array>
|
2014-02-17 03:18:15 -07:00
|
|
|
#include <map>
|
2014-02-22 15:36:30 -07:00
|
|
|
#include <wx/dialog.h>
|
2010-07-03 02:04:10 -06:00
|
|
|
|
2014-02-22 15:36:30 -07:00
|
|
|
#include "Common/SysConf.h"
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "Core/ConfigManager.h"
|
|
|
|
#include "Core/HW/Wiimote.h"
|
2015-12-31 09:27:51 -07:00
|
|
|
#include "InputCommon/GCAdapter.h"
|
2014-02-22 15:36:30 -07:00
|
|
|
|
2014-08-30 22:04:15 -06:00
|
|
|
class InputConfig;
|
2014-02-22 15:36:30 -07:00
|
|
|
class wxButton;
|
2014-11-21 09:55:18 -07:00
|
|
|
class wxStaticBoxSizer;
|
2011-08-06 08:38:23 -06:00
|
|
|
|
2014-11-22 14:39:48 -07:00
|
|
|
class ControllerConfigDiag : public wxDialog
|
2010-07-03 02:04:10 -06:00
|
|
|
{
|
|
|
|
public:
|
2016-06-24 02:43:46 -06:00
|
|
|
ControllerConfigDiag(wxWindow* const parent);
|
2011-08-06 08:38:23 -06:00
|
|
|
|
2015-04-27 18:48:04 -06:00
|
|
|
private:
|
2016-06-24 02:43:46 -06: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 OnContinuousScanning(wxCommandEvent& event)
|
|
|
|
{
|
|
|
|
SConfig::GetInstance().m_WiimoteContinuousScanning = event.IsChecked();
|
2016-07-07 07:40:14 -06:00
|
|
|
WiimoteReal::Initialize(Wiimote::InitializeMode::DO_NOT_WAIT_FOR_WIIMOTES);
|
2016-06-24 02:43:46 -06:00
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnEnableSpeaker(wxCommandEvent& event)
|
|
|
|
{
|
|
|
|
SConfig::GetInstance().m_WiimoteEnableSpeaker = event.IsChecked();
|
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
|
|
|
|
wxStaticBoxSizer* CreateGamecubeSizer();
|
|
|
|
wxStaticBoxSizer* CreateWiimoteConfigSizer();
|
|
|
|
wxStaticBoxSizer* CreateBalanceBoardSizer();
|
|
|
|
wxStaticBoxSizer* CreateRealWiimoteSizer();
|
|
|
|
wxStaticBoxSizer* CreateGeneralWiimoteSettingsSizer();
|
|
|
|
|
2016-08-15 18:53:38 -06:00
|
|
|
void OnClose(wxCloseEvent& event);
|
|
|
|
void OnCloseButton(wxCommandEvent& event);
|
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
void OnGameCubePortChanged(wxCommandEvent& event);
|
|
|
|
void OnGameCubeConfigButton(wxCommandEvent& event);
|
|
|
|
|
2016-08-15 18:53:38 -06:00
|
|
|
void OnWiimoteSourceChanged(wxCommandEvent& event);
|
|
|
|
void OnWiimoteConfigButton(wxCommandEvent& event);
|
|
|
|
void OnWiimoteRefreshButton(wxCommandEvent& event);
|
|
|
|
void SaveWiimoteSource();
|
2016-06-24 02:43:46 -06:00
|
|
|
|
2016-08-15 18:53:38 -06:00
|
|
|
std::map<wxWindowID, unsigned int> m_gc_port_from_choice_id;
|
|
|
|
std::map<wxWindowID, unsigned int> m_gc_port_from_config_id;
|
|
|
|
std::array<wxButton*, 4> m_gc_port_configure_button;
|
|
|
|
std::array<wxString, 8> m_gc_pad_type_strs;
|
2016-06-24 02:43:46 -06:00
|
|
|
|
2016-08-15 18:53:38 -06:00
|
|
|
std::map<wxWindowID, unsigned int> m_wiimote_index_from_choice_id;
|
|
|
|
std::map<wxWindowID, unsigned int> m_wiimote_index_from_config_id;
|
|
|
|
std::array<wxButton*, MAX_WIIMOTES> m_wiimote_configure_button;
|
2010-07-03 02:04:10 -06:00
|
|
|
};
|