switch to using own event system
This commit is contained in:
@@ -7,7 +7,10 @@
|
||||
|
||||
#include "BuildingBlocksChangedEvent.h"
|
||||
#include "BuildingId.h"
|
||||
#include "EscapeMenuRequestedEvent.h"
|
||||
#include "EventHandler.h"
|
||||
#include "GameOverEvent.h"
|
||||
#include "LayoutDialogRequestedEvent.h"
|
||||
#include "SchematicChoicesAvailableEvent.h"
|
||||
#include "ShipLayoutBlueprint.h"
|
||||
#include "Tick.h"
|
||||
@@ -24,7 +27,10 @@ class QResizeEvent;
|
||||
|
||||
class MainWindow : public QWidget,
|
||||
public CombinedEventHandler<BuildingBlocksChangedEvent,
|
||||
SchematicChoicesAvailableEvent>
|
||||
SchematicChoicesAvailableEvent,
|
||||
GameOverEvent,
|
||||
EscapeMenuRequestedEvent,
|
||||
LayoutDialogRequestedEvent>
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -39,13 +45,11 @@ protected:
|
||||
private:
|
||||
void handleEvent(std::shared_ptr<const BuildingBlocksChangedEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const SchematicChoicesAvailableEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const GameOverEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const EscapeMenuRequestedEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const LayoutDialogRequestedEvent> event) override;
|
||||
void layoutPanels();
|
||||
|
||||
private slots:
|
||||
void onGameOver();
|
||||
void onEscapeMenuRequested();
|
||||
void onLayoutDialogRequested(BuildingId shipyardId);
|
||||
|
||||
private:
|
||||
std::string m_configDir;
|
||||
VisualsConfig m_visuals;
|
||||
|
||||
Reference in New Issue
Block a user