CommonLibSSE NG
Loading...
Searching...
No Matches
IMenu.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/F/FxDelegate.h"
5#include "RE/G/GFxMovieView.h"
6#include "RE/G/GPtr.h"
7#include "RE/U/UserEvents.h"
8
9namespace RE
10{
11 class CallbackProcessor;
12 class UIMessage;
13
14 enum class UI_MENU_FLAGS
15 {
16 kNone = 0,
17 kPausesGame = 1 << 0,
18 kAlwaysOpen = 1 << 1,
19 kUsesCursor = 1 << 2,
20 kUsesMenuContext = 1 << 3,
21 kModal = 1 << 4, // prevents lower movies with this flag from advancing
23 kOnStack = 1 << 6,
24 kDisablePauseMenu = 1 << 7,
25 kRequiresUpdate = 1 << 8,
26 kTopmostRenderedMenu = 1 << 9,
27 kUpdateUsesCursor = 1 << 10,
28 kAllowSaving = 1 << 11,
30 kInventoryItemMenu = 1 << 13,
32 kCustomRendering = 1 << 15,
34 kApplicationMenu = 1 << 17,
35 kHasButtonBar = 1 << 18,
36 kIsTopButtonBar = 1 << 19,
38 kRendersUnderPauseMenu = 1 << 21,
39 kUsesBlurredBackground = 1 << 22,
40 kCompanionAppAllowed = 1 << 23,
41 kFreezeFramePause = 1 << 24,
45 };
46
48 {
49 kHandled = 0,
50 kIgnore = 1,
51 kPassOn = 2
52 };
53
54 class IMenu : public FxDelegateHandler
55 {
56 public:
57 inline static constexpr auto RTTI = RTTI_IMenu;
58
61
62 ~IMenu() override = default; // 00
63
64 // override (FxDelegateHandler)
65 void Accept(CallbackProcessor* a_processor) override; // 01 - { return; }
66
67 // add
68 virtual void PostCreate(); // 02 - { return; }
69 virtual void Unk_03(void); // 03 - { return; }
70 virtual UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message); // 04
71 virtual void AdvanceMovie(float a_interval, std::uint32_t a_currentTime); // 05
72 virtual void PostDisplay(); // 06
73 virtual void PreDisplay(); // 07 - { return; } - only available if kRendersOffscreenTargets is set
74 virtual void RefreshPlatform(); // 08
75
76 [[nodiscard]] constexpr bool AdvancesUnderPauseMenu() const noexcept { return menuFlags.all(Flag::kAdvancesUnderPauseMenu); }
77 [[nodiscard]] constexpr bool AllowSaving() const noexcept { return menuFlags.all(Flag::kAllowSaving); }
78 [[nodiscard]] constexpr bool AlwaysOpen() const noexcept { return menuFlags.all(Flag::kAlwaysOpen); }
79 [[nodiscard]] constexpr bool ApplicationMenu() const noexcept { return menuFlags.all(Flag::kApplicationMenu); }
80 [[nodiscard]] constexpr bool AssignCursorToRenderer() const noexcept { return menuFlags.all(Flag::kAssignCursorToRenderer); }
81 [[nodiscard]] constexpr bool CustomRendering() const noexcept { return menuFlags.all(Flag::kCustomRendering); }
82 [[nodiscard]] constexpr bool CompanionAppAllowed() const noexcept { return menuFlags.all(Flag::kCompanionAppAllowed); }
83 [[nodiscard]] constexpr bool DisablePauseMenu() const noexcept { return menuFlags.all(Flag::kDisablePauseMenu); }
84 [[nodiscard]] constexpr bool DontHideCursorWhenTopmost() const noexcept { return menuFlags.all(Flag::kDontHideCursorWhenTopmost); }
85 [[nodiscard]] constexpr bool FreezeFrameBackground() const noexcept { return menuFlags.all(Flag::kFreezeFrameBackground); }
86 [[nodiscard]] constexpr bool FreezeFramePause() const noexcept { return menuFlags.all(Flag::kFreezeFramePause); }
87 [[nodiscard]] constexpr bool HasButtonBar() const noexcept { return menuFlags.all(Flag::kHasButtonBar); }
88 [[nodiscard]] constexpr bool InventoryItemMenu() const noexcept { return menuFlags.all(Flag::kInventoryItemMenu); }
89 [[nodiscard]] constexpr bool IsTopButtonBar() const noexcept { return menuFlags.all(Flag::kIsTopButtonBar); }
90 [[nodiscard]] constexpr bool LargeScaleformRenderCacheMode() const noexcept { return menuFlags.all(Flag::kLargeScaleformRenderCacheMode); }
91 [[nodiscard]] constexpr bool Modal() const noexcept { return menuFlags.all(Flag::kModal); }
92 [[nodiscard]] constexpr bool OnStack() const noexcept { return menuFlags.all(Flag::kOnStack); }
93 [[nodiscard]] constexpr bool PausesGame() const noexcept { return menuFlags.all(Flag::kPausesGame); }
94 [[nodiscard]] constexpr bool RendersOffscreenTargets() const noexcept { return menuFlags.all(Flag::kRendersOffscreenTargets); }
95 [[nodiscard]] constexpr bool RendersUnderPauseMenu() const noexcept { return menuFlags.all(Flag::kRendersUnderPauseMenu); }
96 [[nodiscard]] constexpr bool RequiresUpdate() const noexcept { return menuFlags.all(Flag::kRequiresUpdate); }
97 [[nodiscard]] constexpr bool SkipRenderDuringFreezeFrameScreenshot() const noexcept { return menuFlags.all(Flag::kSkipRenderDuringFreezeFrameScreenshot); }
98 [[nodiscard]] constexpr bool TopmostRenderedMenu() const noexcept { return menuFlags.all(Flag::kTopmostRenderedMenu); }
99 [[nodiscard]] constexpr bool UpdateUsesCursor() const noexcept { return menuFlags.all(Flag::kUsesBlurredBackground); }
100 [[nodiscard]] constexpr bool UsesBlurredBackground() const noexcept { return menuFlags.all(Flag::kUsesCursor); }
101 [[nodiscard]] constexpr bool UsesCursor() const noexcept { return menuFlags.all(Flag::kUsesMenuContext); }
102 [[nodiscard]] constexpr bool UsesMenuContext() const noexcept { return menuFlags.all(Flag::kUsesMovementToDirection); }
103 [[nodiscard]] constexpr bool UsesMovementToDirection() const noexcept { return menuFlags.all(Flag::kUpdateUsesCursor); }
104
105 // members
106 GPtr<GFxMovieView> uiMovie{ nullptr }; // 10
107 std::int8_t depthPriority{ 3 }; // 18
108 std::uint8_t pad19{ 0 }; // 19
109 std::uint16_t pad20{ 0 }; // 1A
112 std::uint32_t pad24{ 0 }; // 24
113 GPtr<FxDelegate> fxDelegate{ nullptr }; // 28
114#if !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
115 std::int32_t unk30{ -1 };
116 std::int32_t unk34{ 1 };
117 std::uint64_t unk38{ 0 };
118#endif
119 };
120#ifndef ENABLE_SKYRIM_VR
121 static_assert(sizeof(IMenu) == 0x30);
122#elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
123 static_assert(sizeof(IMenu) == 0x40);
124#endif
125}
Definition FxDelegateHandler.h:19
Definition FxDelegateHandler.h:12
Definition GPtr.h:7
Definition IMenu.h:55
~IMenu() override=default
constexpr bool UsesCursor() const noexcept
Definition IMenu.h:101
constexpr bool AlwaysOpen() const noexcept
Definition IMenu.h:78
constexpr bool RendersOffscreenTargets() const noexcept
Definition IMenu.h:94
GPtr< FxDelegate > fxDelegate
Definition IMenu.h:113
constexpr bool UsesMenuContext() const noexcept
Definition IMenu.h:102
constexpr bool Modal() const noexcept
Definition IMenu.h:91
std::uint64_t unk38
Definition IMenu.h:117
std::uint32_t pad24
Definition IMenu.h:112
constexpr bool UsesMovementToDirection() const noexcept
Definition IMenu.h:103
virtual void PostDisplay()
virtual UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message)
void Accept(CallbackProcessor *a_processor) override
constexpr bool AssignCursorToRenderer() const noexcept
Definition IMenu.h:80
stl::enumeration< Context, std::uint32_t > inputContext
Definition IMenu.h:111
std::int32_t unk34
Definition IMenu.h:116
static constexpr auto RTTI
Definition IMenu.h:57
constexpr bool RendersUnderPauseMenu() const noexcept
Definition IMenu.h:95
virtual void PreDisplay()
constexpr bool UpdateUsesCursor() const noexcept
Definition IMenu.h:99
stl::enumeration< UI_MENU_FLAGS, std::uint32_t > menuFlags
Definition IMenu.h:110
virtual void PostCreate()
constexpr bool LargeScaleformRenderCacheMode() const noexcept
Definition IMenu.h:90
constexpr bool OnStack() const noexcept
Definition IMenu.h:92
constexpr bool CustomRendering() const noexcept
Definition IMenu.h:81
constexpr bool PausesGame() const noexcept
Definition IMenu.h:93
virtual void AdvanceMovie(float a_interval, std::uint32_t a_currentTime)
constexpr bool UsesBlurredBackground() const noexcept
Definition IMenu.h:100
std::int8_t depthPriority
Definition IMenu.h:107
constexpr bool InventoryItemMenu() const noexcept
Definition IMenu.h:88
constexpr bool TopmostRenderedMenu() const noexcept
Definition IMenu.h:98
virtual void Unk_03(void)
std::int32_t unk30
Definition IMenu.h:115
GPtr< GFxMovieView > uiMovie
Definition IMenu.h:106
std::uint8_t pad19
Definition IMenu.h:108
constexpr bool FreezeFrameBackground() const noexcept
Definition IMenu.h:85
constexpr bool HasButtonBar() const noexcept
Definition IMenu.h:87
constexpr bool AdvancesUnderPauseMenu() const noexcept
Definition IMenu.h:76
std::uint16_t pad20
Definition IMenu.h:109
constexpr bool SkipRenderDuringFreezeFrameScreenshot() const noexcept
Definition IMenu.h:97
constexpr bool IsTopButtonBar() const noexcept
Definition IMenu.h:89
constexpr bool AllowSaving() const noexcept
Definition IMenu.h:77
constexpr bool FreezeFramePause() const noexcept
Definition IMenu.h:86
constexpr bool DisablePauseMenu() const noexcept
Definition IMenu.h:83
constexpr bool ApplicationMenu() const noexcept
Definition IMenu.h:79
constexpr bool DontHideCursorWhenTopmost() const noexcept
Definition IMenu.h:84
constexpr bool RequiresUpdate() const noexcept
Definition IMenu.h:96
constexpr bool CompanionAppAllowed() const noexcept
Definition IMenu.h:82
virtual void RefreshPlatform()
Definition UIMessage.h:28
INPUT_CONTEXT_IDS::INPUT_CONTEXT_ID INPUT_CONTEXT_ID
Definition UserEvents.h:38
Definition PCH.h:223
constexpr bool all(Args... a_args) const noexcept
Definition PCH.h:296
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_IMenu(686416, 394236, 0x1efd890)
UI_MESSAGE_RESULTS
Definition IMenu.h:48
UI_MENU_FLAGS
Definition IMenu.h:15
@ kSkipRenderDuringFreezeFrameScreenshot
INPUT_CONTEXT_ID
Definition UserEvents.h:14