diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-14 16:40:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-14 16:40:47 +0300 |
commit | b8b4e4c524331b4deb0a6caa8da004430297c98a (patch) | |
tree | a2fd6f1db45e76f08c0e5c1b4e57bbb86efba57b /src/gui/viewport.cpp | |
parent | c28cd5ffb1ca37a3a6d5ee0a73828dcd092db7f1 (diff) | |
download | manaverse-b8b4e4c524331b4deb0a6caa8da004430297c98a.tar.gz manaverse-b8b4e4c524331b4deb0a6caa8da004430297c98a.tar.bz2 manaverse-b8b4e4c524331b4deb0a6caa8da004430297c98a.tar.xz manaverse-b8b4e4c524331b4deb0a6caa8da004430297c98a.zip |
Replace static members usage from pointers to direct classes.
clang-tidy warning: readability-static-accessed-through-instance
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 08d2bfb91..c77232591 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -578,10 +578,10 @@ void Viewport::mousePressed(MouseEvent &event) } // If a popup is active, just remove it - if (popupManager->isPopupMenuVisible()) + if (PopupManager::isPopupMenuVisible()) { mPlayerFollowMouse = false; - popupManager->hidePopupMenu(); + PopupManager::hidePopupMenu(); return; } @@ -940,13 +940,13 @@ void Viewport::mouseMoved(MouseEvent &event) || type == ActorType::Mercenary || type == ActorType::Pet)) { - popupManager->hideTextPopup(); + PopupManager::hideTextPopup(); if (mShowBeingPopup && (beingPopup != nullptr)) beingPopup->show(mMouseX, mMouseY, mHoverBeing); } else { - popupManager->hideBeingPopup(); + PopupManager::hideBeingPopup(); } mHoverItem = actorManager->findItem(x / mMap->getTileWidth(), @@ -968,7 +968,7 @@ void Viewport::mouseMoved(MouseEvent &event) { if (!mHoverSign->getComment().empty()) { - popupManager->hideBeingPopup(); + PopupManager::hideBeingPopup(); if (textPopup != nullptr) { textPopup->show(mMouseX, mMouseY, @@ -977,16 +977,19 @@ void Viewport::mouseMoved(MouseEvent &event) } else { - if (popupManager->isTextPopupVisible()) - popupManager->hideTextPopup(); + if (PopupManager::isTextPopupVisible()) + PopupManager::hideTextPopup(); } gui->setCursorType(Cursor::CURSOR_UP); return; } } } - if (!event.isConsumed() && popupManager->isTextPopupVisible()) - popupManager->hideTextPopup(); + if (!event.isConsumed() && + PopupManager::isTextPopupVisible()) + { + PopupManager::hideTextPopup(); + } if (mHoverBeing != nullptr) { |