add event system and use it to propagate to print traces

This commit is contained in:
2026-06-05 17:18:17 +02:00
parent abc261c03a
commit 9677133c54
14 changed files with 369 additions and 10 deletions

View File

@@ -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;