CommonLibSSE NG
LoadingMenu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSTArray.h"
4 #include "RE/G/GFxValue.h"
5 #include "RE/I/IMenu.h"
6 
7 namespace RE
8 {
9  class BGSLocation;
10  class TESLoadScreen;
11 
12  // menuDepth = 9
13  // flags = kPausesGame | kAlwaysOpen | kAllowSaving | kApplicationMenu
14  // context = kNone
15  class LoadingMenu : public IMenu
16  {
17  public:
18  inline static constexpr auto RTTI = RTTI_LoadingMenu;
19  inline static constexpr auto VTABLE = VTABLE_LoadingMenu;
20  constexpr static std::string_view MENU_NAME = "Loading Menu";
21 
22  struct RUNTIME_DATA
23  {
24 #define RUNTIME_DATA_CONTENT \
25  GFxValue root; /* 30 - "Menu_mc" */ \
26  BGSLocation* currentLocation; /* 48 */ \
27  bool unk50; /* 50 */ \
28  bool unk51; /* 51 */ \
29  std::uint16_t pad52; /* 52 */ \
30  std::uint32_t pad54; /* 54 */ \
31  BSTArray<TESLoadScreen*> loadScreens; /* 58 */ \
32  std::uint32_t unk70; /* 70 */ \
33  std::uint32_t pad74; /* 74 */ \
34  std::uint64_t unk78; /* 78 */
35 
37  };
38  static_assert(sizeof(RUNTIME_DATA) == 0x50);
39 
40  ~LoadingMenu() override; // 00
41 
42  // override (IMenu)
43  void Accept(CallbackProcessor* a_processor) override; // 01
44  UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
45 
46  [[nodiscard]] inline RUNTIME_DATA& GetRuntimeData() noexcept
47  {
48  return REL::RelocateMember<RUNTIME_DATA>(this, 0x30, 0x40);
49  }
50 
51  [[nodiscard]] inline const RUNTIME_DATA& GetRuntimeData() const noexcept
52  {
53  return REL::RelocateMember<RUNTIME_DATA>(this, 0x30, 0x40);
54  }
55 
56  // members
57 #ifndef SKYRIM_CROSS_VR
58  RUNTIME_DATA_CONTENT // 30, 40
59 #endif
60  };
61 #ifndef ENABLE_SKYRIM_VR
62  static_assert(sizeof(LoadingMenu) == 0x80);
63 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
64  static_assert(sizeof(LoadingMenu) == 0x90);
65 #endif
66 }
67 #undef RUNTIME_DATA_CONTENT
#define RUNTIME_DATA_CONTENT
Definition: LoadingMenu.h:24
Definition: FxDelegateHandler.h:19
Definition: IMenu.h:55
Definition: LoadingMenu.h:16
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
RUNTIME_DATA & GetRuntimeData() noexcept
Definition: LoadingMenu.h:46
~LoadingMenu() override
constexpr static std::string_view MENU_NAME
Definition: LoadingMenu.h:20
static constexpr auto VTABLE
Definition: LoadingMenu.h:19
void Accept(CallbackProcessor *a_processor) override
const RUNTIME_DATA & GetRuntimeData() const noexcept
Definition: LoadingMenu.h:51
static constexpr auto RTTI
Definition: LoadingMenu.h:18
Definition: UIMessage.h:28
Definition: AbsorbEffect.h:6
UI_MESSAGE_RESULTS
Definition: IMenu.h:48
constexpr REL::VariantID RTTI_LoadingMenu(688862, 396714, 0x1f46ef8)
constexpr std::array< REL::VariantID, 1 > VTABLE_LoadingMenu
Definition: Offsets_VTABLE.h:4058
Definition: LoadingMenu.h:23