#pragma once #include "Event.h" #include "WorldCamera.h" // The direction the player is currently panning the view has changed // (REQ-UI-SCROLL). Deliberately level-triggered: the payload is the complete // current direction, including PanDirection::None when panning stops, rather than // separate started/stopped events. A receiver that only ever saw edges would have // to reconstruct the state and would be left panning forever if one edge went // missing — which is exactly what happens when the widget loses focus mid-pan. // // Unlike the state-change events elsewhere in the UI, the receiver does cache this // payload instead of re-reading the value from somewhere authoritative. That is // correct here: input has no other source of truth to re-read from, so the // publisher (InputMapper) is the authority and the payload is the value. class PanDirectionChangedEvent : public Event { public: explicit PanDirectionChangedEvent(PanDirection direction) : direction(direction) {} const PanDirection direction; };