move blueprints out of the sidebar into Ctrl+C / Ctrl+V dialogs
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "BlueprintSaveRequestedEvent.h"
|
||||
#include "BlueprintSelectionRequestedEvent.h"
|
||||
#include "BuildingId.h"
|
||||
#include "EscapeMenuRequestedEvent.h"
|
||||
#include "EventHandler.h"
|
||||
@@ -28,7 +30,7 @@ class GameWorldView;
|
||||
class HeaderBar;
|
||||
class SelectedBuildingPanel;
|
||||
class BuildButtonBar;
|
||||
class BlueprintPanel;
|
||||
class BlueprintLibrary;
|
||||
class ItemIconCache;
|
||||
class QCloseEvent;
|
||||
class QResizeEvent;
|
||||
@@ -39,7 +41,9 @@ class MainWindow : public QWidget,
|
||||
WinEvent,
|
||||
EscapeMenuRequestedEvent,
|
||||
LayoutDialogRequestedEvent,
|
||||
RecipeSelectionRequestedEvent>
|
||||
RecipeSelectionRequestedEvent,
|
||||
BlueprintSaveRequestedEvent,
|
||||
BlueprintSelectionRequestedEvent>
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -59,6 +63,8 @@ private:
|
||||
void handleEvent(std::shared_ptr<const EscapeMenuRequestedEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const LayoutDialogRequestedEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const RecipeSelectionRequestedEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const BlueprintSaveRequestedEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const BlueprintSelectionRequestedEvent> event) override;
|
||||
|
||||
// Reloads the game config and visuals.toml from disk (REQ-CFG-RELOAD), shared
|
||||
// by every restart path. On success the reloaded visuals are applied to this
|
||||
@@ -71,6 +77,12 @@ private:
|
||||
void openShipLayoutDialog(BuildingId shipyardId,
|
||||
const std::string& schematicId,
|
||||
const ShipLayoutConfig& currentLayout);
|
||||
|
||||
// Runs the blueprint selection dialog and enters placement mode for whatever the
|
||||
// player picked (REQ-UI-BLUEPRINT-DIALOG). Holds no pause or dim scope of its own:
|
||||
// both callers already hold theirs, which is what keeps the dim continuous when a
|
||||
// confirmed save hands straight over to this dialog (REQ-UI-MODAL-DIM).
|
||||
void showBlueprintSelectionDialog();
|
||||
void layoutPanels();
|
||||
|
||||
private:
|
||||
@@ -84,7 +96,9 @@ private:
|
||||
HeaderBar* m_headerBar;
|
||||
SelectedBuildingPanel* m_selectedBuildingPanel;
|
||||
BuildButtonBar* m_buildButtonBar;
|
||||
BlueprintPanel* m_blueprintPanel;
|
||||
// The saved blueprints themselves; they have no widget of their own any more and
|
||||
// are reached through the two modal dialogs (REQ-UI-BLUEPRINT-DIALOG).
|
||||
std::unique_ptr<BlueprintLibrary> m_blueprintLibrary;
|
||||
QWidget* m_sidePanel;
|
||||
ModalDimOverlay* m_dimOverlay = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user