From 28e10f7225551b1dc2e1f35b8d4d145db528e4c7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 4 Mar 2013 16:09:49 +0300 Subject: Add "target type" filed in debug window. --- src/gui/debugwindow.cpp | 23 +++++++++++++++-------- src/gui/debugwindow.h | 1 + 2 files changed, 16 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp index 1a957345a..781068c6c 100644 --- a/src/gui/debugwindow.cpp +++ b/src/gui/debugwindow.cpp @@ -292,6 +292,8 @@ TargetDebugTab::TargetDebugTab(const Widget2 *const widget) : DebugTab(widget), mTargetLabel(new Label(this, strprintf("%s ?", _("Target:")))), mTargetIdLabel(new Label(this, strprintf("%s ? ", _("Target Id:")))), + mTargetTypeLabel(new Label(this, strprintf( + "%s ? ", _("Target type:")))), mTargetLevelLabel(new Label(this, strprintf("%s ?", _("Target level:")))), mTargetRaceLabel(new Label(this, strprintf("%s ?", _("Target race:")))), mTargetPartyLabel(new Label(this, strprintf("%s ?", _("Target party:")))), @@ -306,14 +308,15 @@ TargetDebugTab::TargetDebugTab(const Widget2 *const widget) : place(0, 0, mTargetLabel, 2); place(0, 1, mTargetIdLabel, 2); - place(0, 2, mTargetLevelLabel, 2); - place(0, 3, mTargetRaceLabel, 2); - place(0, 4, mAttackDelayLabel, 2); - place(0, 5, mTargetPartyLabel, 2); - place(0, 6, mTargetGuildLabel, 2); - place(0, 7, mMinHitLabel, 2); - place(0, 8, mMaxHitLabel, 2); - place(0, 9, mCriticalHitLabel, 2); + place(0, 2, mTargetTypeLabel, 2); + place(0, 3, mTargetLevelLabel, 2); + place(0, 4, mTargetRaceLabel, 2); + place(0, 5, mAttackDelayLabel, 2); + place(0, 6, mTargetPartyLabel, 2); + place(0, 7, mTargetGuildLabel, 2); + place(0, 8, mMinHitLabel, 2); + place(0, 9, mMaxHitLabel, 2); + place(0, 10, mCriticalHitLabel, 2); place.getCell().matchColWidth(0, 0); place = h.getPlacer(0, 1); @@ -332,6 +335,8 @@ void TargetDebugTab::logic() mTargetIdLabel->setCaption(strprintf("%s %d", _("Target Id:"), target->getId())); + mTargetTypeLabel->setCaption(strprintf("%s %d", + _("Target type:"), target->getSubType())); if (target->getLevel()) { mTargetLevelLabel->setCaption(strprintf("%s %d", @@ -375,6 +380,7 @@ void TargetDebugTab::logic() { mTargetLabel->setCaption(strprintf("%s ?", _("Target:"))); mTargetIdLabel->setCaption(strprintf("%s ?", _("Target Id:"))); + mTargetTypeLabel->setCaption(strprintf("%s ?", _("Target type:"))); mTargetLevelLabel->setCaption(strprintf("%s ?", _("Target Level:"))); mTargetPartyLabel->setCaption(strprintf("%s ?", _("Target Party:"))); mTargetGuildLabel->setCaption(strprintf("%s ?", _("Target Guild:"))); @@ -386,6 +392,7 @@ void TargetDebugTab::logic() mTargetLabel->adjustSize(); mTargetIdLabel->adjustSize(); + mTargetTypeLabel->adjustSize(); mTargetLevelLabel->adjustSize(); mTargetPartyLabel->adjustSize(); mTargetGuildLabel->adjustSize(); diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h index e0842f7ce..14265a6cc 100644 --- a/src/gui/debugwindow.h +++ b/src/gui/debugwindow.h @@ -94,6 +94,7 @@ class TargetDebugTab final : public DebugTab private: Label *mTargetLabel; Label *mTargetIdLabel; + Label *mTargetTypeLabel; Label *mTargetLevelLabel; Label *mTargetRaceLabel; Label *mTargetPartyLabel; -- cgit v1.2.3-70-g09d2