Event System

Overview

The Event System is an internal engine mechanism that provides typed publish/subscribe messaging for cross-cutting events. Events are handled automatically — you don't interact with them directly through the editor.

Built-in Event Types

Defined in Core/include/Core/Events.h:

EventFieldsTrigger
WindowResizeEventint width, heightWindow framebuffer resized
KeyEventint key, action, modsKey press/release/repeat
MouseMoveEventdouble x, y, deltaX, deltaYCursor movement
MouseButtonEventint button, action, modsMouse button press/release
MouseScrollEventdouble xOffset, yOffsetScroll wheel

How Events Work

The engine automatically publishes GLFW input and window events to its internal EventBus. These events drive the Input system, camera controls, and editor panels without any manual setup. For component-level changes, the engine uses Flecs ECS observers internally.

Integration Notes

  • Events are published automatically from GLFW callbacks — no user configuration needed
  • The EventBus supports immediate dispatch and deferred queue/flush patterns
  • For gameplay logic, use engine.GetInput().IsKeyDown() / IsKeyPressed() in C++ behaviors rather than subscribing to raw events