diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-01-26 02:34:03 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-01-26 02:34:03 +0200 |
commit | b2d7d2f28f86955f73b7246a4e14aef0be39d847 (patch) | |
tree | dd373211f8c033f3040aeed8aa8e55f0998a5951 /src/gui/setup_other.cpp | |
parent | 88d896d9bc248bc518fe447e43a95cb36a635446 (diff) | |
download | mv-b2d7d2f28f86955f73b7246a4e14aef0be39d847.tar.gz mv-b2d7d2f28f86955f73b7246a4e14aef0be39d847.tar.bz2 mv-b2d7d2f28f86955f73b7246a4e14aef0be39d847.tar.xz mv-b2d7d2f28f86955f73b7246a4e14aef0be39d847.zip |
Add option to show/hide job messages.
Diffstat (limited to 'src/gui/setup_other.cpp')
-rw-r--r-- | src/gui/setup_other.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/setup_other.cpp b/src/gui/setup_other.cpp index 41a6c41ab..e7ddfcef0 100644 --- a/src/gui/setup_other.cpp +++ b/src/gui/setup_other.cpp @@ -63,6 +63,7 @@ #define ACTION_AUTO_SHOP "auto shop" #define ACTION_SHOW_MOB_HP "show mob hp" #define ACTION_SHOW_OWN_HP "show own hp" +#define ACTION_SHOW_JOB_EXP "show job exp" Setup_Other::Setup_Other(): mShowMonstersTakedDamage(config.getBoolValue("showMonstersTakedDamage")), @@ -88,6 +89,7 @@ Setup_Other::Setup_Other(): mAutoShop(config.getBoolValue("autoShop")), mShowMobHP(config.getBoolValue("showMobHP")), mShowOwnHP(config.getBoolValue("showOwnHP")), + mShowJobExp(config.getBoolValue("showJobExp")), mEditDialog(0) { setName(_("Misc")); @@ -183,6 +185,10 @@ Setup_Other::Setup_Other(): mShowOwnHP, this, ACTION_SHOW_OWN_HP); + mShowJobExpCheckBox = new CheckBox(_("Show job exp messages"), + mShowJobExp, + this, ACTION_SHOW_JOB_EXP); + // Do the layout LayoutHelper h(this); ContainerPlacer place = h.getPlacer(0, 0); @@ -198,6 +204,7 @@ Setup_Other::Setup_Other(): place(12, 5, mAutoShopCheckBox, 10); place(12, 6, mShowMobHPCheckBox, 10); place(12, 7, mShowOwnHPCheckBox, 10); + place(12, 8, mShowJobExpCheckBox, 10); place(0, 3, mFloorItemsHighlightCheckBox, 12); place(0, 4, mHighlightAttackRangeCheckBox, 12); place(0, 5, mHighlightMonsterAttackRangeCheckBox, 12); @@ -330,6 +337,10 @@ void Setup_Other::action(const gcn::ActionEvent &event) { mShowOwnHP = mShowOwnHPCheckBox->isSelected(); } + else if (event.getId() == ACTION_SHOW_JOB_EXP) + { + mShowJobExp = mShowJobExpCheckBox->isSelected(); + } } void Setup_Other::cancel() @@ -402,6 +413,9 @@ void Setup_Other::cancel() mShowOwnHP = config.getBoolValue("showOwnHP"); mShowOwnHPCheckBox->setSelected(mShowOwnHP); + + mShowJobExp = config.getBoolValue("showJobExp"); + mShowJobExpCheckBox->setSelected(mShowJobExp); } void Setup_Other::apply() @@ -429,6 +443,7 @@ void Setup_Other::apply() config.setValue("autoShop", mAutoShop); config.setValue("showMobHP", mShowMobHP); config.setValue("showOwnHP", mShowOwnHP); + config.setValue("showJobExp", mShowJobExp); logger->setDebugLog(mDebugLog); } |