CommonLibSSE (powerof3)
HUDMenu.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/G/GFxValue.h"
6 #include "RE/I/IMenu.h"
7 
8 namespace RE
9 {
10  class ActorValueMeter;
11  class HUDObject;
12  class ShoutMeter;
13  class UserEventEnabledEvent;
14  struct BSRemoteGamepadEvent;
15 
16  // menuDepth = 2
17  // flags = kAlwaysOpen | kRequiresUpdate | kAllowSaving | kCustomRendering | kAssignCursorToRenderer
18  // context = kNone
19  class HUDMenu :
20  public IMenu, // 00
21  public BSTEventSink<UserEventEnabledEvent>, // 30
22  public BSTEventSink<BSRemoteGamepadEvent> // 38
23  {
24  public:
25  inline static constexpr auto RTTI = RTTI_HUDMenu;
26  inline static constexpr auto VTABLE = VTABLE_HUDMenu;
27  constexpr static std::string_view MENU_NAME = "HUD Menu";
28 
29  ~HUDMenu() override; // 00
30 
31  // override (IMenu)
32  void Accept(CallbackProcessor* a_processor) override; // 01
33  UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
34  void AdvanceMovie(float a_interval, std::uint32_t a_currentTime) override; // 05
35  void RefreshPlatform() override; // 08
36 
37  // override (BSTEventSink<UserEventEnabledEvent>)
38  BSEventNotifyControl ProcessEvent(const UserEventEnabledEvent* a_event, BSTEventSource<UserEventEnabledEvent>* a_eventSource) override; // 01
39 
40  // override (BSTEventSink<BSRemoteGamepadEvent>)
41  BSEventNotifyControl ProcessEvent(const BSRemoteGamepadEvent* a_event, BSTEventSource<BSRemoteGamepadEvent>* a_eventSource) override; // 01
42 
43  static void FlashMeter(ActorValue a_actorValue)
44  {
45  using func_t = decltype(&HUDMenu::FlashMeter);
46  static REL::Relocation<func_t> func{ RELOCATION_ID(51907, 52845) };
47  return func(a_actorValue);
48  }
49 
50  static void UpdateCrosshairMagicTarget(bool a_valid)
51  {
52  using func_t = decltype(&HUDMenu::UpdateCrosshairMagicTarget);
53  static REL::Relocation<func_t> func{ RELOCATION_ID(50738, 51633) };
54  return func(a_valid);
55  }
56 
57  // members
62  ShoutMeter* shout; // 70
63  GFxValue root; // 78 - kDisplayObject - "_level0.HUDMovieBaseInstance"
64  std::uint64_t unk90; // 90
65  };
66  static_assert(sizeof(HUDMenu) == 0x98);
67 }
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:505
Definition: Relocation.h:210
Definition: ActorValueMeter.h:9
Definition: BSTArray.h:378
Definition: BSTEvent.h:143
Definition: BSTEvent.h:19
Definition: FxDelegateHandler.h:20
Definition: GFxValue.h:92
Definition: HUDMenu.h:23
~HUDMenu() override
ActorValueMeter * magicka
Definition: HUDMenu.h:61
BSTArray< HUDObject * > objects
Definition: HUDMenu.h:58
constexpr static std::string_view MENU_NAME
Definition: HUDMenu.h:27
BSEventNotifyControl ProcessEvent(const UserEventEnabledEvent *a_event, BSTEventSource< UserEventEnabledEvent > *a_eventSource) override
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
ShoutMeter * shout
Definition: HUDMenu.h:62
static void UpdateCrosshairMagicTarget(bool a_valid)
Definition: HUDMenu.h:50
static constexpr auto VTABLE
Definition: HUDMenu.h:26
GFxValue root
Definition: HUDMenu.h:63
void RefreshPlatform() override
void Accept(CallbackProcessor *a_processor) override
std::uint64_t unk90
Definition: HUDMenu.h:64
void AdvanceMovie(float a_interval, std::uint32_t a_currentTime) override
static void FlashMeter(ActorValue a_actorValue)
Definition: HUDMenu.h:43
ActorValueMeter * stamina
Definition: HUDMenu.h:60
ActorValueMeter * health
Definition: HUDMenu.h:59
static constexpr auto RTTI
Definition: HUDMenu.h:25
BSEventNotifyControl ProcessEvent(const BSRemoteGamepadEvent *a_event, BSTEventSource< BSRemoteGamepadEvent > *a_eventSource) override
Definition: IMenu.h:55
Definition: ShoutMeter.h:8
Definition: UIMessage.h:28
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_HUDMenu(static_cast< std::uint64_t >(688836))
ActorValue
Definition: ActorValues.h:6
UI_MESSAGE_RESULTS
Definition: IMenu.h:48
constexpr std::array< REL::ID, 3 > VTABLE_HUDMenu
Definition: Offsets_VTABLE.h:11733
BSEventNotifyControl
Definition: BSTEvent.h:12