CommonLibSSE NG
InventoryMenu.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 GFxMovieView;
10  class TESObjectREFR;
11  struct BottomBar;
12  struct ItemCard;
13  struct ItemList;
14 
15  // menuDepth = 0
16  // flags = kPausesGame | kDisablePauseMenu | kUpdateUsesCursor | kInventoryItemMenu | kCustomRendering
17  // context = kNone
18  class InventoryMenu : public IMenu
19  {
20  public:
21  inline static constexpr auto RTTI = RTTI_InventoryMenu;
22  constexpr static std::string_view MENU_NAME = "InventoryMenu";
23 
24  struct RUNTIME_DATA
25  {
26 #define RUNTIME_DATA_CONTENT \
27  GFxValue root; /* 00 - kDisplayObject - "_level0.Menu_mc" */ \
28  ItemList* itemList; /* 18 */ \
29  ItemCard* itemCard; /* 20 */ \
30  BottomBar* bottomBar; /* 28 */ \
31  BSTArray<void*> unk60; /* 30 */ \
32  std::uint8_t unk78; /* 48 */ \
33  std::uint8_t pad79; /* 49 */ \
34  std::uint16_t pad7A; /* 4A */ \
35  std::uint32_t unk7C; /* 4C */ \
36  bool pcControlsReady; /* 50 */ \
37  std::uint8_t unk81; /* 51 */ \
38  std::uint16_t pad82; /* 52 */ \
39  std::uint32_t pad84; /* 54 */
40 
42  };
43  static_assert(sizeof(RUNTIME_DATA) == 0x58);
44 
45  ~InventoryMenu() override; // 00
46 
47  // override (IMenu)
48  void Accept(CallbackProcessor* a_processor) override; // 01
49  UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
50  void PostDisplay() override; // 06
51 
52  [[nodiscard]] inline RUNTIME_DATA& GetRuntimeData() noexcept
53  {
54  return REL::RelocateMember<RUNTIME_DATA>(this, 0x30, 0x40);
55  }
56 
57  [[nodiscard]] inline const RUNTIME_DATA& GetRuntimeData() const noexcept
58  {
59  return REL::RelocateMember<RUNTIME_DATA>(this, 0x30, 0x40);
60  }
61 
62  // members
63 #ifndef SKYRIM_CROSS_VR
64  RUNTIME_DATA_CONTENT // 30, 40
65 #endif
66  };
67 #ifndef ENABLE_SKYRIM_VR
68  static_assert(sizeof(InventoryMenu) == 0x88);
69 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
70  static_assert(sizeof(InventoryMenu) == 0x98);
71 #endif
72 }
73 #undef RUNTIME_DATA_CONTENT
#define RUNTIME_DATA_CONTENT
Definition: InventoryMenu.h:26
Definition: FxDelegateHandler.h:19
Definition: IMenu.h:55
Definition: InventoryMenu.h:19
static constexpr auto RTTI
Definition: InventoryMenu.h:21
void PostDisplay() override
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
constexpr static std::string_view MENU_NAME
Definition: InventoryMenu.h:22
RUNTIME_DATA & GetRuntimeData() noexcept
Definition: InventoryMenu.h:52
void Accept(CallbackProcessor *a_processor) override
~InventoryMenu() override
const RUNTIME_DATA & GetRuntimeData() const noexcept
Definition: InventoryMenu.h:57
Definition: UIMessage.h:28
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_InventoryMenu(688858, 396710, 0x1f46e18)
UI_MESSAGE_RESULTS
Definition: IMenu.h:48
Definition: InventoryMenu.h:25