diff --git a/Source/Core/Core/HotkeyManager.cpp b/Source/Core/Core/HotkeyManager.cpp index 8e66a9e89a..1ff14f872e 100644 --- a/Source/Core/Core/HotkeyManager.cpp +++ b/Source/Core/Core/HotkeyManager.cpp @@ -85,22 +85,22 @@ constexpr std::array s_hotkey_labels{{ _trans("Toggle SD Card"), _trans("Toggle USB Keyboard"), - _trans("Next Profile for Wii Remote 1"), - _trans("Previous Profile for Wii Remote 1"), - _trans("Next Game Profile for Wii Remote 1"), - _trans("Previous Game Profile for Wii Remote 1"), - _trans("Next Profile for Wii Remote 2"), - _trans("Previous Profile for Wii Remote 2"), - _trans("Next Game Profile for Wii Remote 2"), - _trans("Previous Game Profile for Wii Remote 2"), - _trans("Next Profile for Wii Remote 3"), - _trans("Previous Profile for Wii Remote 3"), - _trans("Next Game Profile for Wii Remote 3"), - _trans("Previous Game Profile for Wii Remote 3"), - _trans("Next Profile for Wii Remote 4"), - _trans("Previous Profile for Wii Remote 4"), - _trans("Next Game Profile for Wii Remote 4"), - _trans("Previous Game Profile for Wii Remote 4"), + _trans("Next Profile"), + _trans("Previous Profile"), + _trans("Next Game Profile"), + _trans("Previous Game Profile"), + _trans("Next Profile"), + _trans("Previous Profile"), + _trans("Next Game Profile"), + _trans("Previous Game Profile"), + _trans("Next Profile"), + _trans("Previous Profile"), + _trans("Next Game Profile"), + _trans("Previous Game Profile"), + _trans("Next Profile"), + _trans("Previous Profile"), + _trans("Next Game Profile"), + _trans("Previous Game Profile"), _trans("Toggle Crop"), _trans("Toggle Aspect Ratio"), @@ -328,7 +328,10 @@ constexpr std::array s_groups_info = { {_trans("Program Counter"), HK_SHOW_PC, HK_SET_PC}, {_trans("Breakpoint"), HK_BP_TOGGLE, HK_MBP_ADD}, {_trans("Wii"), HK_TRIGGER_SYNC_BUTTON, HK_TOGGLE_USB_KEYBOARD}, - {_trans("Controller Profile"), HK_NEXT_WIIMOTE_PROFILE_1, HK_PREV_GAME_WIIMOTE_PROFILE_4}, + {_trans("Controller Profile 1"), HK_NEXT_WIIMOTE_PROFILE_1, HK_PREV_GAME_WIIMOTE_PROFILE_1}, + {_trans("Controller Profile 2"), HK_NEXT_WIIMOTE_PROFILE_2, HK_PREV_GAME_WIIMOTE_PROFILE_2}, + {_trans("Controller Profile 3"), HK_NEXT_WIIMOTE_PROFILE_3, HK_PREV_GAME_WIIMOTE_PROFILE_3}, + {_trans("Controller Profile 4"), HK_NEXT_WIIMOTE_PROFILE_4, HK_PREV_GAME_WIIMOTE_PROFILE_4}, {_trans("Graphics Toggles"), HK_TOGGLE_CROP, HK_TOGGLE_TEXTURES}, {_trans("Internal Resolution"), HK_INCREASE_IR, HK_DECREASE_IR}, {_trans("Freelook"), HK_FREELOOK_DECREASE_SPEED, HK_FREELOOK_TOGGLE}, diff --git a/Source/Core/Core/HotkeyManager.h b/Source/Core/Core/HotkeyManager.h index c52bb778db..1a2216a4f3 100644 --- a/Source/Core/Core/HotkeyManager.h +++ b/Source/Core/Core/HotkeyManager.h @@ -187,7 +187,10 @@ enum HotkeyGroup : int HKGP_PC, HKGP_BREAKPOINT, HKGP_WII, - HKGP_CONTROLLER_PROFILE, + HKGP_CONTROLLER_PROFILE_1, + HKGP_CONTROLLER_PROFILE_2, + HKGP_CONTROLLER_PROFILE_3, + HKGP_CONTROLLER_PROFILE_4, HKGP_GRAPHICS_TOGGLES, HKGP_IR, HKGP_FREELOOK, diff --git a/Source/Core/DolphinQt/Config/Mapping/HotkeyControllerProfile.cpp b/Source/Core/DolphinQt/Config/Mapping/HotkeyControllerProfile.cpp index 044b10485d..38d4945795 100644 --- a/Source/Core/DolphinQt/Config/Mapping/HotkeyControllerProfile.cpp +++ b/Source/Core/DolphinQt/Config/Mapping/HotkeyControllerProfile.cpp @@ -4,8 +4,8 @@ #include "DolphinQt/Config/Mapping/HotkeyControllerProfile.h" +#include #include -#include #include "Core/HotkeyManager.h" @@ -16,12 +16,29 @@ HotkeyControllerProfile::HotkeyControllerProfile(MappingWindow* window) : Mappin void HotkeyControllerProfile::CreateMainLayout() { - m_main_layout = new QHBoxLayout(); + const auto main_layout = new QGridLayout; - m_main_layout->addWidget(CreateGroupBox( - tr("Controller Profile"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_CONTROLLER_PROFILE))); + main_layout->addWidget( + CreateGroupBox(tr("Wii Remote %1").arg(1), + HotkeyManagerEmu::GetHotkeyGroup(HKGP_CONTROLLER_PROFILE_1)), + 0, 0); - setLayout(m_main_layout); + main_layout->addWidget( + CreateGroupBox(tr("Wii Remote %1").arg(2), + HotkeyManagerEmu::GetHotkeyGroup(HKGP_CONTROLLER_PROFILE_2)), + 0, 1); + + main_layout->addWidget( + CreateGroupBox(tr("Wii Remote %1").arg(3), + HotkeyManagerEmu::GetHotkeyGroup(HKGP_CONTROLLER_PROFILE_3)), + 1, 0); + + main_layout->addWidget( + CreateGroupBox(tr("Wii Remote %1").arg(4), + HotkeyManagerEmu::GetHotkeyGroup(HKGP_CONTROLLER_PROFILE_4)), + 1, 1); + + setLayout(main_layout); } InputConfig* HotkeyControllerProfile::GetConfig() diff --git a/Source/Core/DolphinQt/Config/Mapping/HotkeyControllerProfile.h b/Source/Core/DolphinQt/Config/Mapping/HotkeyControllerProfile.h index 6884275b63..0767e1cd93 100644 --- a/Source/Core/DolphinQt/Config/Mapping/HotkeyControllerProfile.h +++ b/Source/Core/DolphinQt/Config/Mapping/HotkeyControllerProfile.h @@ -6,8 +6,6 @@ #include "DolphinQt/Config/Mapping/MappingWidget.h" -class QHBoxLayout; - class HotkeyControllerProfile final : public MappingWidget { Q_OBJECT @@ -20,7 +18,4 @@ private: void LoadSettings() override; void SaveSettings() override; void CreateMainLayout(); - - // Main - QHBoxLayout* m_main_layout; };