show recipes visually instead of describing them in text

This commit is contained in:
2026-08-11 21:40:36 +02:00
parent 3274df91d4
commit f255224ccd
38 changed files with 1023 additions and 452 deletions

View File

@@ -14,7 +14,10 @@
#include "ShipLayout.h"
#include "ShipLayoutBlueprint.h"
class ItemIconCache;
class QPushButton;
class RecipeLineRow;
class SectionBox;
class ShipStatsPanel;
class ShipLayoutDialog : public QDialog
@@ -22,12 +25,15 @@ class ShipLayoutDialog : public QDialog
Q_OBJECT
public:
// itemIcons draws what each module costs and what the layout costs in total
// (REQ-MOD-UI-DIALOG, REQ-MOD-UI-STATS-PANEL). Not owned.
ShipLayoutDialog(const GameConfig* config,
const std::string& shipId,
const ShipLayoutConfig& currentLayout,
std::vector<ShipLayoutBlueprint>& allBlueprints,
std::set<std::string> unlockedModuleIds,
bool debugDraw,
ItemIconCache* itemIcons,
QWidget* parent = nullptr);
std::optional<ShipLayoutConfig> getResult() const;
@@ -60,6 +66,7 @@ private:
void loadLayoutBlueprint(const std::vector<PlacedModule>& modules);
const GameConfig* m_config;
ItemIconCache* m_itemIcons;
std::string m_shipId;
std::set<std::string> m_unlockedModuleIds;
std::vector<std::string> m_shipLayout;
@@ -81,6 +88,8 @@ private:
QPushButton* m_removeButton;
QWidget* m_gridWidget;
ShipStatsPanel* m_statsPanel;
SectionBox* m_buildCostSection;
RecipeLineRow* m_buildCostLine;
bool m_debugDraw;
std::optional<ShipLayoutConfig> m_result;