LeviLamina
Loading...
Searching...
No Matches
BookScreenController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/screens/controllers/ClientInstanceScreenController.h"
8#include "mc/deps/core/utility/pub_sub/Subscription.h"
9
10// auto generated forward declare list
11// clang-format off
12class BlockActor;
15struct PageContent;
16struct UIPropertyBag;
17namespace Json { class Value; }
18// clang-format on
19
21public:
22 // BookScreenController inner types define
23 enum class BookView : uchar {};
24
25public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BookScreenManager>> mBookScreenManager;
29 ::ll::TypedStorage<1, 1, bool const> mEditable;
30 ::ll::TypedStorage<1, 1, bool> mEditingLeft;
31 ::ll::TypedStorage<1, 1, bool> mEditingRight;
32 ::ll::TypedStorage<1, 2, ::std::array<bool, 2>> mPageHasCursor;
33 ::ll::TypedStorage<8, 24, ::std::vector<::PageContent>> mPages;
34 ::ll::TypedStorage<4, 4, int> mCurrentPage;
35 ::ll::TypedStorage<4, 4, int> mCurrentPageIndex;
36 ::ll::TypedStorage<8, 32, ::std::string> mTitle;
37 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mFilteredTitle;
38 ::ll::TypedStorage<8, 32, ::std::string> mAuthor;
39 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mFilteredAuthor;
40 ::ll::TypedStorage<8, 32, ::std::string> mAuthorXUID;
41 ::ll::TypedStorage<1, 1, ::BookScreenController::BookView> mCurrentView;
42 ::ll::TypedStorage<1, 1, bool> mForceUIRefresh;
43 ::ll::TypedStorage<4, 4, int> mPickPageIndex;
44 ::ll::TypedStorage<8, 32, ::std::string> mPageBlockedText;
45 ::ll::TypedStorage<1, 1, bool> mShouldRefreshText;
46 ::ll::TypedStorage<1, 1, bool> mShouldUseFilteredText;
47 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mProfanityToggleSubscription;
48 // NOLINTEND
49
50public:
51 // prevent constructor by default
52 BookScreenController();
53
54public:
55 // virtual functions
56 // NOLINTBEGIN
57 virtual ~BookScreenController() /*override*/;
58
59 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
60
61 virtual void preFrameTick() /*override*/;
62
63 virtual ::ui::DirtyFlag tick() /*override*/;
64
65 virtual bool _isStillValid() const /*override*/;
66
67 virtual ::std::string _getButtonBDescription() /*override*/;
68 // NOLINTEND
69
70public:
71 // member functions
72 // NOLINTBEGIN
73 MCAPI BookScreenController(
74 ::std::shared_ptr<::ClientInstanceScreenModel> model,
75 int bookSlot,
76 bool editable,
77 int page,
78 ::BlockActor* lectern
79 );
80
81 MCAPI void _addPageAt(int index, ::PageContent const& page);
82
83 MCAPI void _addPhotoPageAt(int index, ::std::string const& photoName);
84
85 MCAPI void _deletePage(int index);
86
87 MCAPI void _editPageText(int index);
88
89 MCAPI ::std::string const& _getPageText(int index, bool isBeingEdited);
90
91 MCAPI int _getPickIndex(char const* collectionPrefix, ::UIPropertyBag& bag);
92
93 MCAPI void _loadAuthorFromBook();
94
95 MCAPI void _loadTextFromBook();
96
97 MCAPI void _loadTitleFromBook();
98
99 MCAPI void _parsePageText(int index);
100
101 MCAPI void _registerBindings();
102
103 MCAPI void _registerEventHandlers();
104
105 MCAPI void _swapPages(int page1Index, int page2Index);
106
107 MCAPI void _tickExport();
108
109 MCAPI void _tryFirePageTurnSound(::UIPropertyBag const& bag) const;
110
111 MCAPI void _viewPage(int pageIndex);
112 // NOLINTEND
113
114public:
115 // constructor thunks
116 // NOLINTBEGIN
117 MCAPI void* $ctor(
118 ::std::shared_ptr<::ClientInstanceScreenModel> model,
119 int bookSlot,
120 bool editable,
121 int page,
122 ::BlockActor* lectern
123 );
124 // NOLINTEND
125
126public:
127 // destructor thunk
128 // NOLINTBEGIN
129 MCAPI void $dtor();
130 // NOLINTEND
131
132public:
133 // virtual function thunks
134 // NOLINTBEGIN
135 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
136
137 MCAPI void $preFrameTick();
138
139 MCAPI ::ui::DirtyFlag $tick();
140
141 MCAPI bool $_isStillValid() const;
142
143 MCAPI ::std::string $_getButtonBDescription();
144 // NOLINTEND
145
146public:
147 // vftables
148 // NOLINTBEGIN
150
151 MCNAPI static void** $vftableForScreenController();
152 // NOLINTEND
153};
Definition BlockActor.h:32
Definition BookScreenController.h:5
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftableForScreenController()
Definition BookScreenManager.h:5
Definition ClientInstanceScreenController.h:5
Definition ClientInstanceScreenModel.h:5
Definition Value.h:16
Definition PageContent.h:10
Definition UIPropertyBag.h:5