CommonLibSSE NG
Loading...
Searching...
No Matches
FavoritesMenu.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"
7
8namespace RE
9{
10 class InventoryEntryData;
11 class TESForm;
12
13 // menuDepth = 3
14 // flags = kPausesGame | kUpdateUsesCursor | kInventoryItemMenu | kCustomRendering
15 // context = kFavorites
17#ifndef SKYRIM_CROSS_VR
18 public IMenu, // 00
19 public MenuEventHandler // 30
20#else
21 public IMenu // 00
22#endif
23 {
24 public:
25 inline static constexpr auto RTTI = RTTI_FavoritesMenu;
26 constexpr static std::string_view MENU_NAME = "FavoritesMenu";
27
28 struct Entry
29 {
30 TESForm* item; // 00
32 };
33 static_assert(sizeof(Entry) == 0x10);
34
36 {
37#define RUNTIME_DATA_CONTENT \
38 GFxValue root; /* 00 - "Menu_mc" */ \
39 BSTArray<Entry> favorites; /* 18 */ \
40 std::uint16_t unk70; /* 30 */ \
41 bool pcControlsReady; /* 32 */ \
42 bool isVampire; /* 33 */ \
43 std::uint32_t pad74; /* 34 */
44
46 };
47 static_assert(sizeof(RUNTIME_DATA) == 0x38);
48
49 ~FavoritesMenu() override; // 00
50
51 // override (IMenu)
52 void Accept(CallbackProcessor* a_processor) override; // 01
53 UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
54
55 // override (MenuEventHandler)
56#ifndef SKYRIM_CROSS_VR
57 bool CanProcess(InputEvent* a_event) override; // 01
58 bool ProcessKinect(KinectEvent* a_event) override; // 02
59 bool ProcessButton(ButtonEvent* a_event) override; // 05
60#endif
61
62 [[nodiscard]] MenuEventHandler* AsMenuEventHandler() noexcept
63 {
64 return &REL::RelocateMember<MenuEventHandler>(this, 0x30, 0x40);
65 }
66
67 [[nodiscard]] const MenuEventHandler* AsMenuEventHandler() const noexcept
68 {
69 return const_cast<FavoritesMenu*>(this)->AsMenuEventHandler();
70 }
71
72 [[nodiscard]] inline RUNTIME_DATA& GetRuntimeData() noexcept
73 {
74 return REL::RelocateMember<RUNTIME_DATA>(this, 0x40, 0x50);
75 }
76
77 [[nodiscard]] inline const RUNTIME_DATA& GetRuntimeData() const noexcept
78 {
79 return REL::RelocateMember<RUNTIME_DATA>(this, 0x40, 0x50);
80 }
81
82 // members
83#ifndef SKYRIM_CROSS_VR
84 RUNTIME_DATA_CONTENT // 40, 50
85#endif
86 };
87#ifndef ENABLE_SKYRIM_VR
88 static_assert(sizeof(FavoritesMenu) == 0x78);
89#elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
90 static_assert(sizeof(FavoritesMenu) == 0x88);
91#endif
92}
93#undef RUNTIME_DATA_CONTENT
#define RUNTIME_DATA_CONTENT
Definition Actor.h:633
Definition ButtonEvent.h:11
Definition FavoritesMenu.h:23
static constexpr std::string_view MENU_NAME
Definition FavoritesMenu.h:26
const RUNTIME_DATA & GetRuntimeData() const noexcept
Definition FavoritesMenu.h:77
~FavoritesMenu() override
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
MenuEventHandler * AsMenuEventHandler() noexcept
Definition FavoritesMenu.h:62
bool ProcessButton(ButtonEvent *a_event) override
RUNTIME_DATA & GetRuntimeData() noexcept
Definition FavoritesMenu.h:72
bool ProcessKinect(KinectEvent *a_event) override
bool CanProcess(InputEvent *a_event) override
const MenuEventHandler * AsMenuEventHandler() const noexcept
Definition FavoritesMenu.h:67
static constexpr auto RTTI
Definition FavoritesMenu.h:25
void Accept(CallbackProcessor *a_processor) override
Definition FxDelegateHandler.h:19
Definition IMenu.h:55
Definition InputEvent.h:22
Definition InventoryEntryData.h:15
Definition KinectEvent.h:9
Definition MenuEventHandler.h:14
Definition TESForm.h:35
Definition UIMessage.h:28
Definition AbsorbEffect.h:6
UI_MESSAGE_RESULTS
Definition IMenu.h:48
constexpr REL::VariantID RTTI_FavoritesMenu(688831, 396683, 0x1f46770)
Definition FavoritesMenu.h:29
InventoryEntryData * entryData
Definition FavoritesMenu.h:31
TESForm * item
Definition FavoritesMenu.h:30
Definition FavoritesMenu.h:36