summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-23 19:37:38 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-23 19:37:38 +0300
commit5fc7ef5ed9394e613341cd4f98d908bb8483b2fd (patch)
tree46023a9726d2aee0f65d01f1d93bea78799a1036 /src
parent4aaa299b111d07d7e4425e60a888e8496b9da5c1 (diff)
downloadplus-5fc7ef5ed9394e613341cd4f98d908bb8483b2fd.tar.gz
plus-5fc7ef5ed9394e613341cd4f98d908bb8483b2fd.tar.bz2
plus-5fc7ef5ed9394e613341cd4f98d908bb8483b2fd.tar.xz
plus-5fc7ef5ed9394e613341cd4f98d908bb8483b2fd.zip
Remove default parameters from outfitswindow.
Diffstat (limited to 'src')
-rw-r--r--src/being/crazymoves.cpp4
-rw-r--r--src/gui/windows/outfitwindow.cpp23
-rw-r--r--src/gui/windows/outfitwindow.h9
-rw-r--r--src/progs/manaplus/actions/actions.cpp4
-rw-r--r--src/progs/manaplus/actions/move.cpp4
5 files changed, 29 insertions, 15 deletions
diff --git a/src/being/crazymoves.cpp b/src/being/crazymoves.cpp
index e2d960aa4..0fe46791d 100644
--- a/src/being/crazymoves.cpp
+++ b/src/being/crazymoves.cpp
@@ -725,13 +725,13 @@ void CrazyMoves::crazyMoveAo() const
if (mMoveProgram[settings.crazyMoveState] == 'n')
{
settings.crazyMoveState ++;
- outfitWindow->wearNextOutfit();
+ outfitWindow->wearNextOutfit(false);
}
// wear previous outfit
else if (mMoveProgram[settings.crazyMoveState] == 'p')
{
settings.crazyMoveState ++;
- outfitWindow->wearPreviousOutfit();
+ outfitWindow->wearPreviousOutfit(false);
}
}
}
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index 3d190ad00..de6319b4c 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -254,7 +254,9 @@ void OutfitWindow::action(const ActionEvent &event)
}
else if (eventId == "equip")
{
- wearOutfit(mCurrentOutfit);
+ wearOutfit(mCurrentOutfit,
+ true,
+ false);
if (Game::instance() != nullptr)
Game::instance()->setValidSpeed();
}
@@ -266,7 +268,8 @@ void OutfitWindow::action(const ActionEvent &event)
}
}
-void OutfitWindow::wearOutfit(const int outfit, const bool unwearEmpty,
+void OutfitWindow::wearOutfit(const int outfit,
+ const bool unwearEmpty,
const bool select)
{
bool isEmpty = true;
@@ -647,7 +650,9 @@ void OutfitWindow::wearNextOutfit(const bool all)
}
}
}
- wearOutfit(mCurrentOutfit);
+ wearOutfit(mCurrentOutfit,
+ true,
+ false);
}
void OutfitWindow::wearPreviousOutfit(const bool all)
@@ -669,7 +674,9 @@ void OutfitWindow::wearPreviousOutfit(const bool all)
}
}
}
- wearOutfit(mCurrentOutfit);
+ wearOutfit(mCurrentOutfit,
+ true,
+ false);
}
void OutfitWindow::copyFromEquiped()
@@ -701,12 +708,16 @@ void OutfitWindow::copyFromEquiped(const int dst)
void OutfitWindow::wearAwayOutfit()
{
copyFromEquiped(OUTFITS_COUNT);
- wearOutfit(mAwayOutfit, false);
+ wearOutfit(mAwayOutfit,
+ false,
+ false);
}
void OutfitWindow::unwearAwayOutfit()
{
- wearOutfit(OUTFITS_COUNT);
+ wearOutfit(OUTFITS_COUNT,
+ true,
+ false);
}
void OutfitWindow::clearCurrentOutfit()
diff --git a/src/gui/windows/outfitwindow.h b/src/gui/windows/outfitwindow.h
index cf2799d2b..14c7fd3ce 100644
--- a/src/gui/windows/outfitwindow.h
+++ b/src/gui/windows/outfitwindow.h
@@ -66,8 +66,9 @@ class OutfitWindow final : public Window,
void load();
- void wearOutfit(const int outfit, const bool unwearEmpty = true,
- const bool select = false);
+ void wearOutfit(const int outfit,
+ const bool unwearEmpty,
+ const bool select);
void copyOutfit(const int outfit);
@@ -83,9 +84,9 @@ class OutfitWindow final : public Window,
void previous();
- void wearNextOutfit(const bool all = false);
+ void wearNextOutfit(const bool all);
- void wearPreviousOutfit(const bool all = false);
+ void wearPreviousOutfit(const bool all);
void wearAwayOutfit();
diff --git a/src/progs/manaplus/actions/actions.cpp b/src/progs/manaplus/actions/actions.cpp
index 64512517b..715192bf9 100644
--- a/src/progs/manaplus/actions/actions.cpp
+++ b/src/progs/manaplus/actions/actions.cpp
@@ -345,7 +345,9 @@ impHandler(outfit)
const int num = event.action - InputAction::OUTFIT_1;
if ((outfitWindow != nullptr) && num >= 0)
{
- outfitWindow->wearOutfit(num);
+ outfitWindow->wearOutfit(num,
+ true,
+ false);
if (Game::instance() != nullptr)
Game::instance()->setValidSpeed();
return true;
diff --git a/src/progs/manaplus/actions/move.cpp b/src/progs/manaplus/actions/move.cpp
index ea4088f61..d7c73eb1f 100644
--- a/src/progs/manaplus/actions/move.cpp
+++ b/src/progs/manaplus/actions/move.cpp
@@ -104,7 +104,7 @@ impHandler(moveLeft)
if (outfitWindow != nullptr &&
inputManager.isActionActive(InputAction::WEAR_OUTFIT))
{
- outfitWindow->wearPreviousOutfit();
+ outfitWindow->wearPreviousOutfit(false);
if (Game::instance() != nullptr)
Game::instance()->setValidSpeed();
return true;
@@ -125,7 +125,7 @@ impHandler(moveRight)
if (outfitWindow != nullptr &&
inputManager.isActionActive(InputAction::WEAR_OUTFIT))
{
- outfitWindow->wearNextOutfit();
+ outfitWindow->wearNextOutfit(false);
if (Game::instance() != nullptr)
Game::instance()->setValidSpeed();
return true;