CommonLibSSE (Parapets fork)
GFxEvent.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "RE/G/GStats.h"
5 
6 namespace RE
7 {
8  class GFxEvent : public GNewOverrideBase<GStatGroups::kGStat_Default_Mem>
9  {
10  public:
11  enum class EventType
12  {
13  kNone,
14 
15  // Informative events sent to the player.
16  kMouseMove,
17  kMouseDown,
18  kMouseUp,
20  kKeyDown,
21  kKeyUp,
23  kSetFocus,
24  kKillFocus,
25 
26  // Action events, to be handled by user.
30 
31  kCharEvent,
32  kIMEEvent
33  };
34 
36  GNewOverrideBase<GStatGroups::kGStat_Default_Mem>(),
37  type(a_eventType)
38  {}
39 
40  // members
42  };
43  static_assert(sizeof(GFxEvent) == 0x4);
44 
45  class GFxMouseEvent : public GFxEvent
46  {
47  public:
48  inline GFxMouseEvent() :
49  GFxEvent(),
50  x(0.0),
51  y(0.0),
52  scrollDelta(0.0),
53  button(0),
54  mouseIndex(0)
55  {}
56 
57  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) :
58  GFxEvent(a_eventType),
59  x(a_x),
60  y(a_y),
61  scrollDelta(a_scrollDelta),
62  button(a_button),
63  mouseIndex(a_mouseIndex)
64  {}
65 
66  inline GFxMouseEvent(EventType a_eventType, std::uint32_t a_mouseIndex) :
67  GFxEvent(a_eventType),
68  x(0.0),
69  y(0.0),
70  scrollDelta(0.0),
71  button(0),
72  mouseIndex(a_mouseIndex)
73  {}
74 
75  // members
76  float x; // 04
77  float y; // 08
78  float scrollDelta; // 0C
79  std::uint32_t button; // 10
80  std::uint32_t mouseIndex; // 14
81  };
82  static_assert(sizeof(GFxMouseEvent) == 0x18);
83 }
Definition: GFxEvent.h:9
GFxEvent(EventType a_eventType=EventType::kNone)
Definition: GFxEvent.h:35
EventType
Definition: GFxEvent.h:12
stl::enumeration< EventType, std::uint32_t > type
Definition: GFxEvent.h:41
Definition: GFxEvent.h:46
float y
Definition: GFxEvent.h:77
GFxMouseEvent()
Definition: GFxEvent.h:48
float x
Definition: GFxEvent.h:76
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:57
float scrollDelta
Definition: GFxEvent.h:78
GFxMouseEvent(EventType a_eventType, std::uint32_t a_mouseIndex)
Definition: GFxEvent.h:66
std::uint32_t button
Definition: GFxEvent.h:79
std::uint32_t mouseIndex
Definition: GFxEvent.h:80
Definition: GNewOverrideBase.h:9
Definition: AbsorbEffect.h:6
Definition: GStats.h:6