CommonLibSSE NG
GiftMenu.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  struct ItemCard;
10  struct ItemList;
11 
12  // menuDepth = 3
13  // flags = kPausesGame | kUsesMenuContext | kDisablePauseMenu | kUpdateUsesCursor | kInventoryItemMenu | kCustomRendering
14  // context = kItemMenu
15  class GiftMenu : public IMenu
16  {
17  public:
18  inline static constexpr auto RTTI = RTTI_GiftMenu;
19  constexpr static std::string_view MENU_NAME = "GiftMenu";
20 
21  struct RUNTIME_DATA
22  {
23 #define RUNTIME_DATA_CONTENT \
24  GFxValue root; /* 00 - "Menu_mc" */ \
25  ItemList* itemList; /* 18 */ \
26  ItemCard* itemCard; /* 20 */ \
27  BSTArray<void*> unk58; /* 28 */ \
28  std::uint64_t unk70; /* 40 */ \
29  bool pcControlsReady; /* 48 */ \
30  std::uint8_t pad79; /* 49 */ \
31  std::uint16_t pad7A; /* 4A */ \
32  std::uint32_t pad7C; /* 4C */
33 
35  };
36  static_assert(sizeof(RUNTIME_DATA) == 0x50);
37 
38  ~GiftMenu() override; // 00
39 
40  // override (IMenu)
41  void Accept(CallbackProcessor* a_processor) override; // 01
42  UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
43  void PostDisplay() override; // 06
44 
45  [[nodiscard]] static RefHandle GetTargetRefHandle();
46 
47  [[nodiscard]] inline RUNTIME_DATA& GetRuntimeData() noexcept
48  {
49  return REL::RelocateMember<RUNTIME_DATA>(this, 0x30, 0x40);
50  }
51 
52  [[nodiscard]] inline const RUNTIME_DATA& GetRuntimeData() const noexcept
53  {
54  return REL::RelocateMember<RUNTIME_DATA>(this, 0x30, 0x40);
55  }
56 
57  // members
58 #ifndef SKYRIM_CROSS_VR
59  RUNTIME_DATA_CONTENT // 30, 40
60 #endif
61  };
62 #ifndef ENABLE_SKYRIM_VR
63  static_assert(sizeof(GiftMenu) == 0x80);
64 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
65  static_assert(sizeof(GiftMenu) == 0x90);
66 #endif
67 }
68 #undef RUNTIME_DATA_CONTENT
#define RUNTIME_DATA_CONTENT
Definition: GiftMenu.h:23
Definition: FxDelegateHandler.h:19
Definition: GiftMenu.h:16
static RefHandle GetTargetRefHandle()
const RUNTIME_DATA & GetRuntimeData() const noexcept
Definition: GiftMenu.h:52
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
void Accept(CallbackProcessor *a_processor) override
static constexpr auto RTTI
Definition: GiftMenu.h:18
~GiftMenu() override
RUNTIME_DATA & GetRuntimeData() noexcept
Definition: GiftMenu.h:47
void PostDisplay() override
constexpr static std::string_view MENU_NAME
Definition: GiftMenu.h:19
Definition: IMenu.h:55
Definition: UIMessage.h:28
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_GiftMenu(688832, 396684, 0x1f46798)
UI_MESSAGE_RESULTS
Definition: IMenu.h:48
std::uint32_t RefHandle
Definition: BSCoreTypes.h:6
Definition: GiftMenu.h:22