Add tooltip for building blocks in header bar

This commit is contained in:
2026-07-12 21:24:11 +02:00
parent 177809fe1a
commit ad3e73fdd8
9 changed files with 31 additions and 4 deletions

View File

@@ -17,7 +17,7 @@
const double HeaderBar::kSpeeds[] = { 0.0, 0.5, 1.0, 2.0, 10.0 };
const int HeaderBar::kSpeedCount = 5;
HeaderBar::HeaderBar(QWidget* parent)
HeaderBar::HeaderBar(const GameConfig* config, QWidget* parent)
: QWidget(parent)
{
QHBoxLayout* layout = new QHBoxLayout(this);
@@ -26,6 +26,11 @@ HeaderBar::HeaderBar(QWidget* parent)
m_timeLabel = new QLabel("00:00", this);
m_blocksLabel = new QLabel(tr("Building Blocks: 0"), this);
if (config->world.buildingBlocksTooltip)
{
m_blocksLabel->setToolTip(
QString::fromStdString(*config->world.buildingBlocksTooltip));
}
m_artifactsLabel = new QLabel(tr("Artifacts: 0/?"), this);
m_bossLabel = new QLabel(tr("Boss Wave #1 Next boss: 5:00"), this);
layout->addWidget(m_timeLabel);