CommonLibSSE NG
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 };
45 static_assert(sizeof(GFxEvent) == 0x4);
46
47 class GFxMouseEvent : public GFxEvent
48 {
49 public:
50 inline GFxMouseEvent() :
51 GFxEvent(),
52 x(0.0),
53 y(0.0),
54 scrollDelta(0.0),
55 button(0),
56 mouseIndex(0)
57 {}
58
59 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) :
60 GFxEvent(a_eventType),
61 x(a_x),
62 y(a_y),
63 scrollDelta(a_scrollDelta),
64 button(a_button),
65 mouseIndex(a_mouseIndex)
66 {}
67
68 inline GFxMouseEvent(EventType a_eventType, std::uint32_t a_mouseIndex) :
69 GFxEvent(a_eventType),
70 x(0.0),
71 y(0.0),
72 scrollDelta(0.0),
73 button(0),
74 mouseIndex(a_mouseIndex)
75 {}
76
77 // members
78 float x; // 04
79 float y; // 08
80 float scrollDelta; // 0C
81 std::uint32_t button; // 10
82 std::uint32_t mouseIndex; // 14
83 };
84 static_assert(sizeof(GFxMouseEvent) == 0x18);
85
86 class GFxKeyEvent : public GFxEvent
87 {
88 public:
89 inline GFxKeyEvent() :
90 GFxEvent(),
91 keyCode(GFxKey::kVoidSymbol),
92 asciiCode(0),
93 pad09(0),
94 pad0B(0),
95 wCharCode(0),
98 pad12(0)
99 {}
100
101 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) :
102 GFxEvent(a_eventType),
103 keyCode(a_keyCode),
104 asciiCode(a_ascii),
105 pad09(0),
106 pad0B(0),
107 wCharCode(a_wchar),
108 specialKeyState(a_specialKeyState),
109 keyboardIndex(a_keyboardIndex),
110 pad12(0)
111 {}
112
113 // members
115 std::uint8_t asciiCode; // 08
116 std::uint8_t pad09; // 09
117 std::uint16_t pad0B; // 0B
118 std::uint32_t wCharCode; // 0C
120 std::uint8_t keyboardIndex; // 11
121 std::uint16_t pad12; // 12
122 };
123 static_assert(sizeof(GFxKeyEvent) == 0x14);
124}
Definition GFxEvent.h:11
GFxEvent(EventType a_eventType=EventType::kNone)
Definition GFxEvent.h:37
EventType
Definition GFxEvent.h:14
stl::enumeration< EventType, std::uint32_t > type
Definition GFxEvent.h:43
Definition GFxEvent.h:87
std::uint16_t pad12
Definition GFxEvent.h:121
GFxKey::Code keyCode
Definition GFxEvent.h:114
std::uint32_t wCharCode
Definition GFxEvent.h:118
std::uint16_t pad0B
Definition GFxEvent.h:117
std::uint8_t asciiCode
Definition GFxEvent.h:115
std::uint8_t pad09
Definition GFxEvent.h:116
GFxSpecialKeysState specialKeyState
Definition GFxEvent.h:119
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:101
GFxKeyEvent()
Definition GFxEvent.h:89
std::uint8_t keyboardIndex
Definition GFxEvent.h:120
Definition GFxKey.h:6
Code
Definition GFxKey.h:9
Definition GFxEvent.h:48
float y
Definition GFxEvent.h:79
GFxMouseEvent()
Definition GFxEvent.h:50
float x
Definition GFxEvent.h:78
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:59
float scrollDelta
Definition GFxEvent.h:80
GFxMouseEvent(EventType a_eventType, std::uint32_t a_mouseIndex)
Definition GFxEvent.h:68
std::uint32_t button
Definition GFxEvent.h:81
std::uint32_t mouseIndex
Definition GFxEvent.h:82
Definition GFxSpecialKeysState.h:6
Definition GNewOverrideBase.h:9
Definition PCH.h:223
Definition AbsorbEffect.h:6
Definition GStats.h:6