Add config-defined tooltip to header building blocks stock

Implement REQ-UI-BLOCKS-TOOLTIP: an optional world.toml
[world].building_blocks_tooltip, threaded into HeaderBar via a new
const GameConfig* parameter and shown as the building blocks stock label's
hover tooltip. Omitted when unset. Author the text in the app config and
extend ConfigLoaderTest to cover the field.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
This commit is contained in:
2026-07-12 20:37:22 +02:00
parent cd8bf1a8b3
commit 3d4c0445d1
8 changed files with 29 additions and 3 deletions

View File

@@ -9,6 +9,7 @@
#include "BuildingBlocksChangedEvent.h"
#include "EventHandler.h"
#include "ExpansionCostChangedEvent.h"
#include "GameConfig.h"
#include "GameSpeedChangedEvent.h"
#include "Tick.h"
#include "TickAdvancedEvent.h"
@@ -27,7 +28,7 @@ class HeaderBar : public QWidget,
Q_OBJECT
public:
explicit HeaderBar(QWidget* parent = nullptr);
explicit HeaderBar(const GameConfig* config, QWidget* parent = nullptr);
~HeaderBar() override;
private slots: