summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-30 22:43:27 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-30 22:43:27 +0300
commitb1fa35079365cd92d6a719f5d95e17285bd17659 (patch)
tree60a52a821318400aed9b5408f57aecb60e3eb16f /src/gui/widgets/tabs
parentb78cc1c9f70f7add1c66c6a40b55b9add71de6df (diff)
downloadmanaplus-b1fa35079365cd92d6a719f5d95e17285bd17659.tar.gz
manaplus-b1fa35079365cd92d6a719f5d95e17285bd17659.tar.bz2
manaplus-b1fa35079365cd92d6a719f5d95e17285bd17659.tar.xz
manaplus-b1fa35079365cd92d6a719f5d95e17285bd17659.zip
Add karma field in debug window in target tab.
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r--src/gui/widgets/tabs/debugwindowtabs.cpp14
-rw-r--r--src/gui/widgets/tabs/debugwindowtabs.h1
2 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/widgets/tabs/debugwindowtabs.cpp b/src/gui/widgets/tabs/debugwindowtabs.cpp
index 8e625ac70..818879d95 100644
--- a/src/gui/widgets/tabs/debugwindowtabs.cpp
+++ b/src/gui/widgets/tabs/debugwindowtabs.cpp
@@ -280,7 +280,9 @@ TargetDebugTab::TargetDebugTab(const Widget2 *const widget) :
// TRANSLATORS: debug window label
mMaxHitLabel(new Label(this, strprintf("%s ?", _("Maximum hit:")))),
// TRANSLATORS: debug window label
- mCriticalHitLabel(new Label(this, strprintf("%s ?", _("Critical hit:"))))
+ mCriticalHitLabel(new Label(this, strprintf("%s ?", _("Critical hit:")))),
+ // TRANSLATORS: debug window label
+ mKarmaLabel(new Label(this, strprintf("%s ?", _("Karma:"))))
{
LayoutHelper h(this);
ContainerPlacer place = h.getPlacer(0, 0);
@@ -296,6 +298,7 @@ TargetDebugTab::TargetDebugTab(const Widget2 *const widget) :
place(0, 8, mMinHitLabel, 2);
place(0, 9, mMaxHitLabel, 2);
place(0, 10, mCriticalHitLabel, 2);
+ place(0, 11, mKarmaLabel, 2);
place.getCell().matchColWidth(0, 0);
place = h.getPlacer(0, 1);
@@ -354,6 +357,9 @@ void TargetDebugTab::logic()
mCriticalHitLabel->setCaption(strprintf("%s %d",
// TRANSLATORS: debug window label
_("Critical hit:"), target->getCriticalHit()));
+ mKarmaLabel->setCaption(strprintf("%s %d",
+ // TRANSLATORS: debug window label
+ _("Karma:"), target->getKarma()));
const int delay = target->getAttackDelay();
if (delay)
@@ -391,6 +397,8 @@ void TargetDebugTab::logic()
mMaxHitLabel->setCaption(strprintf("%s ?", _("Maximum hit:")));
// TRANSLATORS: debug window label
mCriticalHitLabel->setCaption(strprintf("%s ?", _("Critical hit:")));
+ // TRANSLATORS: debug window label
+ mKarmaLabel->setCaption(strprintf("%s ?", _("Karma:")));
}
mTargetLabel->adjustSize();
@@ -400,6 +408,10 @@ void TargetDebugTab::logic()
mTargetPartyLabel->adjustSize();
mTargetGuildLabel->adjustSize();
mAttackDelayLabel->adjustSize();
+ mMinHitLabel->adjustSize();
+ mMaxHitLabel->adjustSize();
+ mCriticalHitLabel->adjustSize();
+ mKarmaLabel->adjustSize();
BLOCK_END("TargetDebugTab::logic")
}
diff --git a/src/gui/widgets/tabs/debugwindowtabs.h b/src/gui/widgets/tabs/debugwindowtabs.h
index d44fe8dc4..9341353de 100644
--- a/src/gui/widgets/tabs/debugwindowtabs.h
+++ b/src/gui/widgets/tabs/debugwindowtabs.h
@@ -102,6 +102,7 @@ class TargetDebugTab final : public DebugTab
Label *mMinHitLabel;
Label *mMaxHitLabel;
Label *mCriticalHitLabel;
+ Label *mKarmaLabel;
};
class NetDebugTab final : public DebugTab