diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-25 22:03:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-25 22:03:28 +0300 |
commit | d670395fff93f805b666e0cc4cc56cdb880e0bba (patch) | |
tree | e7949649a7c0568b3b238c91092f60606a495f9f /src/gui | |
parent | 7d6d3d997614e8e76ca9044ca8ed5a81d3b14a95 (diff) | |
download | plus-d670395fff93f805b666e0cc4cc56cdb880e0bba.tar.gz plus-d670395fff93f805b666e0cc4cc56cdb880e0bba.tar.bz2 plus-d670395fff93f805b666e0cc4cc56cdb880e0bba.tar.xz plus-d670395fff93f805b666e0cc4cc56cdb880e0bba.zip |
Use all methods in gamemodifiers as static.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 3 | ||||
-rw-r--r-- | src/gui/popups/statuspopup.cpp | 33 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 31 |
3 files changed, 30 insertions, 37 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 1712ce34b..50b725a5d 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -1722,8 +1722,7 @@ void PopupMenu::handleLink(const std::string &link, } else if (link == "reset yellow") { - if (modifiers) - modifiers->resetModifiers(); + GameModifiers::resetModifiers(); } else if (link == "bar to chat" && !mNick.empty()) { diff --git a/src/gui/popups/statuspopup.cpp b/src/gui/popups/statuspopup.cpp index 235d2aee6..fd696c568 100644 --- a/src/gui/popups/statuspopup.cpp +++ b/src/gui/popups/statuspopup.cpp @@ -137,37 +137,34 @@ void StatusPopup::setLabelText(const int num, void StatusPopup::updateLabels() const { - if (!modifiers) - return; - - setLabelText(0, modifiers->getMoveTypeString(), + setLabelText(0, GameModifiers::getMoveTypeString(), InputAction::INVERT_DIRECTION); - setLabelText(1, modifiers->getCrazyMoveTypeString(), + setLabelText(1, GameModifiers::getCrazyMoveTypeString(), InputAction::CHANGE_CRAZY_MOVES_TYPE); - setLabelText(2, modifiers->getMoveToTargetTypeString(), + setLabelText(2, GameModifiers::getMoveToTargetTypeString(), InputAction::CHANGE_MOVE_TO_TARGET); - setLabelText(3, modifiers->getFollowModeString(), + setLabelText(3, GameModifiers::getFollowModeString(), InputAction::CHANGE_FOLLOW_MODE); - setLabelText(4, modifiers->getAttackWeaponTypeString(), + setLabelText(4, GameModifiers::getAttackWeaponTypeString(), InputAction::CHANGE_ATTACK_WEAPON_TYPE); - setLabelText(5, modifiers->getAttackTypeString(), + setLabelText(5, GameModifiers::getAttackTypeString(), InputAction::CHANGE_ATTACK_TYPE); - setLabelText(6, modifiers->getQuickDropCounterString(), + setLabelText(6, GameModifiers::getQuickDropCounterString(), InputAction::SWITCH_QUICK_DROP); - setLabelText(7, modifiers->getPickUpTypeString(), + setLabelText(7, GameModifiers::getPickUpTypeString(), InputAction::CHANGE_PICKUP_TYPE); - setLabelText(8, modifiers->getMapDrawTypeString(), + setLabelText(8, GameModifiers::getMapDrawTypeString(), InputAction::PATHFIND); - setLabelText(9, modifiers->getMagicAttackTypeString(), + setLabelText(9, GameModifiers::getMagicAttackTypeString(), InputAction::SWITCH_MAGIC_ATTACK); - setLabelText(10, modifiers->getPvpAttackTypeString(), + setLabelText(10, GameModifiers::getPvpAttackTypeString(), InputAction::SWITCH_PVP_ATTACK); - setLabelText(11, modifiers->getGameModifiersString(), + setLabelText(11, GameModifiers::getGameModifiersString(), InputAction::DISABLE_GAME_MODIFIERS); - setLabelText(12, modifiers->getImitationModeString(), + setLabelText(12, GameModifiers::getImitationModeString(), InputAction::CHANGE_IMITATION_MODE); - setLabelText(13, modifiers->getAwayModeString(), + setLabelText(13, GameModifiers::getAwayModeString(), InputAction::AWAY); - setLabelText(14, modifiers->getCameraModeString(), + setLabelText(14, GameModifiers::getCameraModeString(), InputAction::CAMERA); } diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index adde623bb..c5f2b29d3 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -640,27 +640,24 @@ std::string StatusWindow::translateLetter2(const std::string &letters) void StatusWindow::updateStatusBar(ProgressBar *const bar, const bool percent A_UNUSED) const { - if (!modifiers) - return; - - bar->setText(translateLetter2(modifiers->getMoveTypeString()) - .append(translateLetter2(modifiers->getCrazyMoveTypeString())) - .append(translateLetter2(modifiers->getMoveToTargetTypeString())) - .append(translateLetter2(modifiers->getFollowModeString())) + bar->setText(translateLetter2(GameModifiers::getMoveTypeString()) + .append(translateLetter2(GameModifiers::getCrazyMoveTypeString())) + .append(translateLetter2(GameModifiers::getMoveToTargetTypeString())) + .append(translateLetter2(GameModifiers::getFollowModeString())) .append(" ").append(translateLetter2( - modifiers->getAttackWeaponTypeString())) - .append(translateLetter2(modifiers->getAttackTypeString())) - .append(translateLetter2(modifiers->getMagicAttackTypeString())) - .append(translateLetter2(modifiers->getPvpAttackTypeString())) + GameModifiers::getAttackWeaponTypeString())) + .append(translateLetter2(GameModifiers::getAttackTypeString())) + .append(translateLetter2(GameModifiers::getMagicAttackTypeString())) + .append(translateLetter2(GameModifiers::getPvpAttackTypeString())) .append(" ").append(translateLetter2( - modifiers->getQuickDropCounterString())) - .append(translateLetter2(modifiers->getPickUpTypeString())) + GameModifiers::getQuickDropCounterString())) + .append(translateLetter2(GameModifiers::getPickUpTypeString())) .append(" ").append(translateLetter2( - modifiers->getMapDrawTypeString())) + GameModifiers::getMapDrawTypeString())) .append(" ").append(translateLetter2( - modifiers->getImitationModeString())) - .append(translateLetter2(modifiers->getCameraModeString())) - .append(translateLetter2(modifiers->getAwayModeString()))); + GameModifiers::getImitationModeString())) + .append(translateLetter2(GameModifiers::getCameraModeString())) + .append(translateLetter2(GameModifiers::getAwayModeString()))); bar->setProgress(50); if (settings.disableGameModifiers) |