CommonLibSSE (powerof3)
Loading...
Searching...
No Matches
InputEvent.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/I/InputDevices.h"
5
6namespace RE
7{
8 enum class INPUT_EVENT_TYPE
9 {
10 kButton = 0,
12 kChar,
16 };
17
18 class ButtonEvent;
19 class CharEvent;
20 class IDEvent;
21 class MouseMoveEvent;
22 class ThumbstickEvent;
23
25 {
26 public:
27 inline static constexpr auto RTTI = RTTI_InputEvent;
28 inline static constexpr auto VTABLE = VTABLE_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]] CharEvent* AsCharEvent();
42 [[nodiscard]] const CharEvent* AsCharEvent() const;
43
44 [[nodiscard]] IDEvent* AsIDEvent();
45 [[nodiscard]] const IDEvent* AsIDEvent() const;
46
48 [[nodiscard]] const MouseMoveEvent* AsMouseMoveEvent() const;
49
51 [[nodiscard]] const ThumbstickEvent* AsThumbstickEvent() const;
52
53 // members
57 };
58 static_assert(sizeof(InputEvent) == 0x18);
59}
Definition EnumSet.h:9
Definition ButtonEvent.h:11
Definition CharEvent.h:8
Definition IDEvent.h:9
Definition InputEvent.h:25
virtual ~InputEvent()
static constexpr auto RTTI
Definition InputEvent.h:27
const ThumbstickEvent * AsThumbstickEvent() const
const ButtonEvent * AsButtonEvent() const
constexpr INPUT_EVENT_TYPE GetEventType() const noexcept
Definition InputEvent.h:35
const CharEvent * AsCharEvent() const
virtual bool HasIDCode() const
ButtonEvent * AsButtonEvent()
virtual const BSFixedString & QUserEvent() const
REX::EnumSet< INPUT_EVENT_TYPE, std::uint32_t > eventType
Definition InputEvent.h:55
constexpr INPUT_DEVICE GetDevice() const noexcept
Definition InputEvent.h:36
const MouseMoveEvent * AsMouseMoveEvent() const
REX::EnumSet< INPUT_DEVICE, std::uint32_t > device
Definition InputEvent.h:54
ThumbstickEvent * AsThumbstickEvent()
CharEvent * AsCharEvent()
const IDEvent * AsIDEvent() const
MouseMoveEvent * AsMouseMoveEvent()
IDEvent * AsIDEvent()
static constexpr auto VTABLE
Definition InputEvent.h:28
InputEvent * next
Definition InputEvent.h:56
Definition MouseMoveEvent.h:8
Definition ThumbstickEvent.h:8
Definition AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_InputEvent
Definition Offsets_VTABLE.h:11913
constexpr REL::ID RTTI_InputEvent(static_cast< std::uint64_t >(687041))
INPUT_EVENT_TYPE
Definition InputEvent.h:9
INPUT_DEVICE
Definition InputDevices.h:8