diff options
| author | Anthony <Helios747@users.noreply.github.com> | 2018-02-18 11:45:12 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-18 11:45:12 -0800 |
| commit | 4876b9d8e018ec79ddb213f175d81b26fb1d2e7b (patch) | |
| tree | ed569c2a300461ab995864712aa2d09108e52d72 /Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp | |
| parent | 6a609e6e3c5ac4f832f4f03082185cb46fd682e4 (diff) | |
| parent | ec54b421a4f47f64dc66c394ad3e880be38a3b96 (diff) | |
Merge pull request #6362 from spycrab/qt_indicators
Qt/Mapping: Implement indicators
Diffstat (limited to 'Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp b/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp index 883d329473..5c2261de06 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp @@ -11,6 +11,7 @@ #include "DolphinQt2/Config/Mapping/IOWindow.h" #include "DolphinQt2/Config/Mapping/MappingBool.h" #include "DolphinQt2/Config/Mapping/MappingButton.h" +#include "DolphinQt2/Config/Mapping/MappingIndicator.h" #include "DolphinQt2/Config/Mapping/MappingNumeric.h" #include "DolphinQt2/Config/Mapping/MappingWindow.h" #include "InputCommon/ControlReference/ControlReference.h" @@ -47,9 +48,14 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con group_box->setLayout(form_layout); + bool need_indicator = group->type == ControllerEmu::GroupType::Cursor || + group->type == ControllerEmu::GroupType::Stick || + group->type == ControllerEmu::GroupType::Tilt || + group->type == ControllerEmu::GroupType::MixedTriggers; + for (auto& control : group->controls) { - auto* button = new MappingButton(this, control->control_ref.get()); + auto* button = new MappingButton(this, control->control_ref.get(), !need_indicator); button->setMinimumWidth(100); button->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); @@ -87,6 +93,9 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con m_bools.push_back(checkbox); } + if (need_indicator) + form_layout->addRow(new MappingIndicator(group)); + return group_box; } |
