add event system and use it to propagate to print traces
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "BeltSystem.h"
|
||||
#include "Building.h"
|
||||
#include "BuildingSystem.h"
|
||||
#include "EventManager.h"
|
||||
#include "FacingComponent.h"
|
||||
#include "FactionComponent.h"
|
||||
#include "HealthComponent.h"
|
||||
@@ -32,6 +33,7 @@
|
||||
#include "StationBodyComponent.h"
|
||||
#include "SurfaceMask.h"
|
||||
#include "Tick.h"
|
||||
#include "TracePrintRequestedEvent.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -1132,9 +1134,12 @@ void GameWorldView::keyPressEvent(QKeyEvent* event)
|
||||
case Qt::Key_Backspace:
|
||||
toggleDemolishMode();
|
||||
break;
|
||||
case Qt::Key_M:
|
||||
m_debugDraw = !m_debugDraw;
|
||||
break;
|
||||
case Qt::Key_M:
|
||||
m_debugDraw = !m_debugDraw;
|
||||
break;
|
||||
case Qt::Key_L:
|
||||
EventManager::getInstance()->addEvent(std::make_shared<TracePrintRequestedEvent>());
|
||||
break;
|
||||
default:
|
||||
QOpenGLWidget::keyPressEvent(event);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user