CommonLibSSE NG
SleepWaitMenu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/G/GFxValue.h"
4 #include "RE/I/IMenu.h"
5 
6 namespace RE
7 {
8  // menuDepth = 4
9  // flags = kPausesGame | kRequiresUpdate | kAllowSaving | kApplicationMenu
10  // kUsesCursor if gamepad disabled
11  // context = kMenuMode
12  class SleepWaitMenu : public IMenu
13  {
14  public:
15  inline static constexpr auto RTTI = RTTI_SleepWaitMenu;
16  constexpr static std::string_view MENU_NAME = "Sleep/Wait Menu";
17 
18  struct RUNTIME_DATA
19  {
20 #define RUNTIME_DATA_CONTENT \
21  std::uint32_t unk30; /* 00 */ \
22  std::uint32_t pad34; /* 04 */ \
23  GFxValue root; /* 08 - "SleepWaitMenu_mc" */ \
24  std::uint8_t unk50; /* 20 */ \
25  std::uint8_t unk51; /* 21 */ \
26  std::uint16_t pad52; /* 22 */ \
27  std::uint32_t pad54; /* 24 */
28 
30  };
31  static_assert(sizeof(RUNTIME_DATA) == 0x28);
32 
33  ~SleepWaitMenu() override; // 00
34 
35  // override (IMenu)
36  void Accept(CallbackProcessor* a_processor) override; // 01
37  UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
38 
39  [[nodiscard]] inline RUNTIME_DATA& GetRuntimeData() noexcept
40  {
41  return REL::RelocateMember<RUNTIME_DATA>(this, 0x30, 0x40);
42  }
43 
44  [[nodiscard]] inline const RUNTIME_DATA& GetRuntimeData() const noexcept
45  {
46  return REL::RelocateMember<RUNTIME_DATA>(this, 0x30, 0x40);
47  }
48 
49  // members
50 #ifndef SKYRIM_CROSS_VR
51  RUNTIME_DATA_CONTENT // 30, 40
52 #endif
53  };
54 #ifndef ENABLE_SKYRIM_VR
55  static_assert(sizeof(SleepWaitMenu) == 0x58);
56 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
57  static_assert(sizeof(SleepWaitMenu) == 0x68);
58 #endif
59 }
60 #undef RUNTIME_DATA_CONTENT
#define RUNTIME_DATA_CONTENT
Definition: SleepWaitMenu.h:20
Definition: FxDelegateHandler.h:19
Definition: IMenu.h:55
Definition: SleepWaitMenu.h:13
RUNTIME_DATA & GetRuntimeData() noexcept
Definition: SleepWaitMenu.h:39
~SleepWaitMenu() override
const RUNTIME_DATA & GetRuntimeData() const noexcept
Definition: SleepWaitMenu.h:44
void Accept(CallbackProcessor *a_processor) override
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
static constexpr auto RTTI
Definition: SleepWaitMenu.h:15
constexpr static std::string_view MENU_NAME
Definition: SleepWaitMenu.h:16
Definition: UIMessage.h:28
Definition: AbsorbEffect.h:6
UI_MESSAGE_RESULTS
Definition: IMenu.h:48
constexpr REL::VariantID RTTI_SleepWaitMenu(688905, 396760, 0x1f47798)
Definition: SleepWaitMenu.h:19