summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Input/MicButtonConfigDiag.cpp
diff options
context:
space:
mode:
authoraldelaro5 <aldelaro5@gmail.com>2016-12-04 16:28:44 -0500
committeraldelaro5 <aldelaro5@gmail.com>2016-12-05 18:09:31 -0500
commit9ff95c58fab7be00c8fe494606f956b6bc60fb1d (patch)
tree43526b1bb015f3d2943e26ccab2d0814e7ee0ca1 /Source/Core/DolphinWX/Input/MicButtonConfigDiag.cpp
parent431929fa1d222ce31a3f39e5e859c085832c0862 (diff)
Add a special input configuration dialog for the GameCube Mic
This is more logical as the mic is plugged into an EXI slot so it should be configured via the GameCube config dialog. This also allows to pass the right port number for the new dialog.
Diffstat (limited to 'Source/Core/DolphinWX/Input/MicButtonConfigDiag.cpp')
-rw-r--r--Source/Core/DolphinWX/Input/MicButtonConfigDiag.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Input/MicButtonConfigDiag.cpp b/Source/Core/DolphinWX/Input/MicButtonConfigDiag.cpp
new file mode 100644
index 0000000000..f42571bfe5
--- /dev/null
+++ b/Source/Core/DolphinWX/Input/MicButtonConfigDiag.cpp
@@ -0,0 +1,36 @@
+// Copyright 2016 Dolphin Emulator Project
+// Licensed under GPLv2+
+// Refer to the license.txt file included.
+
+#include "DolphinWX/Input/MicButtonConfigDiag.h"
+
+#include "Core/HW/GCPad.h"
+#include "Core/HW/GCPadEmu.h"
+
+MicButtonConfigDialog::MicButtonConfigDialog(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 group_box_button =
+ new ControlGroupBox(Pad::GetGroup(port_num, PadGroup::Mic), this, this);
+
+ auto* const controls_sizer = new wxBoxSizer(wxHORIZONTAL);
+ controls_sizer->Add(group_box_button, 0, wxEXPAND);
+
+ auto* const szr_main = new wxBoxSizer(wxVERTICAL);
+ szr_main->AddSpacer(space5);
+ szr_main->Add(device_chooser, 0, wxEXPAND);
+ 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);
+
+ SetSizer(szr_main);
+ Center();
+ UpdateGUI();
+}