summaryrefslogtreecommitdiff
path: root/src/gui/statuspopup.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-13 04:57:16 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-13 04:57:16 +0300
commit4d453108f45f9fb2ff4f5715cc1b3ddd63d36a80 (patch)
treec1edb8d8b368fdd43cd8639e6044b0f4e8dde70a /src/gui/statuspopup.cpp
parentece00592ecd93f7a96db0ca82589d00846e2f938 (diff)
parentd471e99fd38ac589a8a9e8e8677b9f577f0cc5c6 (diff)
downloadplus-4d453108f45f9fb2ff4f5715cc1b3ddd63d36a80.tar.gz
plus-4d453108f45f9fb2ff4f5715cc1b3ddd63d36a80.tar.bz2
plus-4d453108f45f9fb2ff4f5715cc1b3ddd63d36a80.tar.xz
plus-4d453108f45f9fb2ff4f5715cc1b3ddd63d36a80.zip
Merge branch 'master' into strippedstripped1.1.11.12
Conflicts: data/fonts/mplus-1p-bold.ttf data/fonts/mplus-1p-regular.ttf src/guichan/basiccontainer.cpp src/guichan/focushandler.cpp src/guichan/graphics.cpp src/guichan/gui.cpp src/guichan/image.cpp src/guichan/include/guichan/widgets/checkbox.hpp src/guichan/include/guichan/widgets/dropdown.hpp src/guichan/sdl/sdlgraphics.cpp src/guichan/sdl/sdlimage.cpp src/guichan/widget.cpp src/guichan/widgets/dropdown.cpp src/guichan/widgets/icon.cpp src/guichan/widgets/imagebutton.cpp src/guichan/widgets/listbox.cpp src/guichan/widgets/scrollarea.cpp src/guichan/widgets/tab.cpp src/guichan/widgets/tabbedarea.cpp src/guichan/widgets/textbox.cpp src/guichan/widgets/window.cpp
Diffstat (limited to 'src/gui/statuspopup.cpp')
-rw-r--r--src/gui/statuspopup.cpp48
1 files changed, 40 insertions, 8 deletions
diff --git a/src/gui/statuspopup.cpp b/src/gui/statuspopup.cpp
index a0c8e06d4..5f2ec71e3 100644
--- a/src/gui/statuspopup.cpp
+++ b/src/gui/statuspopup.cpp
@@ -75,29 +75,33 @@ StatusPopup::StatusPopup():
mMagicAttackType->setPosition(getPadding(),
4 + 6 * fontHeight + getPadding());
+ mPvpAttackType = new Label;
+ mPvpAttackType->setPosition(getPadding(),
+ 4 + 7 * fontHeight + getPadding());
+
mDropCounter = new Label;
- mDropCounter->setPosition(getPadding(), 8 + 7 * fontHeight + getPadding());
+ mDropCounter->setPosition(getPadding(), 8 + 8 * fontHeight + getPadding());
mPickUpType = new Label;
- mPickUpType->setPosition(getPadding(), 8 + 8 * fontHeight + getPadding());
+ mPickUpType->setPosition(getPadding(), 8 + 9 * fontHeight + getPadding());
mMapType = new Label;
- mMapType->setPosition(getPadding(), 12 + 9 * fontHeight + getPadding());
+ mMapType->setPosition(getPadding(), 12 + 10 * fontHeight + getPadding());
mImitationMode = new Label;
mImitationMode->setPosition(getPadding(),
- 16 + 10 * fontHeight + getPadding());
+ 16 + 11 * fontHeight + getPadding());
mAwayMode = new Label;
- mAwayMode->setPosition(getPadding(), 16 + 11 * fontHeight + getPadding());
+ mAwayMode->setPosition(getPadding(), 16 + 12 * fontHeight + getPadding());
mCameraMode = new Label;
mCameraMode->setPosition(getPadding(),
- 16 + 12 * fontHeight + getPadding());
+ 16 + 13 * fontHeight + getPadding());
mDisableGameModifiers = new Label;
mDisableGameModifiers->setPosition(getPadding(),
- 20 + 13 * fontHeight + getPadding());
+ 20 + 14 * fontHeight + getPadding());
add(mMoveType);
add(mCrazyMoveType);
@@ -109,6 +113,7 @@ StatusPopup::StatusPopup():
add(mPickUpType);
add(mMapType);
add(mMagicAttackType);
+ add(mPvpAttackType);
add(mDisableGameModifiers);
add(mImitationMode);
add(mAwayMode);
@@ -145,6 +150,8 @@ void StatusPopup::update()
minWidth = mMapType->getWidth();
if (mMagicAttackType->getWidth() > minWidth)
minWidth = mMagicAttackType->getWidth();
+ if (mPvpAttackType->getWidth() > minWidth)
+ minWidth = mPvpAttackType->getWidth();
if (mDisableGameModifiers->getWidth() > minWidth)
minWidth = mDisableGameModifiers->getWidth();
if (mAwayMode->getWidth() > minWidth)
@@ -476,6 +483,31 @@ void StatusPopup::updateLabels()
}
mMagicAttackType->adjustSize();
+ switch (player_node->getPvpAttackType())
+ {
+ case 0:
+ setLabelText(mPvpAttackType, _("(a) attack all players"),
+ keyboard.KEY_SWITCH_PVP_ATTACK);
+ break;
+ case 1:
+ setLabelText(mPvpAttackType, _("(f) attack not friends"),
+ keyboard.KEY_SWITCH_PVP_ATTACK);
+ break;
+ case 2:
+ setLabelText(mPvpAttackType, _("(b) attack bad relations"),
+ keyboard.KEY_SWITCH_PVP_ATTACK);
+ break;
+ case 3:
+ setLabelText(mPvpAttackType, _("(d) dont attack players"),
+ keyboard.KEY_SWITCH_PVP_ATTACK);
+ break;
+ default:
+ setLabelText(mMagicAttackType, _("(?) pvp attack"),
+ keyboard.KEY_SWITCH_MAGIC_ATTACK);
+ break;
+ }
+ mPvpAttackType->adjustSize();
+
switch (player_node->getImitationMode())
{
case 0:
@@ -493,7 +525,7 @@ void StatusPopup::updateLabels()
}
mImitationMode->adjustSize();
- switch ((int)player_node->getAwayMode())
+ switch ((int)player_node->getAway())
{
case 0:
setLabelText(mAwayMode, _("(O) on keyboard"), keyboard.KEY_AWAY);