From 2a0193dde762755719bf0d1f6a8638829c68c183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Lach?= Date: Thu, 17 Nov 2022 16:15:49 +0100 Subject: [PATCH] =?UTF-8?q?!OSDN:=20Ticket:=20#45891=20:=20S=C5=82awomir?= =?UTF-8?q?=20Lach=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ruledit will show counter count in selected ruleset diff --git a/tools/ruledit/tab_misc.cpp b/tools/ruledit/tab_misc.cpp index 57090667eb..d6ff3c1aa4 100644 --- a/tools/ruledit/tab_misc.cpp +++ b/tools/ruledit/tab_misc.cpp @@ -35,6 +35,7 @@ // common #include "achievements.h" +#include "counters.h" #include "game.h" #include "government.h" #include "specialist.h" @@ -197,6 +198,10 @@ tab_misc::tab_misc(ruledit_gui *ui_in) : QWidget() stats->setItem(5, 3, item); item = new QTableWidgetItem("-"); stats->setItem(5, 4, item); + item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Counters"))); + stats->setItem(6, 3, item); + item = new QTableWidgetItem("-"); + stats->setItem(6, 4, item); item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Achievements"))); stats->setItem(0, 6, item); item = new QTableWidgetItem("-"); @@ -390,6 +395,14 @@ void tab_misc::refresh_stats() stats->item(row++, 4)->setText(QString::number(game.control.num_disaster_types)); + count = 0; + city_counters_iterate(pcount) { + (void) pcount; + count++; + } city_counters_iterate_end; + stats->item(row++, 4)->setText(QString::number(count)); + + // Third column row = 0; -- 2.39.0