CommonLibSSE NG
Loading...
Searching...
No Matches
MistMenu.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/I/IMenu.h"
5#include "RE/N/NiColor.h"
6#include "RE/N/NiMatrix3.h"
8
9namespace RE
10{
11 class BSLightingShaderProperty;
12 class NiAVObject;
13 class NiControllerManager;
14 class NiControllerSequence;
15
16 struct ImageSpaceBaseData;
17
18 // menuDepth = 8
19 // flags = kDisablePauseMenu | kAllowSaving | kDontHideCursorWhenTopmost
20 // context = kNone
21 class MistMenu :
22#ifndef SKYRIM_CROSS_VR
23 public IMenu, // 00
24 public SimpleAnimationGraphManagerHolder, // 30, 40
25 public MenuEventHandler // 48, 58
26#else
27 public IMenu // 00
28#endif
29 {
30 public:
31 inline static constexpr auto RTTI = RTTI_MistMenu;
32 inline static constexpr auto VTABLE = VTABLE_MistMenu;
33 constexpr static std::string_view MENU_NAME = "Mist Menu";
34
35 struct Colors
36 {
37 enum Color
38 {
45
46 kTotal
47 };
48 };
49
51 {
52#define RUNTIME_DATA_CONTENT \
53 NiColor ambientColors[Colors::kTotal]; /* 058 */ \
54 std::uint32_t unk0A0; /* 0A0 */ \
55 std::uint32_t unk0A4; /* 0A4 */ \
56 std::uint64_t unk0A8; /* 0A8 */ \
57 NiPointer<NiNode> mistModel; /* 0B0 - smart ptr */ \
58 void* mistModelDBHandle; /* 0B8 */ \
59 void* loadScreenDBHandle; /* 0C0 */ \
60 NiPointer<BSFadeNode> cameraPath; /* 0C8 - parent of cameraPathNode */ \
61 NiPointer<NiNode> cameraPathNode; /* 0D0 - smart ptr */ \
62 NiPointer<NiControllerSequence> cameraPathSequence; /* 0D8 - smart ptr */ \
63 NiPointer<NiControllerManager> cameraPathController; /* 0E0 - smart ptr */ \
64 BSLightingShaderProperty* logoShaderProperty; /* 0E8 - default logo only */ \
65 NiPointer<BSFadeNode> loadScreenModel; /* 0F0 */ \
66 ImageSpaceBaseData* originalImageSpace; /* 0F8 - imagespacedata? */ \
67 float cameraFOV; /* 100 */ \
68 float angleZ; /* 104 */ \
69 float unk108; /* 108 */ \
70 float unk10C; /* 10C */ \
71 NiMatrix3 cameraRotate; /* 110 */ \
72 bool showMist; /* 134 */ \
73 bool showLoadScreen; /* 135 */ \
74 std::uint8_t unk136; /* 136 */ \
75 std::uint8_t unk137; /* 137 */ \
76 std::uint8_t unk138; /* 138 - initCameraPath? */ \
77 std::uint8_t unk139; /* 139 - cameraPath related */ \
78 bool leftButtonHeldDown; /* 13A */ \
79 bool rightButtonHeldDown; /* 13B */ \
80 std::uint32_t pad13C; /* 13C */
81
83 };
84 static_assert(sizeof(RUNTIME_DATA) == 0xE8);
85
86 ~MistMenu() override; // 00
87
88 // override (IMenu)
89 UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
90 void AdvanceMovie(float a_interval, std::uint32_t a_currentTime) override; // 05
91 void PostDisplay() override; // 06
92
93 // override (MenuEventHandler)
94#ifndef SKYRIM_CROSS_VR
95 bool CanProcess(InputEvent* a_event) override; // 01
96 bool ProcessThumbstick(ThumbstickEvent* a_event) override; // 03
97 bool ProcessMouseMove(MouseMoveEvent* a_event) override; // 04
98 bool ProcessButton(ButtonEvent* a_event) override; // 05
99#endif
100
102 {
103 return &REL::RelocateMember<SimpleAnimationGraphManagerHolder>(this, 0x30, 0x40);
104 }
105
107 {
108 return const_cast<MistMenu*>(this)->AsSimpleAnimationGraphManagerHolder();
109 }
110
111 [[nodiscard]] MenuEventHandler* AsMenuEventHandler() noexcept
112 {
113 return &REL::RelocateMember<MenuEventHandler>(this, 0x48, 0x58);
114 }
115
116 [[nodiscard]] const MenuEventHandler* AsMenuEventHandler() const noexcept
117 {
118 return const_cast<MistMenu*>(this)->AsMenuEventHandler();
119 }
120
121 [[nodiscard]] inline RUNTIME_DATA& GetRuntimeData() noexcept
122 {
123 return REL::RelocateMember<RUNTIME_DATA>(this, 0x58, 0x68);
124 }
125
126 [[nodiscard]] inline const RUNTIME_DATA& GetRuntimeData() const noexcept
127 {
128 return REL::RelocateMember<RUNTIME_DATA>(this, 0x58, 0x68);
129 }
130
131 [[nodiscard]] static MistMenu* GetSingleton()
132 {
133 REL::Relocation<MistMenu**> singleton{ RELOCATION_ID(519827, 406370) };
134 return *singleton;
135 }
136
137 // members
138#ifndef SKYRIM_CROSS_VR
139 RUNTIME_DATA_CONTENT // 58, 68
140#endif
141 };
142#ifndef ENABLE_SKYRIM_VR
143 static_assert(sizeof(MistMenu) == 0x140);
144#elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
145 static_assert(sizeof(MistMenu) == 0x150);
146#endif
147}
148#undef RUNTIME_DATA_CONTENT
#define RUNTIME_DATA_CONTENT
Definition Actor.h:633
#define RELOCATION_ID(a_se, a_ae)
Definition PCH.h:794
Definition ButtonEvent.h:11
Definition IMenu.h:55
Definition InputEvent.h:22
Definition MenuEventHandler.h:14
Definition MistMenu.h:29
const SimpleAnimationGraphManagerHolder * AsSimpleAnimationGraphManagerHolder() const noexcept
Definition MistMenu.h:106
static constexpr auto RTTI
Definition MistMenu.h:31
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
void AdvanceMovie(float a_interval, std::uint32_t a_currentTime) override
SimpleAnimationGraphManagerHolder * AsSimpleAnimationGraphManagerHolder() noexcept
Definition MistMenu.h:101
static constexpr auto VTABLE
Definition MistMenu.h:32
bool CanProcess(InputEvent *a_event) override
void PostDisplay() override
static MistMenu * GetSingleton()
Definition MistMenu.h:131
bool ProcessMouseMove(MouseMoveEvent *a_event) override
static constexpr std::string_view MENU_NAME
Definition MistMenu.h:33
const RUNTIME_DATA & GetRuntimeData() const noexcept
Definition MistMenu.h:126
const MenuEventHandler * AsMenuEventHandler() const noexcept
Definition MistMenu.h:116
bool ProcessThumbstick(ThumbstickEvent *a_event) override
~MistMenu() override
MenuEventHandler * AsMenuEventHandler() noexcept
Definition MistMenu.h:111
RUNTIME_DATA & GetRuntimeData() noexcept
Definition MistMenu.h:121
bool ProcessButton(ButtonEvent *a_event) override
Definition MouseMoveEvent.h:8
Definition SimpleAnimationGraphManagerHolder.h:11
Definition ThumbstickEvent.h:8
Definition UIMessage.h:28
Definition Relocation.h:1638
Definition AbsorbEffect.h:6
UI_MESSAGE_RESULTS
Definition IMenu.h:48
constexpr REL::VariantID RTTI_MistMenu(688896, 396751, 0x1f475e8)
constexpr std::array< REL::VariantID, 3 > VTABLE_MistMenu
Definition Offsets_VTABLE.h:4087
Definition MistMenu.h:36
Color
Definition MistMenu.h:38
@ kTotal
Definition MistMenu.h:46
@ kZPos
Definition MistMenu.h:44
@ kXPos
Definition MistMenu.h:40
@ kXNeg
Definition MistMenu.h:39
@ kYPos
Definition MistMenu.h:42
@ kZNeg
Definition MistMenu.h:43
@ kYNeg
Definition MistMenu.h:41
Definition MistMenu.h:51