diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/being/localplayer.cpp | 4 | ||||
-rw-r--r-- | src/being/localplayer.h | 6 | ||||
-rw-r--r-- | src/graphicsmanager.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/itemcontainer.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/serverslistbox.h | 6 | ||||
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 4 |
7 files changed, 12 insertions, 18 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 7c07e57cb..4ef9b7f9d 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -2487,7 +2487,7 @@ void LocalPlayer::setAfkMessage(std::string message) } } -void LocalPlayer::setPseudoAway(const std::string &message) const +void LocalPlayer::setPseudoAway(const std::string &message) { setAfkMessage(message); settings.pseudoAwayMode = !settings.pseudoAwayMode; @@ -3196,7 +3196,7 @@ void LocalPlayer::stopAdvert() mBlockAdvert = true; } -bool LocalPlayer::checAttackPermissions(const Being *const target) const +bool LocalPlayer::checAttackPermissions(const Being *const target) { if (!target) return false; diff --git a/src/being/localplayer.h b/src/being/localplayer.h index 71c80de8b..ed2b42b53 100644 --- a/src/being/localplayer.h +++ b/src/being/localplayer.h @@ -232,7 +232,7 @@ class LocalPlayer final : public Being, void setAway(const std::string &message) const; - void setPseudoAway(const std::string &message) const; + static void setPseudoAway(const std::string &message); void setHalfAway(const bool n) { mInactive = n; } @@ -370,8 +370,8 @@ class LocalPlayer final : public Being, void stopAdvert(); - bool checAttackPermissions(const Being *const target) - const A_WARN_UNUSED; + static bool checAttackPermissions(const Being *const target) + A_WARN_UNUSED; void updateStatus() const; diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h index 455632d07..f187eb254 100644 --- a/src/graphicsmanager.h +++ b/src/graphicsmanager.h @@ -78,7 +78,7 @@ class GraphicsManager final void createRenderers(); - void deleteRenderers(); + static void deleteRenderers(); void initGraphics(); diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 54bb74596..d3a57a71b 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -379,12 +379,6 @@ void ItemContainer::distributeValueChangedEvent() } } -void ItemContainer::hidePopup() -{ - if (itemPopup) - itemPopup->setVisible(false); -} - void ItemContainer::keyPressed(KeyEvent &event A_UNUSED) { } diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h index 42b4fa036..9ee1eed31 100644 --- a/src/gui/widgets/itemcontainer.h +++ b/src/gui/widgets/itemcontainer.h @@ -68,8 +68,6 @@ class ItemContainer final : public Widget, */ ~ItemContainer(); - void hidePopup(); - /** * Necessary for checking how full the inventory is. */ diff --git a/src/gui/widgets/serverslistbox.h b/src/gui/widgets/serverslistbox.h index e8ce0365d..ed26a8d3b 100644 --- a/src/gui/widgets/serverslistbox.h +++ b/src/gui/widgets/serverslistbox.h @@ -114,9 +114,9 @@ class ServersListBox final : public ListBox if (!info.description.empty()) { font2->drawString(graphics, - info.description, - x, - y + mPadding); + info.description, + x, + y + mPadding); } font2->drawString(graphics, model->getElementAt(i), diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 2c38c0358..c1bdafe7b 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -39,6 +39,7 @@ #include "gui/models/sortlistmodelinv.h" +#include "gui/popups/itempopup.h" #include "gui/popups/popupmenu.h" #include "gui/popups/textpopup.h" @@ -414,7 +415,8 @@ void InventoryWindow::unselectItem() void InventoryWindow::widgetHidden(const Event &event) { Window::widgetHidden(event); - mItems->hidePopup(); + if (itemPopup) + itemPopup->setVisible(false); } void InventoryWindow::mouseClicked(MouseEvent &event) |