From b1fa35079365cd92d6a719f5d95e17285bd17659 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 30 Sep 2014 22:43:27 +0300 Subject: Add karma field in debug window in target tab. --- src/gui/widgets/tabs/debugwindowtabs.cpp | 14 +++++++++++++- src/gui/widgets/tabs/debugwindowtabs.h | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/gui') 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 -- cgit v1.2.3-60-g2f50