CommonLibSSE (Parapets fork)
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 #ifdef SKYRIMVR
17  kVrWandTouchpadPosition,
18  kVrWandTouchpadSwipe,
19 #endif
20  };
21 
22  class ButtonEvent;
23  class IDEvent;
24 
25  class InputEvent
26  {
27  public:
28  inline static constexpr auto RTTI = RTTI_InputEvent;
29 
30  virtual ~InputEvent(); // 00
31 
32  [[nodiscard]] virtual bool HasIDCode() const; // 01 - { return false; }
33  [[nodiscard]] virtual const BSFixedString& QUserEvent() const; // 02 - { return ""; }
34 
35  [[nodiscard]] constexpr INPUT_EVENT_TYPE GetEventType() const noexcept { return *eventType; }
36  [[nodiscard]] constexpr INPUT_DEVICE GetDevice() const noexcept { return *device; }
37 
38  [[nodiscard]] ButtonEvent* AsButtonEvent();
39  [[nodiscard]] const ButtonEvent* AsButtonEvent() const;
40 
41  [[nodiscard]] IDEvent* AsIDEvent();
42  [[nodiscard]] const IDEvent* AsIDEvent() const;
43 
44  // members
47  InputEvent* next; // 10
48  };
49  static_assert(sizeof(InputEvent) == 0x18);
50 }
Definition: ButtonEvent.h:15
Definition: IDEvent.h:9
Definition: InputEvent.h:26
virtual ~InputEvent()
static constexpr auto RTTI
Definition: InputEvent.h:28
stl::enumeration< INPUT_DEVICE, std::uint32_t > device
Definition: InputEvent.h:45
constexpr INPUT_EVENT_TYPE GetEventType() const noexcept
Definition: InputEvent.h:35
virtual bool HasIDCode() const
stl::enumeration< INPUT_EVENT_TYPE, std::uint32_t > eventType
Definition: InputEvent.h:46
ButtonEvent * AsButtonEvent()
IDEvent * AsIDEvent()
constexpr INPUT_DEVICE GetDevice() const noexcept
Definition: InputEvent.h:36
virtual const BSFixedString & QUserEvent() const
const IDEvent * AsIDEvent() const
const ButtonEvent * AsButtonEvent() const
InputEvent * next
Definition: InputEvent.h:47
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_InputEvent
Definition: Offsets_RTTI.h:5064
INPUT_EVENT_TYPE
Definition: InputEvent.h:9
INPUT_DEVICE
Definition: InputDevices.h:8