CommonLibVR
BookMenu.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "RE/B/BSString.h"
5 #include "RE/B/BSTEvent.h"
6 #include "RE/G/GPtr.h"
7 #include "RE/I/IMenu.h"
8 #include "RE/N/NiMatrix3.h"
9 #include "RE/N/NiSmartPointer.h"
11 
12 namespace RE
13 {
14  struct BSAnimationGraphEvent;
15 
16  class BSGeometry;
17  class ExtraDataList;
18  class NiAVObject;
19  class NiSourceTexture;
20  class TESObjectBOOK;
21  class TESObjectREFR;
22 
23  // menuDepth = 1
24  // flags = kPausesGame | kUsesMenuContext | kDisablePauseMenu | kRequiresUpdate | kTopmostRenderedMenu | kRendersOffscreenTargets
25  // context = kBook
26  class BookMenu :
27  public IMenu, // 00
29  public BSTEventSink<BSAnimationGraphEvent> // 48
30  {
31  public:
32  inline static constexpr auto RTTI = RTTI_BookMenu;
33  inline static constexpr auto VTABLE = VTABLE_BookMenu;
34  constexpr static std::string_view MENU_NAME = "Book Menu";
35 
36  ~BookMenu() override; // 00
37 
38  // override (IMenu)
39  UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
40  void AdvanceMovie(float a_interval, std::uint32_t a_currentTime) override; // 05
41  void PostDisplay() override; // 06
42  void PreDisplay() override; // 07
43 
44  // override (BSTEventSink<BSAnimationGraphEvent>)
46 
47  [[nodiscard]] static TESObjectBOOK* GetTargetForm();
48  [[nodiscard]] static TESObjectREFR* GetTargetReference(); // returns null if opened from inventory
49 
50  static void OpenBookMenu(const BSString& a_description, const ExtraDataList* a_extraList, TESObjectREFR* a_ref, TESObjectBOOK* a_book, const NiPoint3& a_pos, const NiMatrix3& a_rot, float a_scale, bool a_useDefaultPos);
51 
52  // members
56  std::uint32_t numRenderTargets; // 78
57  std::uint32_t pad7C; // 7C
60  std::uint16_t unk90; // 90
61  std::uint16_t startAnimating; // 92
62  bool closeMenu; // 94
63  bool isNote; // 95
64  bool bookInitialized; // 96
65  std::uint8_t pad97; // 97
66  private:
67  KEEP_FOR_RE()
68  };
69 #ifndef SKYRIMVR
70  static_assert(sizeof(BookMenu) == 0x98);
71 #else
72  //static_assert(sizeof(BookMenu) == 0xB0);
73 #endif
74 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: BSTArray.h:378
Definition: BSTEvent.h:143
Definition: BookMenu.h:30
constexpr static std::string_view MENU_NAME
Definition: BookMenu.h:34
std::uint16_t startAnimating
Definition: BookMenu.h:61
std::uint32_t pad7C
Definition: BookMenu.h:57
std::uint8_t pad97
Definition: BookMenu.h:65
static constexpr auto VTABLE
Definition: BookMenu.h:33
void PostDisplay() override
GPtr< GFxMovieView > book
Definition: BookMenu.h:54
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
void PreDisplay() override
NiPointer< NiAVObject > bookModel
Definition: BookMenu.h:55
static constexpr auto RTTI
Definition: BookMenu.h:32
std::uint32_t numRenderTargets
Definition: BookMenu.h:56
std::uint16_t unk90
Definition: BookMenu.h:60
NiPointer< BSGeometry > pageTextGeo
Definition: BookMenu.h:59
BSTArray< BSScaleformExternalTexture > bookTextures
Definition: BookMenu.h:53
static TESObjectREFR * GetTargetReference()
BSEventNotifyControl ProcessEvent(const BSAnimationGraphEvent *a_event, BSTEventSource< BSAnimationGraphEvent > *a_eventSource) override
bool isNote
Definition: BookMenu.h:63
bool bookInitialized
Definition: BookMenu.h:64
static TESObjectBOOK * GetTargetForm()
~BookMenu() override
bool closeMenu
Definition: BookMenu.h:62
NiSourceTexture * pageTexture
Definition: BookMenu.h:58
void AdvanceMovie(float a_interval, std::uint32_t a_currentTime) override
static void OpenBookMenu(const BSString &a_description, const ExtraDataList *a_extraList, TESObjectREFR *a_ref, TESObjectBOOK *a_book, const NiPoint3 &a_pos, const NiMatrix3 &a_rot, float a_scale, bool a_useDefaultPos)
Definition: ExtraDataList.h:51
Definition: GPtr.h:7
Definition: IMenu.h:64
Definition: NiMatrix3.h:8
Definition: NiPoint3.h:6
Definition: NiSmartPointer.h:9
Definition: NiSourceTexture.h:21
Definition: SimpleAnimationGraphManagerHolder.h:11
Definition: TESObjectBOOK.h:66
Definition: TESObjectREFR.h:113
Definition: UIMessage.h:28
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BookMenu(static_cast< std::uint64_t >(688801))
UI_MESSAGE_RESULTS
Definition: IMenu.h:49
constexpr std::array< REL::ID, 3 > VTABLE_BookMenu
Definition: Offsets_VTABLE.h:10613
BSEventNotifyControl
Definition: BSTEvent.h:12
Definition: BSAnimationGraphEvent.h:10