CommonLibSSE NG
TutorialMenu.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 = 10
9  // flags = kPausesGame | kModal | kUpdateUsesCursor
10  // context = kMenuMode
11  class TutorialMenu : public IMenu
12  {
13  public:
14  inline static constexpr auto RTTI = RTTI_TutorialMenu;
15  constexpr static std::string_view MENU_NAME = "Tutorial Menu";
16 
17  ~TutorialMenu() override; // 00
18 
19  // override (IMenu)
20  void Accept(CallbackProcessor* a_processor) override; // 01
21  UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
22 
23  [[nodiscard]] inline GFxValue GetRoot() const noexcept
24  {
25  return REL::RelocateMember<GFxValue>(this, 0x30, 0x40);
26  }
27 
28  inline void SetRoot(GFxValue a_root) noexcept
29  {
30  REL::RelocateMember<GFxValue>(this, 0x30, 0x40) = a_root;
31  }
32 
33  static void OpenTutorialMenu(DEFAULT_OBJECT a_tutorial)
34  {
35  using func_t = decltype(&TutorialMenu::OpenTutorialMenu);
36  REL::Relocation<func_t> func{ RELOCATION_ID(51818, 52692) };
37  return func(a_tutorial);
38  }
39 
40  // members
41 #ifndef SKYRIM_CROSS_VR
42  GFxValue root; // 30, 40 - "Menu_mc"
43 #endif
44  };
45 #ifndef ENABLE_SKYRIM_VR
46  static_assert(sizeof(TutorialMenu) == 0x48);
47 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
48  static_assert(sizeof(TutorialMenu) == 0x58);
49 #endif
50 }
#define RELOCATION_ID(a_se, a_ae)
Definition: PCH.h:724
Definition: Relocation.h:204
Definition: FxDelegateHandler.h:19
Definition: GFxValue.h:92
Definition: IMenu.h:55
Definition: TutorialMenu.h:12
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
~TutorialMenu() override
GFxValue root
Definition: TutorialMenu.h:42
void Accept(CallbackProcessor *a_processor) override
static constexpr auto RTTI
Definition: TutorialMenu.h:14
void SetRoot(GFxValue a_root) noexcept
Definition: TutorialMenu.h:28
constexpr static std::string_view MENU_NAME
Definition: TutorialMenu.h:15
GFxValue GetRoot() const noexcept
Definition: TutorialMenu.h:23
static void OpenTutorialMenu(DEFAULT_OBJECT a_tutorial)
Definition: TutorialMenu.h:33
Definition: UIMessage.h:28
Definition: AbsorbEffect.h:6
UI_MESSAGE_RESULTS
Definition: IMenu.h:48
constexpr REL::VariantID RTTI_TutorialMenu(688921, 396776, 0x1f47a48)
DEFAULT_OBJECT
Definition: BGSDefaultObjectManager.h:12