CommonLibSSE NG
LoadWaitSpinner.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSTEvent.h"
4 #include "RE/G/GFxValue.h"
5 #include "RE/I/IMenu.h"
6 
7 namespace RE
8 {
9  class BSSystemEvent;
10  struct BGSSaveLoadManagerEvent;
11  struct BSGamerProfileEvent;
12 
13  // menuDepth = 10
14  // flags = kAlwaysOpen | kAllowSaving
15  // context = kNone
17 #ifndef SKYRIM_CROSS_VR
18  public IMenu, // 00
19  public BSTEventSink<BSSystemEvent>, // 30
20  public BSTEventSink<BSGamerProfileEvent>, // 38
21  public BSTEventSink<BGSSaveLoadManagerEvent> // 40
22 #else
23  public IMenu // 00
24 #endif
25  {
26  public:
27  inline static constexpr auto RTTI = RTTI_LoadWaitSpinner;
28  constexpr static std::string_view MENU_NAME = "LoadWaitSpinner";
29 
30  struct RUNTIME_DATA
31  {
32 #define RUNTIME_DATA_CONTENT \
33  GFxValue root; /* 00 - "Menu_mc" */ \
34  volatile std::int32_t unk60; /* 18 */ \
35  bool fadeIn; /* 1C */ \
36  std::uint8_t pad65; /* 1D */ \
37  std::uint16_t pad66; /* 1E */
38 
40  };
41  static_assert(sizeof(RUNTIME_DATA) == 0x20);
42 
43  ~LoadWaitSpinner() override; // 00
44 
45  // override (IMenu)
46  void Accept(CallbackProcessor* a_processor) override; // 01 - { return; }
47  UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
48 
49 #ifndef SKYRIM_CROSS_VR
50  // override (BSTEventSink<BSSystemEvent>)
51  BSEventNotifyControl ProcessEvent(const BSSystemEvent* a_event, BSTEventSource<BSSystemEvent>* a_eventSource) override; // 01
52 
53  // override (BSTEventSink<BSGamerProfileEvent>)
54  BSEventNotifyControl ProcessEvent(const BSGamerProfileEvent* a_event, BSTEventSource<BSGamerProfileEvent>* a_eventSource) override; // 01
55 
56  // override (BSTEventSink<BGSSaveLoadManagerEvent>)
57  BSEventNotifyControl ProcessEvent(const BGSSaveLoadManagerEvent* a_event, BSTEventSource<BGSSaveLoadManagerEvent>* a_eventSource) override; // 01
58 #endif
59 
61  {
62  return &REL::RelocateMember<BSTEventSink<BSSystemEvent>>(this, 0x30, 0x40);
63  }
64 
65  [[nodiscard]] const BSTEventSink<BSSystemEvent>* AsBSSystemEventSink() const noexcept
66  {
67  return const_cast<LoadWaitSpinner*>(this)->AsBSSystemEventSink();
68  }
69 
71  {
72  return &REL::RelocateMember<BSTEventSink<BSGamerProfileEvent>>(this, 0x38, 0x48);
73  }
74 
75  [[nodiscard]] const BSTEventSink<BSGamerProfileEvent>* AsBSGamerProfileEventSink() const noexcept
76  {
77  return const_cast<LoadWaitSpinner*>(this)->AsBSGamerProfileEventSink();
78  }
79 
81  {
82  return &REL::RelocateMember<BSTEventSink<BGSSaveLoadManagerEvent>>(this, 0x40, 0x50);
83  }
84 
86  {
87  return const_cast<LoadWaitSpinner*>(this)->AsBGSSaveLoadManagerEvent();
88  }
89 
90  [[nodiscard]] inline RUNTIME_DATA& GetRuntimeData() noexcept
91  {
92  return REL::RelocateMember<RUNTIME_DATA>(this, 0x48, 0x58);
93  }
94 
95  [[nodiscard]] inline const RUNTIME_DATA& GetRuntimeData() const noexcept
96  {
97  return REL::RelocateMember<RUNTIME_DATA>(this, 0x48, 0x58);
98  }
99 
100  // members
101 #ifndef SKYRIM_CROSS_VR
102  RUNTIME_DATA_CONTENT // 48, 58
103 #endif
104  };
105 #ifndef ENABLE_SKYRIM_VR
106  static_assert(sizeof(LoadWaitSpinner) == 0x68);
107 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
108  static_assert(sizeof(LoadWaitSpinner) == 0x78);
109 #endif
110 }
111 #undef RUNTIME_DATA_CONTENT
#define RUNTIME_DATA_CONTENT
Definition: LoadWaitSpinner.h:32
Definition: BSTEvent.h:143
Definition: BSTEvent.h:19
Definition: FxDelegateHandler.h:19
Definition: IMenu.h:55
Definition: LoadWaitSpinner.h:25
const BSTEventSink< BSSystemEvent > * AsBSSystemEventSink() const noexcept
Definition: LoadWaitSpinner.h:65
const BSTEventSink< BSGamerProfileEvent > * AsBSGamerProfileEventSink() const noexcept
Definition: LoadWaitSpinner.h:75
BSTEventSink< BGSSaveLoadManagerEvent > * AsBGSSaveLoadManagerEvent() noexcept
Definition: LoadWaitSpinner.h:80
constexpr static std::string_view MENU_NAME
Definition: LoadWaitSpinner.h:28
~LoadWaitSpinner() override
BSEventNotifyControl ProcessEvent(const BSSystemEvent *a_event, BSTEventSource< BSSystemEvent > *a_eventSource) override
void Accept(CallbackProcessor *a_processor) override
BSTEventSink< BSGamerProfileEvent > * AsBSGamerProfileEventSink() noexcept
Definition: LoadWaitSpinner.h:70
BSTEventSink< BSSystemEvent > * AsBSSystemEventSink() noexcept
Definition: LoadWaitSpinner.h:60
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
const RUNTIME_DATA & GetRuntimeData() const noexcept
Definition: LoadWaitSpinner.h:95
BSEventNotifyControl ProcessEvent(const BSGamerProfileEvent *a_event, BSTEventSource< BSGamerProfileEvent > *a_eventSource) override
RUNTIME_DATA & GetRuntimeData() noexcept
Definition: LoadWaitSpinner.h:90
const BSTEventSink< BGSSaveLoadManagerEvent > * AsBGSSaveLoadManagerEvent() const noexcept
Definition: LoadWaitSpinner.h:85
BSEventNotifyControl ProcessEvent(const BGSSaveLoadManagerEvent *a_event, BSTEventSource< BGSSaveLoadManagerEvent > *a_eventSource) override
static constexpr auto RTTI
Definition: LoadWaitSpinner.h:27
Definition: UIMessage.h:28
Definition: AbsorbEffect.h:6
UI_MESSAGE_RESULTS
Definition: IMenu.h:48
constexpr REL::VariantID RTTI_LoadWaitSpinner(686468, 394300, 0x1efe210)
BSEventNotifyControl
Definition: BSTEvent.h:12
Definition: LoadWaitSpinner.h:31