schematic selection dialog

This commit is contained in:
2026-06-13 12:00:05 +02:00
parent 1641189b75
commit 49f7129bd5
25 changed files with 453 additions and 268 deletions

View File

@@ -13,7 +13,7 @@
#include <QVector2D>
#include "Blueprint.h"
#include "SchematicDropEvent.h"
#include "SchematicChoiceOption.h"
#include "BuildingType.h"
#include "BuildingId.h"
#include "FireEvent.h"
@@ -125,15 +125,7 @@ private:
QVector2D targetOffset;
};
struct ToastEntry
{
QString text;
qint64 createdWallMs;
};
static constexpr qint64 kBeamLifetimeMs = 300;
static constexpr qint64 kToastLifetimeMs = 4000;
static constexpr qint64 kToastFadeStartMs = 3500;
static constexpr float kScrollSpeedTilesPerSec = 10.0f;
Simulation* m_sim;
@@ -151,7 +143,6 @@ private:
QTimer* m_renderTimer;
std::vector<ActiveBeam> m_activeBeams;
std::vector<ToastEntry> m_toasts;
std::optional<BuildingType> m_builderType;
Rotation m_ghostRotation;
@@ -176,6 +167,7 @@ private:
bool m_scrollLeft;
bool m_scrollRight;
bool m_gameOverShown;
bool m_schematicChoiceShown;
Tick m_lastTick = Tick(-1);
int m_lastBlocks = -1;