CommonLibSSE NG
DialogueMenu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSTArray.h"
4 #include "RE/B/BSTEvent.h"
5 #include "RE/I/IMenu.h"
6 
7 namespace RE
8 {
9  class MenuOpenCloseEvent;
10 
11  // menuDepth = 3
12  // flags = kUpdateUsesCursor | kDontHideCursorWhenTopmost
13  // context = kMenuMode
14  class DialogueMenu :
15 #ifndef SKYRIM_CROSS_VR
16  public IMenu, // 00
17  public BSTEventSink<MenuOpenCloseEvent> // 30
18 #else
19  public IMenu // 00
20 #endif
21  {
22  public:
23  inline static constexpr auto RTTI = RTTI_DialogueMenu;
24  inline static constexpr auto VTABLE = VTABLE_DialogueMenu;
25  constexpr static std::string_view MENU_NAME = "Dialogue Menu";
26 
27  struct Data
28  {
29  void* unk00; // 00
30  std::uint64_t unk08; // 08
31  };
32  static_assert(sizeof(Data) == 0x10);
33 
34  struct RUNTIME_DATA
35  {
36 #define RUNTIME_DATA_CONTENT BSTArray<Data> unk38; /* 00 */
38  };
39 
40  ~DialogueMenu() override; // 00
41 
42  // override (IMenu)
43  void Accept(CallbackProcessor* a_processor) override; // 01
44  UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
45 
46 #ifndef SKYRIM_CROSS_VR
47  // override (BSTEventSink<MenuOpenCloseEvent>)
49 #endif
50 
52  {
53  return &REL::RelocateMember<BSTEventSink<MenuOpenCloseEvent>>(this, 0x30, 0x40);
54  }
55 
56  [[nodiscard]] const BSTEventSink<MenuOpenCloseEvent>* AsMenuOpenCloseEventSink() const noexcept
57  {
58  return const_cast<DialogueMenu*>(this)->AsMenuOpenCloseEventSink();
59  }
60 
61  [[nodiscard]] inline RUNTIME_DATA& GetRuntimeData() noexcept
62  {
63  return REL::RelocateMember<RUNTIME_DATA>(this, 0x38, 0x48);
64  }
65 
66  [[nodiscard]] inline const RUNTIME_DATA& GetRuntimeData() const noexcept
67  {
68  return REL::RelocateMember<RUNTIME_DATA>(this, 0x38, 0x48);
69  }
70 
71  // members
72 #ifndef SKYRIM_CROSS_VR
73  RUNTIME_DATA_CONTENT // 38, 48
74 #endif
75  };
76 #ifndef ENABLE_SKYRIM_VR
77  static_assert(sizeof(DialogueMenu) == 0x50);
78 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
79  static_assert(sizeof(DialogueMenu) == 0x60);
80 #endif
81 }
82 #undef RUNTIME_DATA_CONTENT
#define RUNTIME_DATA_CONTENT
Definition: DialogueMenu.h:36
Definition: BSTEvent.h:143
Definition: DialogueMenu.h:21
const BSTEventSink< MenuOpenCloseEvent > * AsMenuOpenCloseEventSink() const noexcept
Definition: DialogueMenu.h:56
~DialogueMenu() override
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
const RUNTIME_DATA & GetRuntimeData() const noexcept
Definition: DialogueMenu.h:66
constexpr static std::string_view MENU_NAME
Definition: DialogueMenu.h:25
static constexpr auto VTABLE
Definition: DialogueMenu.h:24
static constexpr auto RTTI
Definition: DialogueMenu.h:23
BSTEventSink< MenuOpenCloseEvent > * AsMenuOpenCloseEventSink() noexcept
Definition: DialogueMenu.h:51
BSEventNotifyControl ProcessEvent(const MenuOpenCloseEvent *a_event, BSTEventSource< MenuOpenCloseEvent > *a_eventSource) override
void Accept(CallbackProcessor *a_processor) override
RUNTIME_DATA & GetRuntimeData() noexcept
Definition: DialogueMenu.h:61
Definition: FxDelegateHandler.h:19
Definition: IMenu.h:55
Definition: MenuOpenCloseEvent.h:8
Definition: UIMessage.h:28
Definition: AbsorbEffect.h:6
constexpr std::array< REL::VariantID, 3 > VTABLE_DialogueMenu
Definition: Offsets_VTABLE.h:4033
UI_MESSAGE_RESULTS
Definition: IMenu.h:48
constexpr REL::VariantID RTTI_DialogueMenu(688829, 396681, 0x1f46728)
BSEventNotifyControl
Definition: BSTEvent.h:12
Definition: DialogueMenu.h:28
std::uint64_t unk08
Definition: DialogueMenu.h:30
void * unk00
Definition: DialogueMenu.h:29
Definition: DialogueMenu.h:35