share a single ItemIconCache across the UI

This commit is contained in:
2026-08-03 21:08:19 +02:00
parent b4e622daa5
commit e02e323cb2
10 changed files with 46 additions and 43 deletions

View File

@@ -27,6 +27,7 @@ class HeaderBar;
class SelectedBuildingPanel;
class BuildButtonGrid;
class BlueprintPanel;
class ItemIconCache;
class QCloseEvent;
class QResizeEvent;
@@ -68,6 +69,9 @@ private:
std::string m_configDir;
VisualsConfig m_visuals;
Simulation* m_sim;
// One per-item icon cache for the whole window (REQ-UI-ITEM-ICON): the header,
// build grid, world view, and recipe dialog all rasterize the same SVGs.
std::unique_ptr<ItemIconCache> m_itemIcons;
GameWorldView* m_gameWorldView;
HeaderBar* m_headerBar;
SelectedBuildingPanel* m_selectedBuildingPanel;