CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
MenuControls.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/B/BSTSingleton.h"
7
8namespace RE
9{
10 class InputEvent;
11 class MenuEventHandler;
12 class MenuModeChangeEvent;
13 struct ClickHandler;
14 struct ConsoleOpenHandler;
15 struct DirectionHandler;
16 struct FavoritesHandler;
17 struct MenuOpenHandler;
18 struct QuickSaveLoadHandler;
19 struct ScreenshotHandler;
20
22 public BSTEventSink<InputEvent*>, // 00
23 public BSTSingletonSDM<MenuControls>, // 10
24 public BSTEventSink<MenuModeChangeEvent> // 08
25 {
26 public:
27 struct QueuedReg
28 {
29 public:
30 QueuedReg(MenuEventHandler* a_handler, bool a_add);
31 ~QueuedReg() = default;
32
33 // members
35 bool add; // 08
36 std::uint8_t pad08; // 09
37 std::uint16_t pad09; // 0A
38 std::uint32_t pad0A; // 0C
39 };
40 static_assert(sizeof(QueuedReg) == 0x10);
41
42 ~MenuControls() override; // 00
43
44 // override (BSTEventSink<InputEvent*>)
45 BSEventNotifyControl ProcessEvent(InputEvent* const* a_event, BSTEventSource<InputEvent*>* a_eventSource) override; // 01
46
47 // override (BSTEventSink<MenuModeChangeEvent>)
48 BSEventNotifyControl ProcessEvent(const MenuModeChangeEvent* a_event, BSTEventSource<MenuModeChangeEvent>* a_eventSource) override; // 01
49
51
52 void AddHandler(MenuEventHandler* a_handler);
53 [[nodiscard]] constexpr bool InBeastForm() const noexcept { return beastForm; }
57
58 // members
59 std::uint8_t pad11; // 11
60 std::uint16_t pad12; // 12
61 std::uint32_t pad14; // 14
71 bool isProcessing; // 80
72 bool beastForm; // 81
73 bool remapMode; // 82
74 std::uint8_t unk83; // 83
75 std::uint32_t unk84; // 84
76 };
77 static_assert(offsetof(MenuControls, handlers) == 0x18);
78 static_assert(offsetof(MenuControls, remapMode) == 0x82);
79 static_assert(sizeof(MenuControls) == 0x88);
80}
Definition: BSTArray.h:377
Definition: BSTEvent.h:146
Definition: BSTEvent.h:28
Definition: BSTSmartPointer.h:37
Definition: InputEvent.h:22
Definition: MenuControls.h:25
BSTSmartPointer< DirectionHandler > directionHandler
Definition: MenuControls.h:65
bool beastForm
Definition: MenuControls.h:72
std::uint8_t unk83
Definition: MenuControls.h:74
BSTSmartPointer< ScreenshotHandler > screenshotHandler
Definition: MenuControls.h:70
std::uint8_t pad11
Definition: MenuControls.h:59
BSTSmartPointer< FavoritesHandler > favoritesHandler
Definition: MenuControls.h:69
BSTArray< MenuEventHandler * > handlers
Definition: MenuControls.h:62
BSTSmartPointer< MenuOpenHandler > menuOpenHandler
Definition: MenuControls.h:68
static MenuControls * GetSingleton()
std::uint32_t pad14
Definition: MenuControls.h:61
BSTSmartPointer< QuickSaveLoadHandler > quickSaveLoadHandler
Definition: MenuControls.h:67
BSEventNotifyControl ProcessEvent(const MenuModeChangeEvent *a_event, BSTEventSource< MenuModeChangeEvent > *a_eventSource) override
void RemoveHandler(MenuEventHandler *a_handler)
void RegisterHandler(MenuEventHandler *a_handler)
BSTArray< QueuedReg > regBuffer
Definition: MenuControls.h:63
bool isProcessing
Definition: MenuControls.h:71
BSTSmartPointer< ConsoleOpenHandler > consoleOpenHandler
Definition: MenuControls.h:66
void UnregisterHandler(MenuEventHandler *a_handler)
std::uint32_t unk84
Definition: MenuControls.h:75
bool remapMode
Definition: MenuControls.h:73
BSTSmartPointer< ClickHandler > clickHandler
Definition: MenuControls.h:64
std::uint16_t pad12
Definition: MenuControls.h:60
void AddHandler(MenuEventHandler *a_handler)
~MenuControls() override
BSEventNotifyControl ProcessEvent(InputEvent *const *a_event, BSTEventSource< InputEvent * > *a_eventSource) override
constexpr bool InBeastForm() const noexcept
Definition: MenuControls.h:53
Definition: MenuEventHandler.h:14
Definition: AbsorbEffect.h:6
BSEventNotifyControl
Definition: BSTEvent.h:12
Definition: BSTSingleton.h:50
Definition: MenuControls.h:28
MenuEventHandler * handler
Definition: MenuControls.h:34
std::uint32_t pad0A
Definition: MenuControls.h:38
std::uint8_t pad08
Definition: MenuControls.h:36
std::uint16_t pad09
Definition: MenuControls.h:37
bool add
Definition: MenuControls.h:35
QueuedReg(MenuEventHandler *a_handler, bool a_add)