Flint Engine
Modular C++20 2D game engine powered by SDL3
Loading...
Searching...
No Matches
Flint::AppEvent Struct Reference

A tagged union representing a single application input or window event. More...

#include <flint/input/event.h>

+ Collaboration diagram for Flint::AppEvent:

Public Attributes

EventType type
 
union { 
 
   struct { 
 
      GamepadAxis   axis 
 
      float   value 
 
   }   gamepadAxis 
 Data for GamepadAxisMove events.
 
   struct { 
 
      GamepadButton   button 
 
   }   gamepadButton 
 Data for GamepadButtonPressed / GamepadButtonReleased events.
 
   struct { 
 
      SDL_Keycode   keycode 
 
   }   key 
 Data for KeyDown / KeyUp events.
 
   struct { 
 
      Vec2< float >   position 
 
   }   mouseMove 
 Data for MouseMove events.
 
   struct { 
 
      uint8_t   button 
 
      Vec2f   position 
 
   }   mouseButton 
 Data for MouseButtonDown / MouseButtonUp events.
 
};  
 

Detailed Description

A tagged union representing a single application input or window event.

The active union member is determined by the type field. Access the appropriate sub-struct after checking type.

Definition at line 90 of file event.h.


The documentation for this struct was generated from the following file: