summaryrefslogtreecommitdiff
path: root/src/gui/setup_other.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-11 01:34:11 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-11 01:34:11 +0200
commitfcced13d9972ac70f0f01f19583b7868e255b6a7 (patch)
tree9b01df102c5f9ba032ea0f9bc413dd707e99d88b /src/gui/setup_other.cpp
parent311783bebbe2bed366dca5097697ce34c690292d (diff)
parentef1b9856c86512fe73154c17da3ea98a7cd5f896 (diff)
downloadplus-fcced13d9972ac70f0f01f19583b7868e255b6a7.tar.gz
plus-fcced13d9972ac70f0f01f19583b7868e255b6a7.tar.bz2
plus-fcced13d9972ac70f0f01f19583b7868e255b6a7.tar.xz
plus-fcced13d9972ac70f0f01f19583b7868e255b6a7.zip
Merge branch 'master' into invfiler
Diffstat (limited to 'src/gui/setup_other.cpp')
-rw-r--r--src/gui/setup_other.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gui/setup_other.cpp b/src/gui/setup_other.cpp
index 54ec1c65d..5a2b77a81 100644
--- a/src/gui/setup_other.cpp
+++ b/src/gui/setup_other.cpp
@@ -63,6 +63,7 @@
#define ACTION_WARP_PARTICLE "warp particle"
#define ACTION_AUTO_SHOP "auto shop"
#define ACTION_SHOW_MOB_HP "show mob hp"
+#define ACTION_SHOW_OWN_HP "show own hp"
Setup_Other::Setup_Other():
mShowMonstersTakedDamage(config.getBoolValue("showMonstersTakedDamage")),
@@ -87,7 +88,8 @@ Setup_Other::Setup_Other():
mQuickStats(config.getBoolValue("quickStats")),
mWarpParticle(config.getBoolValue("warpParticle")),
mAutoShop(config.getBoolValue("autoShop")),
- mShowMobHP(config.getBoolValue("showMobHP"))
+ mShowMobHP(config.getBoolValue("showMobHP")),
+ mShowOwnHP(config.getBoolValue("showOwnHP"))
{
setName(_("Misc"));
@@ -178,6 +180,10 @@ Setup_Other::Setup_Other():
mShowMobHP,
this, ACTION_SHOW_MOB_HP);
+ mShowOwnHPCheckBox = new CheckBox(_("Show own hp bar"),
+ mShowOwnHP,
+ this, ACTION_SHOW_OWN_HP);
+
// Do the layout
LayoutHelper h(this);
ContainerPlacer place = h.getPlacer(0, 0);
@@ -192,6 +198,7 @@ Setup_Other::Setup_Other():
place(12, 4, mWarpParticleCheckBox, 10);
place(12, 5, mAutoShopCheckBox, 10);
place(12, 6, mShowMobHPCheckBox, 10);
+ place(12, 7, mShowOwnHPCheckBox, 10);
place(0, 3, mFloorItemsHighlightCheckBox, 12);
place(0, 4, mHighlightAttackRangeCheckBox, 12);
place(0, 5, mHighlightMonsterAttackRangeCheckBox, 12);
@@ -320,6 +327,10 @@ void Setup_Other::action(const gcn::ActionEvent &event)
{
mShowMobHP = mShowMobHPCheckBox->isSelected();
}
+ else if (event.getId() == ACTION_SHOW_OWN_HP)
+ {
+ mShowOwnHP = mShowOwnHPCheckBox->isSelected();
+ }
}
void Setup_Other::cancel()
@@ -389,6 +400,9 @@ void Setup_Other::cancel()
mShowMobHP = config.getBoolValue("showMobHP");
mShowMobHPCheckBox->setSelected(mShowMobHP);
+
+ mShowOwnHP = config.getBoolValue("showOwnHP");
+ mShowOwnHPCheckBox->setSelected(mShowOwnHP);
}
void Setup_Other::apply()
@@ -416,6 +430,7 @@ void Setup_Other::apply()
config.setValue("warpParticle", mWarpParticle);
config.setValue("autoShop", mAutoShop);
config.setValue("showMobHP", mShowMobHP);
+ config.setValue("showOwnHP", mShowOwnHP);
logger->setDebugLog(mDebugLog);
}