CommonLibSSE NG
CursorMenu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/I/IMenu.h"
5 
6 namespace RE
7 {
8  // menuDepth = 13
9  // flags = kAllowSaving | kCustomRendering
10  // context = kNone
11  class CursorMenu :
12 #ifndef SKYRIM_CROSS_VR
13  public IMenu, // 00
14  public MenuEventHandler // 30
15 #else
16  public IMenu // 00
17 #endif
18  {
19  public:
20  inline static constexpr auto RTTI = RTTI_CursorMenu;
21  constexpr static std::string_view MENU_NAME = "Cursor Menu";
22 
23  ~CursorMenu() override; // 00
24 
25  // override (IMenu)
26  UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
27 
28  // override (MenuEventHandler)
29 #ifndef SKYRIM_CROSS_VR
30  bool CanProcess(InputEvent* a_event) override; // 01
31  bool ProcessThumbstick(ThumbstickEvent* a_event) override; // 03
32  bool ProcessMouseMove(MouseMoveEvent* a_event) override; // 04
33 #endif
34 
35  [[nodiscard]] MenuEventHandler* AsMenuEventHandler() noexcept
36  {
37  return &REL::RelocateMember<MenuEventHandler>(this, 0x30, 0x40);
38  }
39 
40  [[nodiscard]] const MenuEventHandler* AsMenuEventHandler() const noexcept
41  {
42  return const_cast<CursorMenu*>(this)->AsMenuEventHandler();
43  }
44  };
45 #ifndef ENABLE_SKYRIM_VR
46  static_assert(sizeof(CursorMenu) == 0x40);
47 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
48  static_assert(sizeof(CursorMenu) == 0x50);
49 #endif
50 }
Definition: CursorMenu.h:18
bool ProcessThumbstick(ThumbstickEvent *a_event) override
bool ProcessMouseMove(MouseMoveEvent *a_event) override
static constexpr auto RTTI
Definition: CursorMenu.h:20
constexpr static std::string_view MENU_NAME
Definition: CursorMenu.h:21
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
bool CanProcess(InputEvent *a_event) override
~CursorMenu() override
MenuEventHandler * AsMenuEventHandler() noexcept
Definition: CursorMenu.h:35
const MenuEventHandler * AsMenuEventHandler() const noexcept
Definition: CursorMenu.h:40
Definition: IMenu.h:55
Definition: InputEvent.h:25
Definition: MenuEventHandler.h:14
Definition: MouseMoveEvent.h:8
Definition: ThumbstickEvent.h:8
Definition: UIMessage.h:28
Definition: AbsorbEffect.h:6
UI_MESSAGE_RESULTS
Definition: IMenu.h:48
constexpr REL::VariantID RTTI_CursorMenu(688828, 396680, 0x1f46700)