CommonLibVR
Loading...
Searching...
No Matches
GFxEvent.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/G/GFxKey.h"
6#include "RE/G/GStats.h"
7
8namespace RE
9{
10 class GFxEvent : public GNewOverrideBase<GStatGroups::kGStat_Default_Mem>
11 {
12 public:
13 enum class EventType
14 {
15 kNone,
16
17 // Informative events sent to the player.
23 kKeyUp,
27
28 // Action events, to be handled by user.
32
35 };
36
38 GNewOverrideBase<GStatGroups::kGStat_Default_Mem>(),
39 type(a_eventType)
40 {}
41
42 // members
44 private:
46 };
47 static_assert(sizeof(GFxEvent) == 0x4);
48
49 class GFxMouseEvent : public GFxEvent
50 {
51 public:
52 inline GFxMouseEvent() :
53 GFxEvent(),
54 x(0.0),
55 y(0.0),
56 scrollDelta(0.0),
57 button(0),
58 mouseIndex(0)
59 {}
60
61 inline GFxMouseEvent(EventType a_eventType, std::uint32_t a_button, float a_x, float a_y, float a_scrollDelta = 0.0, std::uint32_t a_mouseIndex = 0) :
62 GFxEvent(a_eventType),
63 x(a_x),
64 y(a_y),
65 scrollDelta(a_scrollDelta),
66 button(a_button),
67 mouseIndex(a_mouseIndex)
68 {}
69
70 inline GFxMouseEvent(EventType a_eventType, std::uint32_t a_mouseIndex) :
71 GFxEvent(a_eventType),
72 x(0.0),
73 y(0.0),
74 scrollDelta(0.0),
75 button(0),
76 mouseIndex(a_mouseIndex)
77 {}
78
79 // members
80 float x; // 04
81 float y; // 08
82 float scrollDelta; // 0C
83 std::uint32_t button; // 10
84 std::uint32_t mouseIndex; // 14
85 private:
87 };
88 static_assert(sizeof(GFxMouseEvent) == 0x18);
89
90 class GFxKeyEvent : public GFxEvent
91 {
92 public:
93 inline GFxKeyEvent() :
94 GFxEvent(),
95 keyCode(GFxKey::kVoidSymbol),
96 asciiCode(0),
97 pad09(0),
98 pad0B(0),
99 wCharCode(0),
101 keyboardIndex(0),
102 pad12(0)
103 {}
104
105 inline GFxKeyEvent(EventType a_eventType, GFxKey::Code a_keyCode, std::uint8_t a_ascii, std::uint32_t a_wchar, GFxSpecialKeysState a_specialKeyState, std::uint8_t a_keyboardIndex = 0) :
106 GFxEvent(a_eventType),
107 keyCode(a_keyCode),
108 asciiCode(a_ascii),
109 pad09(0),
110 pad0B(0),
111 wCharCode(a_wchar),
112 specialKeyState(a_specialKeyState),
113 keyboardIndex(a_keyboardIndex),
114 pad12(0)
115 {}
116
117 // members
119 std::uint8_t asciiCode; // 08
120 std::uint8_t pad09; // 09
121 std::uint16_t pad0B; // 0B
122 std::uint32_t wCharCode; // 0C
124 std::uint8_t keyboardIndex; // 11
125 std::uint16_t pad12; // 12
126 private:
128 };
129 static_assert(sizeof(GFxKeyEvent) == 0x14);
130}
#define KEEP_FOR_RE()
Definition PCH.h:517
Definition EnumSet.h:9
Definition GFxEvent.h:11
GFxEvent(EventType a_eventType=EventType::kNone)
Definition GFxEvent.h:37
REX::EnumSet< EventType, std::uint32_t > type
Definition GFxEvent.h:43
EventType
Definition GFxEvent.h:14
Definition GFxEvent.h:91
std::uint16_t pad12
Definition GFxEvent.h:125
GFxKey::Code keyCode
Definition GFxEvent.h:118
std::uint32_t wCharCode
Definition GFxEvent.h:122
std::uint16_t pad0B
Definition GFxEvent.h:121
std::uint8_t asciiCode
Definition GFxEvent.h:119
std::uint8_t pad09
Definition GFxEvent.h:120
GFxSpecialKeysState specialKeyState
Definition GFxEvent.h:123
GFxKeyEvent(EventType a_eventType, GFxKey::Code a_keyCode, std::uint8_t a_ascii, std::uint32_t a_wchar, GFxSpecialKeysState a_specialKeyState, std::uint8_t a_keyboardIndex=0)
Definition GFxEvent.h:105
GFxKeyEvent()
Definition GFxEvent.h:93
std::uint8_t keyboardIndex
Definition GFxEvent.h:124
Definition GFxKey.h:6
Code
Definition GFxKey.h:9
Definition GFxEvent.h:50
float y
Definition GFxEvent.h:81
GFxMouseEvent()
Definition GFxEvent.h:52
float x
Definition GFxEvent.h:80
GFxMouseEvent(EventType a_eventType, std::uint32_t a_button, float a_x, float a_y, float a_scrollDelta=0.0, std::uint32_t a_mouseIndex=0)
Definition GFxEvent.h:61
float scrollDelta
Definition GFxEvent.h:82
GFxMouseEvent(EventType a_eventType, std::uint32_t a_mouseIndex)
Definition GFxEvent.h:70
std::uint32_t button
Definition GFxEvent.h:83
std::uint32_t mouseIndex
Definition GFxEvent.h:84
Definition GFxSpecialKeysState.h:6
Definition GNewOverrideBase.h:9
Definition AbsorbEffect.h:6
Definition GStats.h:6