diff options
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/shortcutwindow.cpp | 12 | ||||
-rw-r--r-- | src/gui/windows/shortcutwindow.h | 4 | ||||
-rw-r--r-- | src/gui/windows/socialwindow.cpp | 24 |
3 files changed, 20 insertions, 20 deletions
diff --git a/src/gui/windows/shortcutwindow.cpp b/src/gui/windows/shortcutwindow.cpp index 1d9fa88c2..5cf2ad7df 100644 --- a/src/gui/windows/shortcutwindow.cpp +++ b/src/gui/windows/shortcutwindow.cpp @@ -234,6 +234,18 @@ void ShortcutWindow::widgetMoved(const gcn::Event& event) (*it)->setRedraw(true); } +void ShortcutWindow::nextTab() +{ + if (mTabs) + mTabs->selectNextTab(); +} + +void ShortcutWindow::prevTab() +{ + if (mTabs) + mTabs->selectPrevTab(); +} + #ifdef USE_PROFILER void ShortcutWindow::logicChildren() { diff --git a/src/gui/windows/shortcutwindow.h b/src/gui/windows/shortcutwindow.h index b7d7f70a1..f4c417c94 100644 --- a/src/gui/windows/shortcutwindow.h +++ b/src/gui/windows/shortcutwindow.h @@ -68,6 +68,10 @@ class ShortcutWindow final : public Window void mouseDragged(gcn::MouseEvent &event) override final; + void nextTab(); + + void prevTab(); + #ifdef USE_PROFILER void logicChildren(); #endif diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp index 1c6b85153..8b1d0d79c 100644 --- a/src/gui/windows/socialwindow.cpp +++ b/src/gui/windows/socialwindow.cpp @@ -1819,30 +1819,14 @@ void SocialWindow::removePortal(const int x, const int y) void SocialWindow::nextTab() { - if (!mTabs) - return; - - int tab = mTabs->getSelectedTabIndex(); - - tab++; - if (tab == mTabs->getNumberOfTabs()) - tab = 0; - - mTabs->setSelectedTabByIndex(tab); + if (mTabs) + mTabs->selectNextTab(); } void SocialWindow::prevTab() { - if (!mTabs) - return; - - int tab = mTabs->getSelectedTabIndex(); - - if (tab == 0) - tab = mTabs->getNumberOfTabs(); - tab--; - - mTabs->setSelectedTabByIndex(tab); + if (mTabs) + mTabs->selectPrevTab(); } void SocialWindow::updateAttackFilter() |