CommonLibSSE (powerof3)
InputEvent.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSFixedString.h"
4 #include "RE/I/InputDevices.h"
5 
6 namespace RE
7 {
8  enum class INPUT_EVENT_TYPE
9  {
10  kButton = 0,
11  kMouseMove,
12  kChar,
15  kKinect
16  };
17 
18  class ButtonEvent;
19  class IDEvent;
20 
21  class InputEvent
22  {
23  public:
24  inline static constexpr auto RTTI = RTTI_InputEvent;
25 
26  virtual ~InputEvent(); // 00
27 
28  [[nodiscard]] virtual bool HasIDCode() const; // 01 - { return false; }
29  [[nodiscard]] virtual const BSFixedString& QUserEvent() const; // 02 - { return ""; }
30 
31  [[nodiscard]] constexpr INPUT_EVENT_TYPE GetEventType() const noexcept { return *eventType; }
32  [[nodiscard]] constexpr INPUT_DEVICE GetDevice() const noexcept { return *device; }
33 
34  [[nodiscard]] ButtonEvent* AsButtonEvent();
35  [[nodiscard]] const ButtonEvent* AsButtonEvent() const;
36 
37  [[nodiscard]] IDEvent* AsIDEvent();
38  [[nodiscard]] const IDEvent* AsIDEvent() const;
39 
40  // members
43  InputEvent* next; // 10
44  };
45  static_assert(sizeof(InputEvent) == 0x18);
46 }
Definition: ButtonEvent.h:10
Definition: IDEvent.h:9
Definition: InputEvent.h:22
virtual ~InputEvent()
static constexpr auto RTTI
Definition: InputEvent.h:24
stl::enumeration< INPUT_DEVICE, std::uint32_t > device
Definition: InputEvent.h:41
constexpr INPUT_EVENT_TYPE GetEventType() const noexcept
Definition: InputEvent.h:31
virtual bool HasIDCode() const
stl::enumeration< INPUT_EVENT_TYPE, std::uint32_t > eventType
Definition: InputEvent.h:42
ButtonEvent * AsButtonEvent()
IDEvent * AsIDEvent()
constexpr INPUT_DEVICE GetDevice() const noexcept
Definition: InputEvent.h:32
virtual const BSFixedString & QUserEvent() const
const IDEvent * AsIDEvent() const
const ButtonEvent * AsButtonEvent() const
InputEvent * next
Definition: InputEvent.h:43
Definition: AbsorbEffect.h:6
INPUT_EVENT_TYPE
Definition: InputEvent.h:9
constexpr REL::ID RTTI_InputEvent
Definition: Offsets_RTTI.h:5064
INPUT_DEVICE
Definition: InputDevices.h:8