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