CommonLibVR
CraftingMenu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/I/IMenu.h"
4 
5 namespace RE
6 {
7  namespace CraftingSubMenus
8  {
9  class CraftingSubMenu;
10  }
11 
12  // menuDepth = 0
13  // flags = kUsesMenuContext | kDisablePauseMenu | kUpdateUsesCursor | kInventoryItemMenu | kDontHideCursorWhenTopmost
14  // context = kItemMenu
15  class CraftingMenu :
16 #ifdef SKYRIMVR
17  public IMenu,
18  public MenuEventHandler
19 #else
20  public IMenu
21 #endif
22  {
23  public:
24  inline static constexpr auto RTTI = RTTI_CraftingMenu;
25  inline static constexpr auto VTABLE = VTABLE_CraftingMenu;
26  constexpr static std::string_view MENU_NAME = "Crafting Menu";
27 
28  ~CraftingMenu() override; // 00
29 
30  // override (IMenu)
31  UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
32  void AdvanceMovie(float a_interval, std::uint32_t a_currentTime) override; // 05
33  void PostDisplay() override; // 06
34 
35  static void QuitMenu()
36  {
37  using func_t = decltype(&CraftingMenu::QuitMenu);
38  static REL::Relocation<func_t> func{ RELOCATION_ID(50447, 51352) };
39  return func();
40  }
41 
42  // members
44  private:
45  KEEP_FOR_RE()
46  };
47 #ifndef SKYRIMVR
48  static_assert(sizeof(CraftingMenu) == 0x38);
49 #else
50  static_assert(sizeof(CraftingMenu) == 0x58);
51 #endif
52 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:702
Definition: Relocation.h:210
Definition: CraftingMenu.h:22
static constexpr auto RTTI
Definition: CraftingMenu.h:24
CraftingSubMenus::CraftingSubMenu * subMenu
Definition: CraftingMenu.h:43
static constexpr auto VTABLE
Definition: CraftingMenu.h:25
void PostDisplay() override
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
~CraftingMenu() override
constexpr static std::string_view MENU_NAME
Definition: CraftingMenu.h:26
static void QuitMenu()
Definition: CraftingMenu.h:35
void AdvanceMovie(float a_interval, std::uint32_t a_currentTime) override
Definition: CraftingSubMenu.h:21
Definition: IMenu.h:64
Definition: MenuEventHandler.h:14
Definition: UIMessage.h:28
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_CraftingMenu
Definition: Offsets_VTABLE.h:11400
UI_MESSAGE_RESULTS
Definition: IMenu.h:49
constexpr REL::ID RTTI_CraftingMenu(static_cast< std::uint64_t >(688808))