Completely redo All configuration dialog

Hotkeys

Make a new class that inherits from InputConfigDialog with a specialised constructor.  The changes are mainly the top portion and it now uses tabs to categorise the hotkeys.

Redo the GCPad configuration dialog

The layout is similar, but it now allows flexibility to change it more easily.

Redo the GC Keyboard configuration dialog

Same layout.

Redo completely the Wiimote configuration dialog

Separated the controls into 2 tabs to make them less imposing overall.

Redo the Nunchuk configuration dialog

Similar layout, except for 2 control group sizers.

Redo the Classic controller configuration dialog

Same layout.

Redo the Guitar input configuration dialog

Stacked 2 sets of group together.

Redo the Turntable configuration dialog

More stacked groups and the window is much less wide.
This commit is contained in:
aldelaro5 2016-11-18 19:54:06 -05:00
parent 03e0cae9b7
commit 32a0dae257
24 changed files with 1000 additions and 5 deletions

View file

@ -42,6 +42,15 @@ set(GUI_SRCS
NetPlay/PadMapDialog.cpp
Input/InputConfigDiag.cpp
Input/InputConfigDiagBitmaps.cpp
Input/HotkeyInputConfigDiag.cpp
Input/GCPadInputConfigDiag.cpp
Input/GCKeyboardInputConfigDiag.cpp
Input/WiimoteInputConfigDiag.cpp
Input/NunchukInputConfigDiag.cpp
Input/ClassicInputConfigDiag.cpp
Input/GuitarInputConfigDiag.cpp
Input/DrumsInputConfigDiag.cpp
Input/TurntableInputConfigDiag.cpp
DolphinSlider.cpp
FifoPlayerDlg.cpp
Frame.cpp

View file

@ -33,7 +33,10 @@
#include "DolphinWX/Config/GCAdapterConfigDiag.h"
#include "DolphinWX/ControllerConfigDiag.h"
#include "DolphinWX/DolphinSlider.h"
#include "DolphinWX/Input/GCKeyboardInputConfigDiag.h"
#include "DolphinWX/Input/GCPadInputConfigDiag.h"
#include "DolphinWX/Input/InputConfigDiag.h"
#include "DolphinWX/Input/WiimoteInputConfigDiag.h"
#include "DolphinWX/WxUtils.h"
#include "InputCommon/GCAdapter.h"
@ -447,7 +450,7 @@ void ControllerConfigDiag::OnGameCubeConfigButton(wxCommandEvent& event)
if (SConfig::GetInstance().m_SIDevice[port_num] == SIDEVICE_GC_KEYBOARD)
{
InputConfigDialog config_diag(
GCKeyboardInputConfigDialog config_diag(
this, *key_plugin,
wxString::Format("GameCube Keyboard Configuration Port %i", port_num + 1), port_num);
config_diag.ShowModal();
@ -462,7 +465,7 @@ void ControllerConfigDiag::OnGameCubeConfigButton(wxCommandEvent& event)
}
else
{
InputConfigDialog config_diag(
GCPadInputConfigDialog config_diag(
this, *pad_plugin,
wxString::Format("GameCube Controller Configuration Port %i", port_num + 1), port_num);
config_diag.ShowModal();
@ -498,9 +501,9 @@ void ControllerConfigDiag::OnWiimoteConfigButton(wxCommandEvent& ev)
HotkeyManagerEmu::Enable(false);
int port_num = m_wiimote_index_from_config_id[ev.GetId()];
const int port_num = m_wiimote_index_from_config_id[ev.GetId()];
InputConfigDialog m_ConfigFrame(
WiimoteInputConfigDialog m_ConfigFrame(
this, *wiimote_plugin,
wxString::Format("Dolphin Emulated Wii Remote Configuration Port %i", port_num + 1),
port_num);

View file

@ -102,6 +102,15 @@
<ClCompile Include="GameListCtrl.cpp" />
<ClCompile Include="Input\InputConfigDiag.cpp" />
<ClCompile Include="Input\InputConfigDiagBitmaps.cpp" />
<ClCompile Include="Input\HotkeyInputConfigDiag.cpp" />
<ClCompile Include="Input\GCPadInputConfigDiag.cpp" />
<ClCompile Include="Input\GCKeyboardInputConfigDiag.cpp" />
<ClCompile Include="Input\WiimoteInputConfigDiag.cpp" />
<ClCompile Include="Input\NunchukInputConfigDiag.cpp" />
<ClCompile Include="Input\ClassicInputConfigDiag.cpp" />
<ClCompile Include="Input\GuitarInputConfigDiag.cpp" />
<ClCompile Include="Input\DrumsInputConfigDiag.cpp" />
<ClCompile Include="Input\TurntableInputConfigDiag.cpp" />
<ClCompile Include="ISOFile.cpp" />
<ClCompile Include="ISOProperties.cpp" />
<ClCompile Include="LogConfigWindow.cpp" />
@ -171,6 +180,15 @@
<ClInclude Include="GameListCtrl.h" />
<ClInclude Include="Globals.h" />
<ClInclude Include="Input\InputConfigDiag.h" />
<ClInclude Include="Input\HotkeyInputConfigDiag.h" />
<ClInclude Include="Input\GCPadInputConfigDiag.h" />
<ClInclude Include="Input\GCKeyboardInputConfigDiag.h" />
<ClInclude Include="Input\WiimoteInputConfigDiag.h" />
<ClInclude Include="Input\NunchukInputConfigDiag.h" />
<ClInclude Include="Input\ClassicInputConfigDiag.h" />
<ClInclude Include="Input\GuitarInputConfigDiag.h" />
<ClInclude Include="Input\DrumsInputConfigDiag.h" />
<ClInclude Include="Input\TurntableInputConfigDiag.h" />
<ClInclude Include="ISOFile.h" />
<ClInclude Include="ISOProperties.h" />
<ClInclude Include="LogConfigWindow.h" />

View file

@ -110,6 +110,33 @@
<ClCompile Include="Input\InputConfigDiagBitmaps.cpp">
<Filter>GUI\InputConfig</Filter>
</ClCompile>
<ClCompile Include="Input\HotkeyInputConfigDiag.cpp">
<Filter>GUI\InputConfig</Filter>
</ClCompile>
<ClCompile Include="Input\GCPadInputConfigDiag.cpp">
<Filter>GUI\InputConfig</Filter>
</ClCompile>
<ClCompile Include="Input\GCKeyboardInputConfigDiag.cpp">
<Filter>GUI\InputConfig</Filter>
</ClCompile>
<ClCompile Include="Input\WiimoteInputConfigDiag.cpp">
<Filter>GUI\InputConfig</Filter>
</ClCompile>
<ClCompile Include="Input\NunchukInputConfigDiag.cpp">
<Filter>GUI\InputConfig</Filter>
</ClCompile>
<ClCompile Include="Input\ClassicInputConfigDiag.cpp">
<Filter>GUI\InputConfig</Filter>
</ClCompile>
<ClCompile Include="Input\GuitarInputConfigDiag.cpp">
<Filter>GUI\InputConfig</Filter>
</ClCompile>
<ClCompile Include="Input\DrumsInputConfigDiag.cpp">
<Filter>GUI\InputConfig</Filter>
</ClCompile>
<ClCompile Include="Input\TurntableInputConfigDiag.cpp">
<Filter>GUI\InputConfig</Filter>
</ClCompile>
<ClCompile Include="Debugger\DebuggerPanel.cpp">
<Filter>GUI\Video</Filter>
</ClCompile>
@ -293,6 +320,33 @@
<ClInclude Include="Input\InputConfigDiag.h">
<Filter>GUI\InputConfig</Filter>
</ClInclude>
<ClInclude Include="Input\HotkeyInputConfigDiag.h">
<Filter>GUI\InputConfig</Filter>
</ClInclude>
<ClInclude Include="Input\GCPadInputConfigDiag.h">
<Filter>GUI\InputConfig</Filter>
</ClInclude>
<ClInclude Include="Input\GCKeyboardInputConfigDiag.h">
<Filter>GUI\InputConfig</Filter>
</ClInclude>
<ClInclude Include="Input\WiimoteInputConfigDiag.h">
<Filter>GUI\InputConfig</Filter>
</ClInclude>
<ClInclude Include="Input\NunchukInputConfigDiag.h">
<Filter>GUI\InputConfig</Filter>
</ClInclude>
<ClInclude Include="Input\ClassicInputConfigDiag.h">
<Filter>GUI\InputConfig</Filter>
</ClInclude>
<ClInclude Include="Input\GuitarInputConfigDiag.h">
<Filter>GUI\InputConfig</Filter>
</ClInclude>
<ClInclude Include="Input\DrumsInputConfigDiag.h">
<Filter>GUI\InputConfig</Filter>
</ClInclude>
<ClInclude Include="Input\TurntableInputConfigDiag.h">
<Filter>GUI\InputConfig</Filter>
</ClInclude>
<ClInclude Include="Debugger\DebuggerPanel.h">
<Filter>GUI\Video</Filter>
</ClInclude>

View file

@ -65,6 +65,7 @@
#include "DolphinWX/GameListCtrl.h"
#include "DolphinWX/Globals.h"
#include "DolphinWX/ISOFile.h"
#include "DolphinWX/Input/HotkeyInputConfigDiag.h"
#include "DolphinWX/Input/InputConfigDiag.h"
#include "DolphinWX/LogWindow.h"
#include "DolphinWX/MainMenuBar.h"
@ -997,7 +998,7 @@ void CFrame::OnConfigHotkey(wxCommandEvent& WXUNUSED(event))
HotkeyManagerEmu::Enable(false);
InputConfigDialog m_ConfigFrame(this, *hotkey_plugin, _("Dolphin Hotkeys"));
HotkeyInputConfigDialog m_ConfigFrame(this, *hotkey_plugin, _("Dolphin Hotkeys"));
m_ConfigFrame.ShowModal();
// Update references in case controllers were refreshed

View file

@ -0,0 +1,50 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "DolphinWX/Input/ClassicInputConfigDiag.h"
#include "Core/HW/Wiimote.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
ClassicInputConfigDialog::ClassicInputConfigDialog(wxWindow* const parent, InputConfig& config,
const wxString& name, const int port_num)
: InputConfigDialog(parent, config, name, port_num)
{
const int space5 = FromDIP(5);
auto* const group_box_buttons = new ControlGroupBox(
Wiimote::GetClassicGroup(port_num, WiimoteEmu::ClassicGroup::Buttons), this, this);
auto* const group_box_dpad = new ControlGroupBox(
Wiimote::GetClassicGroup(port_num, WiimoteEmu::ClassicGroup::DPad), this, this);
auto* const group_box_left_stick = new ControlGroupBox(
Wiimote::GetClassicGroup(port_num, WiimoteEmu::ClassicGroup::LeftStick), this, this);
auto* const group_box_right_stick = new ControlGroupBox(
Wiimote::GetClassicGroup(port_num, WiimoteEmu::ClassicGroup::RightStick), this, this);
auto* const group_box_triggers = new ControlGroupBox(
Wiimote::GetClassicGroup(port_num, WiimoteEmu::ClassicGroup::Triggers), this, this);
auto* const controls_sizer = new wxBoxSizer(wxHORIZONTAL);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_buttons, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_dpad, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_left_stick, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_right_stick, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_triggers, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
auto* const szr_main = new wxBoxSizer(wxVERTICAL);
szr_main->AddSpacer(space5);
szr_main->Add(controls_sizer, 1, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
szr_main->Add(CreateButtonSizer(wxCLOSE | wxNO_DEFAULT), 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
SetSizerAndFit(szr_main);
Center();
UpdateGUI();
}

View file

@ -0,0 +1,14 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "DolphinWX/Input/InputConfigDiag.h"
class ClassicInputConfigDialog final : public InputConfigDialog
{
public:
ClassicInputConfigDialog(wxWindow* parent, InputConfig& config, const wxString& name,
int port_num = 0);
};

View file

@ -0,0 +1,46 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "DolphinWX/Input/DrumsInputConfigDiag.h"
#include "Core/HW/Wiimote.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
DrumsInputConfigDialog::DrumsInputConfigDialog(wxWindow* const parent, InputConfig& config,
const wxString& name, const int port_num)
: InputConfigDialog(parent, config, name, port_num)
{
const int space5 = FromDIP(5);
auto* const group_box_buttons = new ControlGroupBox(
Wiimote::GetDrumsGroup(port_num, WiimoteEmu::DrumsGroup::Buttons), this, this);
auto* const group_box_pads = new ControlGroupBox(
Wiimote::GetDrumsGroup(port_num, WiimoteEmu::DrumsGroup::Pads), this, this);
auto* const buttons_pads_sizer = new wxBoxSizer(wxVERTICAL);
buttons_pads_sizer->Add(group_box_buttons);
buttons_pads_sizer->AddSpacer(space5);
buttons_pads_sizer->Add(group_box_pads);
auto* const group_box_stick = new ControlGroupBox(
Wiimote::GetDrumsGroup(port_num, WiimoteEmu::DrumsGroup::Stick), this, this);
auto* const controls_sizer = new wxBoxSizer(wxHORIZONTAL);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(buttons_pads_sizer, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_stick, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
auto* const szr_main = new wxBoxSizer(wxVERTICAL);
szr_main->AddSpacer(space5);
szr_main->Add(controls_sizer, 1, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
szr_main->Add(CreateButtonSizer(wxCLOSE | wxNO_DEFAULT), 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
SetSizerAndFit(szr_main);
Center();
UpdateGUI();
}

View file

@ -0,0 +1,14 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "DolphinWX/Input/InputConfigDiag.h"
class DrumsInputConfigDialog final : public InputConfigDialog
{
public:
DrumsInputConfigDialog(wxWindow* parent, InputConfig& config, const wxString& name,
int port_num = 0);
};

View file

@ -0,0 +1,83 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "DolphinWX/Input/GCKeyboardInputConfigDiag.h"
#include "Core/HW/GCKeyboard.h"
#include "Core/HW/GCKeyboardEmu.h"
enum class KeyboardGroup;
GCKeyboardInputConfigDialog::GCKeyboardInputConfigDialog(wxWindow* const parent,
InputConfig& config, const wxString& name,
const int port_num)
: InputConfigDialog(parent, config, name, port_num)
{
const int space5 = FromDIP(5);
auto* const device_chooser = CreateDeviceChooserGroupBox();
auto* const reset_sizer = CreaterResetGroupBox(wxHORIZONTAL);
auto* const profile_chooser = CreateProfileChooserGroupBox();
auto* const group_box_keys0x =
new ControlGroupBox(Keyboard::GetGroup(port_num, KeyboardGroup::Kb0x), this, this);
auto* const group_box_keys1x =
new ControlGroupBox(Keyboard::GetGroup(port_num, KeyboardGroup::Kb1x), this, this);
auto* const group_box_keys2x =
new ControlGroupBox(Keyboard::GetGroup(port_num, KeyboardGroup::Kb2x), this, this);
auto* const group_box_keys3x =
new ControlGroupBox(Keyboard::GetGroup(port_num, KeyboardGroup::Kb3x), this, this);
auto* const group_box_keys4x =
new ControlGroupBox(Keyboard::GetGroup(port_num, KeyboardGroup::Kb4x), this, this);
auto* const group_box_keys5x =
new ControlGroupBox(Keyboard::GetGroup(port_num, KeyboardGroup::Kb5x), this, this);
auto* const group_box_options =
new ControlGroupBox(Keyboard::GetGroup(port_num, KeyboardGroup::Options), this, this);
auto* const key5x_options_sizer = new wxBoxSizer(wxVERTICAL);
key5x_options_sizer->Add(group_box_keys5x);
key5x_options_sizer->AddSpacer(space5);
key5x_options_sizer->Add(group_box_options);
auto* const controls_sizer = new wxBoxSizer(wxHORIZONTAL);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_keys0x, 0, wxEXPAND | wxTOP, space5);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_keys1x, 0, wxEXPAND | wxTOP, space5);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_keys2x, 0, wxEXPAND | wxTOP, space5);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_keys3x, 0, wxEXPAND | wxTOP, space5);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_keys4x, 0, wxEXPAND | wxTOP, space5);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(key5x_options_sizer, 0, wxEXPAND | wxTOP, space5);
controls_sizer->AddSpacer(space5);
auto* const dio = new wxBoxSizer(wxHORIZONTAL);
dio->AddSpacer(space5);
dio->Add(device_chooser, 3, wxEXPAND);
dio->AddSpacer(space5);
dio->Add(reset_sizer, 1, wxEXPAND);
dio->AddSpacer(space5);
dio->Add(profile_chooser, 3, wxEXPAND);
dio->AddSpacer(space5);
auto* const szr_main = new wxBoxSizer(wxVERTICAL);
szr_main->AddSpacer(space5);
szr_main->Add(dio);
szr_main->AddSpacer(space5);
szr_main->Add(controls_sizer, 1, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
szr_main->Add(CreateButtonSizer(wxCLOSE | wxNO_DEFAULT), 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
SetSizerAndFit(szr_main);
Center();
UpdateDeviceComboBox();
UpdateProfileComboBox();
UpdateGUI();
}

View file

@ -0,0 +1,14 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "DolphinWX/Input/InputConfigDiag.h"
class GCKeyboardInputConfigDialog final : public InputConfigDialog
{
public:
GCKeyboardInputConfigDialog(wxWindow* parent, InputConfig& config, const wxString& name,
int port_num = 0);
};

View file

@ -0,0 +1,83 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "DolphinWX/Input/GCPadInputConfigDiag.h"
#include "Core/HW/GCPad.h"
#include "Core/HW/GCPadEmu.h"
GCPadInputConfigDialog::GCPadInputConfigDialog(wxWindow* const parent, InputConfig& config,
const wxString& name, const int port_num)
: InputConfigDialog(parent, config, name, port_num)
{
const int space5 = FromDIP(5);
auto* const device_chooser = CreateDeviceChooserGroupBox();
auto* const reset_sizer = CreaterResetGroupBox(wxHORIZONTAL);
auto* const profile_chooser = CreateProfileChooserGroupBox();
auto* const group_box_buttons =
new ControlGroupBox(Pad::GetGroup(port_num, PadGroup::Buttons), this, this);
auto* const group_box_main_stick =
new ControlGroupBox(Pad::GetGroup(port_num, PadGroup::MainStick), this, this);
auto* const group_box_c_stick =
new ControlGroupBox(Pad::GetGroup(port_num, PadGroup::CStick), this, this);
auto* const group_box_dpad =
new ControlGroupBox(Pad::GetGroup(port_num, PadGroup::DPad), this, this);
auto* const group_box_triggers =
new ControlGroupBox(Pad::GetGroup(port_num, PadGroup::Triggers), this, this);
auto* const group_box_rumble =
new ControlGroupBox(Pad::GetGroup(port_num, PadGroup::Rumble), this, this);
auto* const group_box_options =
new ControlGroupBox(Pad::GetGroup(port_num, PadGroup::Options), this, this);
auto* const triggers_rumble_sizer = new wxBoxSizer(wxVERTICAL);
triggers_rumble_sizer->Add(group_box_triggers, 0, wxEXPAND);
triggers_rumble_sizer->AddSpacer(space5);
triggers_rumble_sizer->Add(group_box_rumble, 0, wxEXPAND);
auto* const dpad_options_sizer = new wxBoxSizer(wxVERTICAL);
dpad_options_sizer->Add(group_box_dpad, 0, wxEXPAND);
dpad_options_sizer->AddSpacer(space5);
dpad_options_sizer->Add(group_box_options, 0, wxEXPAND);
auto* const controls_sizer = new wxBoxSizer(wxHORIZONTAL);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_buttons, 0, wxEXPAND | wxTOP, space5);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_main_stick, 0, wxEXPAND | wxTOP, space5);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_c_stick, 0, wxEXPAND | wxTOP, space5);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(triggers_rumble_sizer, 0, wxEXPAND | wxTOP, space5);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(dpad_options_sizer, 0, wxEXPAND | wxTOP, space5);
controls_sizer->AddSpacer(space5);
auto* const dio = new wxBoxSizer(wxHORIZONTAL);
dio->AddSpacer(space5);
dio->Add(device_chooser, 2, wxEXPAND);
dio->AddSpacer(space5);
dio->Add(reset_sizer, 1, wxEXPAND);
dio->AddSpacer(space5);
dio->Add(profile_chooser, 2, wxEXPAND);
dio->AddSpacer(space5);
auto* const szr_main = new wxBoxSizer(wxVERTICAL);
szr_main->AddSpacer(space5);
szr_main->Add(dio);
szr_main->AddSpacer(space5);
szr_main->Add(controls_sizer, 1, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
szr_main->Add(CreateButtonSizer(wxCLOSE | wxNO_DEFAULT), 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
SetSizerAndFit(szr_main);
Center();
UpdateDeviceComboBox();
UpdateProfileComboBox();
UpdateGUI();
}

View file

@ -0,0 +1,14 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "DolphinWX/Input/InputConfigDiag.h"
class GCPadInputConfigDialog final : public InputConfigDialog
{
public:
GCPadInputConfigDialog(wxWindow* parent, InputConfig& config, const wxString& name,
int port_num = 0);
};

View file

@ -0,0 +1,58 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "DolphinWX/Input/GuitarInputConfigDiag.h"
#include "Core/HW/Wiimote.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
GuitarInputConfigDialog::GuitarInputConfigDialog(wxWindow* const parent, InputConfig& config,
const wxString& name, const int port_num)
: InputConfigDialog(parent, config, name, port_num)
{
const int space5 = FromDIP(5);
auto* const group_box_buttons = new ControlGroupBox(
Wiimote::GetGuitarGroup(port_num, WiimoteEmu::GuitarGroup::Buttons), this, this);
auto* const group_left_strum = new ControlGroupBox(
Wiimote::GetGuitarGroup(port_num, WiimoteEmu::GuitarGroup::Strum), this, this);
auto* const buttons_strum_sizer = new wxBoxSizer(wxVERTICAL);
buttons_strum_sizer->Add(group_box_buttons, 0, wxEXPAND);
buttons_strum_sizer->AddSpacer(space5);
buttons_strum_sizer->Add(group_left_strum, 0, wxEXPAND);
auto* const group_box_frets = new ControlGroupBox(
Wiimote::GetGuitarGroup(port_num, WiimoteEmu::GuitarGroup::Frets), this, this);
ControlGroupBox* group_box_whammy = new ControlGroupBox(
Wiimote::GetGuitarGroup(port_num, WiimoteEmu::GuitarGroup::Whammy), this, this);
auto* const frets_whammy_sizer = new wxBoxSizer(wxVERTICAL);
frets_whammy_sizer->Add(group_box_frets, 0, wxEXPAND);
frets_whammy_sizer->AddSpacer(space5);
frets_whammy_sizer->Add(group_box_whammy, 0, wxEXPAND);
auto* const group_box_stick = new ControlGroupBox(
Wiimote::GetGuitarGroup(port_num, WiimoteEmu::GuitarGroup::Stick), this, this);
auto* const controls_sizer = new wxBoxSizer(wxHORIZONTAL);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(buttons_strum_sizer, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(frets_whammy_sizer, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_stick, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
auto* const szr_main = new wxBoxSizer(wxVERTICAL);
szr_main->AddSpacer(space5);
szr_main->Add(controls_sizer, 1, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
szr_main->Add(CreateButtonSizer(wxCLOSE | wxNO_DEFAULT), 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
SetSizerAndFit(szr_main);
Center();
UpdateGUI();
}

View file

@ -0,0 +1,14 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "DolphinWX/Input/InputConfigDiag.h"
class GuitarInputConfigDialog final : public InputConfigDialog
{
public:
GuitarInputConfigDialog(wxWindow* parent, InputConfig& config, const wxString& name,
int port_num = 0);
};

View file

@ -0,0 +1,204 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include <wx/notebook.h>
#include <wx/panel.h>
#include <wx/sizer.h>
#include "Core/HotkeyManager.h"
#include "DolphinWX/Input/HotkeyInputConfigDiag.h"
enum HotkeyGroup : int;
HotkeyInputConfigDialog::HotkeyInputConfigDialog(wxWindow* const parent, InputConfig& config,
const wxString& name, const int port_num)
: InputConfigDialog(parent, config, name, port_num)
{
const int space5 = FromDIP(5);
auto* const device_chooser = CreateDeviceChooserGroupBox();
auto* const reset_sizer = CreaterResetGroupBox(wxVERTICAL);
auto* const profile_chooser = CreateProfileChooserGroupBox();
auto* const notebook = new wxNotebook(this, wxID_ANY);
// General
auto* const tab_general = new wxPanel(notebook);
auto* const group_box_general =
new ControlGroupBox(HotkeyManagerEmu::GetHotkeyGroup(HKGP_GENERAL), tab_general, this);
auto* const group_box_volume =
new ControlGroupBox(HotkeyManagerEmu::GetHotkeyGroup(HKGP_VOLUME), tab_general, this);
auto* const group_box_speed =
new ControlGroupBox(HotkeyManagerEmu::GetHotkeyGroup(HKGP_SPEED), tab_general, this);
auto* const szr_volume_speed = new wxBoxSizer(wxVERTICAL);
szr_volume_speed->AddSpacer(space5);
szr_volume_speed->Add(group_box_volume, 0, wxEXPAND);
szr_volume_speed->AddSpacer(space5);
szr_volume_speed->Add(group_box_speed, 0, wxEXPAND);
auto* const szr_general = new wxBoxSizer(wxHORIZONTAL);
szr_general->Add(group_box_general, 0, wxEXPAND | wxTOP, space5);
szr_general->AddSpacer(space5);
szr_general->Add(szr_volume_speed, 0, wxEXPAND);
tab_general->SetSizerAndFit(szr_general);
notebook->AddPage(tab_general, "General");
// TAS Tools
auto* const tab_tas = new wxPanel(notebook);
auto* const group_box_frame_advance =
new ControlGroupBox(HotkeyManagerEmu::GetHotkeyGroup(HKGP_FRANE_ADVANCE), tab_tas, this);
auto* const group_box_movie =
new ControlGroupBox(HotkeyManagerEmu::GetHotkeyGroup(HKGP_MOVIE), tab_tas, this);
auto* const szr_tas = new wxBoxSizer(wxHORIZONTAL);
szr_tas->AddSpacer(space5);
szr_tas->Add(group_box_frame_advance, 0, wxEXPAND | wxTOP, space5);
szr_tas->AddSpacer(space5);
szr_tas->Add(group_box_movie, 0, wxEXPAND | wxTOP, space5);
tab_tas->SetSizerAndFit(szr_tas);
notebook->AddPage(tab_tas, "TAS Tools");
// WII and Wii Remote
auto* const tab_wii = new wxPanel(notebook);
auto* const group_box_wii =
new ControlGroupBox(HotkeyManagerEmu::GetHotkeyGroup(HKGP_WII), tab_wii, this);
auto* const szr_wii = new wxBoxSizer(wxHORIZONTAL);
szr_wii->AddSpacer(space5);
szr_wii->Add(group_box_wii, 0, wxEXPAND | wxTOP, space5);
szr_wii->AddSpacer(space5);
tab_wii->SetSizerAndFit(szr_wii);
notebook->AddPage(tab_wii, "Wii and Wii Remote");
// Graphics
auto* const tab_graphics = new wxPanel(notebook);
auto* const group_box_graphics_toggles = new ControlGroupBox(
HotkeyManagerEmu::GetHotkeyGroup(HKGP_GRAPHICS_TOGGLES), tab_graphics, this);
auto* const group_box_ir =
new ControlGroupBox(HotkeyManagerEmu::GetHotkeyGroup(HKGP_IR), tab_graphics, this);
auto* const szr_toggle_ir = new wxBoxSizer(wxVERTICAL);
szr_toggle_ir->Add(group_box_graphics_toggles, 0, wxEXPAND);
szr_toggle_ir->AddSpacer(space5);
szr_toggle_ir->Add(group_box_ir, 0, wxEXPAND);
auto* const group_box_freelook =
new ControlGroupBox(HotkeyManagerEmu::GetHotkeyGroup(HKGP_FREELOOK), tab_graphics, this);
auto* const szr_graphics_toggles = new wxBoxSizer(wxHORIZONTAL);
szr_graphics_toggles->AddSpacer(space5);
szr_graphics_toggles->Add(szr_toggle_ir, 0, wxEXPAND | wxTOP, space5);
szr_graphics_toggles->AddSpacer(space5);
szr_graphics_toggles->Add(group_box_freelook, 0, wxEXPAND | wxTOP, space5);
szr_graphics_toggles->AddSpacer(space5);
tab_graphics->SetSizerAndFit(szr_graphics_toggles);
notebook->AddPage(tab_graphics, "Graphics");
// 3D
auto* const tab_3D = new wxPanel(notebook);
auto* const group_box_3D_toggles =
new ControlGroupBox(HotkeyManagerEmu::GetHotkeyGroup(HKGP_3D_TOGGLE), tab_3D, this);
auto* const group_box_3D_depth =
new ControlGroupBox(HotkeyManagerEmu::GetHotkeyGroup(HKGP_3D_DEPTH), tab_3D, this);
auto* const szr_3D = new wxBoxSizer(wxHORIZONTAL);
szr_3D->AddSpacer(space5);
szr_3D->Add(group_box_3D_toggles, 0, wxEXPAND | wxTOP, space5);
szr_3D->AddSpacer(space5);
szr_3D->Add(group_box_3D_depth, 0, wxEXPAND | wxTOP, space5);
szr_3D->AddSpacer(space5);
tab_3D->SetSizerAndFit(szr_3D);
notebook->AddPage(tab_3D, "3D");
// Save and Load State
auto* const tab_save_load_state = new wxPanel(notebook);
auto* const group_box_load_state = new ControlGroupBox(
HotkeyManagerEmu::GetHotkeyGroup(HKGP_LOAD_STATE), tab_save_load_state, this);
auto* const group_box_save_state = new ControlGroupBox(
HotkeyManagerEmu::GetHotkeyGroup(HKGP_SAVE_STATE), tab_save_load_state, this);
auto* const szr_save_load_state = new wxBoxSizer(wxHORIZONTAL);
szr_save_load_state->AddSpacer(space5);
szr_save_load_state->Add(group_box_load_state, 0, wxEXPAND | wxTOP, space5);
szr_save_load_state->AddSpacer(space5);
szr_save_load_state->Add(group_box_save_state, 0, wxEXPAND | wxTOP, space5);
szr_save_load_state->AddSpacer(space5);
tab_save_load_state->SetSizerAndFit(szr_save_load_state);
notebook->AddPage(tab_save_load_state, "Save and Load State");
// Other State Managament
auto* const tab_other_state = new wxPanel(notebook);
auto* const group_box_select_state = new ControlGroupBox(
HotkeyManagerEmu::GetHotkeyGroup(HKGP_SELECT_STATE), tab_other_state, this);
auto* const group_box_load_last_state = new ControlGroupBox(
HotkeyManagerEmu::GetHotkeyGroup(HKGP_LOAD_LAST_STATE), tab_other_state, this);
auto* const group_box_state_misc =
new ControlGroupBox(HotkeyManagerEmu::GetHotkeyGroup(HKGP_STATE_MISC), tab_other_state, this);
auto* const szr_other_state = new wxBoxSizer(wxHORIZONTAL);
szr_other_state->AddSpacer(space5);
szr_other_state->Add(group_box_select_state, 0, wxEXPAND | wxTOP, space5);
szr_other_state->AddSpacer(space5);
szr_other_state->Add(group_box_load_last_state, 0, wxEXPAND | wxTOP, space5);
szr_other_state->AddSpacer(space5);
szr_other_state->Add(group_box_state_misc, 0, wxEXPAND | wxTOP, space5);
szr_other_state->AddSpacer(space5);
tab_other_state->SetSizerAndFit(szr_other_state);
notebook->AddPage(tab_other_state, "Other State Management");
notebook->SetSelection(0);
auto* const device_profile_sizer = new wxBoxSizer(wxVERTICAL);
device_profile_sizer->Add(device_chooser, 1, wxEXPAND);
device_profile_sizer->Add(profile_chooser, 1, wxEXPAND);
auto* const group_box_options =
new ControlGroupBox(HotkeyManagerEmu::GetOptionsGroup(), this, this);
auto* const dio = new wxBoxSizer(wxHORIZONTAL);
dio->AddSpacer(space5);
dio->Add(device_profile_sizer, 3, wxEXPAND);
dio->Add(reset_sizer, 0, wxEXPAND);
dio->Add(group_box_options, 1, wxEXPAND);
dio->AddSpacer(space5);
auto* const szr_main = new wxBoxSizer(wxVERTICAL);
szr_main->AddSpacer(space5);
szr_main->Add(dio);
szr_main->AddSpacer(space5);
szr_main->Add(notebook, 1, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
szr_main->Add(CreateButtonSizer(wxCLOSE | wxNO_DEFAULT), 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
SetSizerAndFit(szr_main);
Center();
UpdateDeviceComboBox();
UpdateProfileComboBox();
UpdateGUI();
}

View file

@ -0,0 +1,14 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "DolphinWX/Input/InputConfigDiag.h"
class HotkeyInputConfigDialog final : public InputConfigDialog
{
public:
HotkeyInputConfigDialog(wxWindow* parent, InputConfig& config, const wxString& name,
int port_num = 0);
};

View file

@ -45,7 +45,12 @@
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
#include "Core/HotkeyManager.h"
#include "DolphinWX/DolphinSlider.h"
#include "DolphinWX/Input/ClassicInputConfigDiag.h"
#include "DolphinWX/Input/DrumsInputConfigDiag.h"
#include "DolphinWX/Input/GuitarInputConfigDiag.h"
#include "DolphinWX/Input/InputConfigDiag.h"
#include "DolphinWX/Input/NunchukInputConfigDiag.h"
#include "DolphinWX/Input/TurntableInputConfigDiag.h"
#include "DolphinWX/WxUtils.h"
#include "InputCommon/ControllerEmu.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
@ -66,22 +71,32 @@ void InputConfigDialog::ConfigExtension(wxCommandEvent& event)
{
case WiimoteEmu::EXT_NUNCHUK:
{
NunchukInputConfigDialog dlg(this, m_config, _("Nunchuk Configuration"), m_port_num);
dlg.ShowModal();
}
break;
case WiimoteEmu::EXT_CLASSIC:
{
ClassicInputConfigDialog dlg(this, m_config, _("Classic Controller Configuration"), m_port_num);
dlg.ShowModal();
}
break;
case WiimoteEmu::EXT_GUITAR:
{
GuitarInputConfigDialog dlg(this, m_config, _("Guitar Configuration"), m_port_num);
dlg.ShowModal();
}
break;
case WiimoteEmu::EXT_DRUMS:
{
DrumsInputConfigDialog dlg(this, m_config, _("Drums Configuration"), m_port_num);
dlg.ShowModal();
}
break;
case WiimoteEmu::EXT_TURNTABLE:
{
TurntableInputConfigDialog dlg(this, m_config, _("Turntable Configuration"), m_port_num);
dlg.ShowModal();
}
break;
default:

View file

@ -0,0 +1,54 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "DolphinWX/Input/NunchukInputConfigDiag.h"
#include "Core/HW/Wiimote.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
NunchukInputConfigDialog::NunchukInputConfigDialog(wxWindow* const parent, InputConfig& config,
const wxString& name, const int port_num)
: InputConfigDialog(parent, config, name, port_num)
{
const int space5 = FromDIP(5);
auto* const group_box_buttons = new ControlGroupBox(
Wiimote::GetNunchukGroup(port_num, WiimoteEmu::NunchukGroup::Buttons), this, this);
auto* const group_box_shake = new ControlGroupBox(
Wiimote::GetNunchukGroup(port_num, WiimoteEmu::NunchukGroup::Shake), this, this);
auto* const buttons_shake = new wxBoxSizer(wxVERTICAL);
buttons_shake->Add(group_box_buttons, 0, wxEXPAND);
buttons_shake->AddSpacer(space5);
buttons_shake->Add(group_box_shake, 0, wxEXPAND);
auto* const group_box_stick = new ControlGroupBox(
Wiimote::GetNunchukGroup(port_num, WiimoteEmu::NunchukGroup::Stick), this, this);
auto* const group_box_tilt = new ControlGroupBox(
Wiimote::GetNunchukGroup(port_num, WiimoteEmu::NunchukGroup::Tilt), this, this);
auto* const group_box_swing = new ControlGroupBox(
Wiimote::GetNunchukGroup(port_num, WiimoteEmu::NunchukGroup::Swing), this, this);
auto* const controls_sizer = new wxBoxSizer(wxHORIZONTAL);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(buttons_shake, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_stick, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_tilt, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_swing, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
auto* const szr_main = new wxBoxSizer(wxVERTICAL);
szr_main->AddSpacer(space5);
szr_main->Add(controls_sizer, 1, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
szr_main->Add(CreateButtonSizer(wxCLOSE | wxNO_DEFAULT), 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
SetSizerAndFit(szr_main);
Center();
UpdateGUI();
}

View file

@ -0,0 +1,14 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "DolphinWX/Input/InputConfigDiag.h"
class NunchukInputConfigDialog final : public InputConfigDialog
{
public:
NunchukInputConfigDialog(wxWindow* parent, InputConfig& config, const wxString& name,
int port_num = 0);
};

View file

@ -0,0 +1,62 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "DolphinWX/Input/TurntableInputConfigDiag.h"
#include "Core/HW/Wiimote.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
TurntableInputConfigDialog::TurntableInputConfigDialog(wxWindow* const parent, InputConfig& config,
const wxString& name, const int port_num)
: InputConfigDialog(parent, config, name, port_num)
{
const int space5 = FromDIP(5);
auto* const group_box_stick = new ControlGroupBox(
Wiimote::GetTurntableGroup(port_num, WiimoteEmu::TurntableGroup::Stick), this, this);
auto* const group_box_effect_dial = new ControlGroupBox(
Wiimote::GetTurntableGroup(port_num, WiimoteEmu::TurntableGroup::EffectDial), this, this);
auto* const stick_effect_sizer = new wxBoxSizer(wxVERTICAL);
stick_effect_sizer->Add(group_box_stick, 0, wxEXPAND);
stick_effect_sizer->AddSpacer(space5);
stick_effect_sizer->Add(group_box_effect_dial, 0, wxEXPAND);
auto* const group_box_left_table = new ControlGroupBox(
Wiimote::GetTurntableGroup(port_num, WiimoteEmu::TurntableGroup::LeftTable), this, this);
auto* const group_box_right_table = new ControlGroupBox(
Wiimote::GetTurntableGroup(port_num, WiimoteEmu::TurntableGroup::RightTable), this, this);
auto* const group_box_crossfade = new ControlGroupBox(
Wiimote::GetTurntableGroup(port_num, WiimoteEmu::TurntableGroup::Crossfade), this, this);
auto* const tables_crossfade_sizer = new wxBoxSizer(wxVERTICAL);
tables_crossfade_sizer->Add(group_box_right_table, 0, wxEXPAND);
tables_crossfade_sizer->AddSpacer(space5);
tables_crossfade_sizer->Add(group_box_left_table, 0, wxEXPAND);
tables_crossfade_sizer->AddSpacer(space5);
tables_crossfade_sizer->Add(group_box_crossfade, 0, wxEXPAND);
auto* const group_box_buttons = new ControlGroupBox(
Wiimote::GetTurntableGroup(port_num, WiimoteEmu::TurntableGroup::Buttons), this, this);
auto* const controls_sizer = new wxBoxSizer(wxHORIZONTAL);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(group_box_buttons, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(stick_effect_sizer, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
controls_sizer->Add(tables_crossfade_sizer, 0, wxEXPAND);
controls_sizer->AddSpacer(space5);
auto* const szr_main = new wxBoxSizer(wxVERTICAL);
szr_main->AddSpacer(space5);
szr_main->Add(controls_sizer, 1, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
szr_main->Add(CreateButtonSizer(wxCLOSE | wxNO_DEFAULT), 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
SetSizerAndFit(szr_main);
Center();
UpdateGUI();
}

View file

@ -0,0 +1,14 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "DolphinWX/Input/InputConfigDiag.h"
class TurntableInputConfigDialog final : public InputConfigDialog
{
public:
TurntableInputConfigDialog(wxWindow* parent, InputConfig& config, const wxString& name,
int port_num = 0);
};

View file

@ -0,0 +1,129 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include <wx/notebook.h>
#include <wx/panel.h>
#include "DolphinWX/Input/WiimoteInputConfigDiag.h"
#include "Core/HW/Wiimote.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
WiimoteInputConfigDialog::WiimoteInputConfigDialog(wxWindow* const parent, InputConfig& config,
const wxString& name, const int port_num)
: InputConfigDialog(parent, config, name, port_num)
{
const int space5 = FromDIP(5);
auto* const device_chooser = CreateDeviceChooserGroupBox();
auto* const reset_sizer = CreaterResetGroupBox(wxVERTICAL);
auto* const profile_chooser = CreateProfileChooserGroupBox();
auto* const notebook = new wxNotebook(this, wxID_ANY);
// General and Options
auto* const tab_general = new wxPanel(notebook);
auto* const group_box_buttons = new ControlGroupBox(
Wiimote::GetWiimoteGroup(port_num, WiimoteEmu::WiimoteGroup::Buttons), tab_general, this);
auto* const group_box_dpad = new ControlGroupBox(
Wiimote::GetWiimoteGroup(port_num, WiimoteEmu::WiimoteGroup::DPad), tab_general, this);
auto* const group_box_rumble = new ControlGroupBox(
Wiimote::GetWiimoteGroup(port_num, WiimoteEmu::WiimoteGroup::Rumble), tab_general, this);
auto* const group_box_extension = new ControlGroupBox(
Wiimote::GetWiimoteGroup(port_num, WiimoteEmu::WiimoteGroup::Extension), tab_general, this);
auto* const group_box_options = new ControlGroupBox(
Wiimote::GetWiimoteGroup(port_num, WiimoteEmu::WiimoteGroup::Options), tab_general, this);
auto* const group_box_hotkeys = new ControlGroupBox(
Wiimote::GetWiimoteGroup(port_num, WiimoteEmu::WiimoteGroup::Hotkeys), tab_general, this);
auto* const dpad_extension_rumble_sizer = new wxBoxSizer(wxVERTICAL);
dpad_extension_rumble_sizer->Add(group_box_dpad, 0, wxEXPAND);
dpad_extension_rumble_sizer->AddSpacer(space5);
dpad_extension_rumble_sizer->Add(group_box_extension, 0, wxEXPAND);
dpad_extension_rumble_sizer->AddSpacer(space5);
dpad_extension_rumble_sizer->Add(group_box_rumble, 0, wxEXPAND);
auto* const options_hotkeys_sizer = new wxBoxSizer(wxVERTICAL);
options_hotkeys_sizer->Add(group_box_options, 0, wxEXPAND);
options_hotkeys_sizer->AddSpacer(space5);
options_hotkeys_sizer->Add(group_box_hotkeys, 0, wxEXPAND);
auto* const general_options_sizer = new wxBoxSizer(wxHORIZONTAL);
general_options_sizer->AddSpacer(space5);
general_options_sizer->Add(group_box_buttons, 0, wxEXPAND | wxTOP, space5);
general_options_sizer->AddSpacer(space5);
general_options_sizer->Add(dpad_extension_rumble_sizer, 0, wxEXPAND | wxTOP, space5);
general_options_sizer->AddSpacer(space5);
general_options_sizer->Add(options_hotkeys_sizer, 0, wxEXPAND | wxTOP, space5);
general_options_sizer->AddSpacer(space5);
tab_general->SetSizerAndFit(general_options_sizer);
notebook->AddPage(tab_general, "General and Options");
// Motion Controls and IR
auto* const tab_motion_controls_ir = new wxPanel(notebook);
auto* const group_box_shake =
new ControlGroupBox(Wiimote::GetWiimoteGroup(port_num, WiimoteEmu::WiimoteGroup::Shake),
tab_motion_controls_ir, this);
auto* const group_box_ir =
new ControlGroupBox(Wiimote::GetWiimoteGroup(port_num, WiimoteEmu::WiimoteGroup::IR),
tab_motion_controls_ir, this);
auto* const group_box_tilt =
new ControlGroupBox(Wiimote::GetWiimoteGroup(port_num, WiimoteEmu::WiimoteGroup::Tilt),
tab_motion_controls_ir, this);
auto* const group_box_swing =
new ControlGroupBox(Wiimote::GetWiimoteGroup(port_num, WiimoteEmu::WiimoteGroup::Swing),
tab_motion_controls_ir, this);
auto* const swing_shake_sizer = new wxBoxSizer(wxVERTICAL);
swing_shake_sizer->Add(group_box_swing, 0, wxEXPAND);
swing_shake_sizer->AddSpacer(space5);
swing_shake_sizer->Add(group_box_shake, 0, wxEXPAND);
auto* const motion_controls_ir_sizer = new wxBoxSizer(wxHORIZONTAL);
motion_controls_ir_sizer->AddSpacer(space5);
motion_controls_ir_sizer->Add(group_box_ir, 0, wxEXPAND | wxTOP, space5);
motion_controls_ir_sizer->AddSpacer(space5);
motion_controls_ir_sizer->Add(group_box_tilt, 0, wxEXPAND | wxTOP, space5);
motion_controls_ir_sizer->AddSpacer(space5);
motion_controls_ir_sizer->Add(swing_shake_sizer, 0, wxEXPAND | wxTOP, space5);
motion_controls_ir_sizer->AddSpacer(space5);
tab_motion_controls_ir->SetSizerAndFit(motion_controls_ir_sizer);
notebook->AddPage(tab_motion_controls_ir, "Motion Controls and IR");
notebook->SetSelection(0);
auto* const device_profile_sizer = new wxBoxSizer(wxVERTICAL);
device_profile_sizer->Add(device_chooser, 1, wxEXPAND);
device_profile_sizer->Add(profile_chooser, 1, wxEXPAND);
auto* const dio = new wxBoxSizer(wxHORIZONTAL);
dio->AddSpacer(space5);
dio->Add(device_profile_sizer, 5, wxEXPAND);
dio->AddSpacer(space5);
dio->Add(reset_sizer, 1, wxEXPAND);
dio->AddSpacer(space5);
auto* const szr_main = new wxBoxSizer(wxVERTICAL);
szr_main->AddSpacer(space5);
szr_main->Add(dio);
szr_main->AddSpacer(space5);
szr_main->Add(notebook, 1, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
szr_main->Add(CreateButtonSizer(wxCLOSE | wxNO_DEFAULT), 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr_main->AddSpacer(space5);
SetSizerAndFit(szr_main);
Center();
UpdateDeviceComboBox();
UpdateProfileComboBox();
UpdateGUI();
}

View file

@ -0,0 +1,14 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "DolphinWX/Input/InputConfigDiag.h"
class WiimoteInputConfigDialog final : public InputConfigDialog
{
public:
WiimoteInputConfigDialog(wxWindow* parent, InputConfig& config, const wxString& name,
int port_num = 0);
};