diff options
Diffstat (limited to 'Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp b/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp index efe64ac2ce..01913ca8c7 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp @@ -31,6 +31,29 @@ MappingWindow* MappingWidget::GetParent() const return m_parent; } +bool MappingWidget::IsIterativeInput() const +{ + return m_parent->IsIterativeInput(); +} + +void MappingWidget::NextButton(MappingButton* button) +{ + auto iterator = std::find(m_buttons.begin(), m_buttons.end(), button); + + if (iterator == m_buttons.end()) + return; + + if (++iterator == m_buttons.end()) + return; + + MappingButton* next = *iterator; + + if (next->IsInput() && next->isVisible()) + next->Detect(); + else + NextButton(next); +} + std::shared_ptr<ciface::Core::Device> MappingWidget::GetDevice() const { return m_parent->GetDevice(); |
