3#include "mc/_HeaderOutputPredefine.h"
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"
17namespace Json {
class Value; }
23 enum class BookView : uchar {
33 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BookScreenManager>> mBookScreenManager;
34 ::ll::TypedStorage<1, 1, bool const> mEditable;
35 ::ll::TypedStorage<1, 1, bool> mEditingLeft;
36 ::ll::TypedStorage<1, 1, bool> mEditingRight;
37 ::ll::TypedStorage<1, 2, ::std::array<bool, 2>> mPageHasCursor;
38 ::ll::TypedStorage<8, 24, ::std::vector<::PageContent>> mPages;
39 ::ll::TypedStorage<4, 4, int> mCurrentPage;
40 ::ll::TypedStorage<4, 4, int> mCurrentPageIndex;
41 ::ll::TypedStorage<8, 32, ::std::string> mTitle;
42 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mFilteredTitle;
43 ::ll::TypedStorage<8, 32, ::std::string> mAuthor;
44 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mFilteredAuthor;
45 ::ll::TypedStorage<8, 32, ::std::string> mAuthorXUID;
46 ::ll::TypedStorage<1, 1, ::BookScreenController::BookView> mCurrentView;
47 ::ll::TypedStorage<1, 1, bool> mForceUIRefresh;
48 ::ll::TypedStorage<4, 4, int> mPickPageIndex;
49 ::ll::TypedStorage<8, 32, ::std::string> mPageBlockedText;
50 ::ll::TypedStorage<1, 1, bool> mShouldRefreshText;
51 ::ll::TypedStorage<1, 1, bool> mShouldUseFilteredText;
52 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mProfanityToggleSubscription;
57 BookScreenController();
62 virtual ~BookScreenController() ;
64 virtual void addStaticScreenVars(::Json::Value& globalVars) ;
66 virtual void preFrameTick() ;
68 virtual ::ui::DirtyFlag tick() ;
70 virtual bool _isStillValid() const ;
72 virtual ::std::
string _getButtonBDescription() ;
78 MCAPI BookScreenController(
79 ::std::shared_ptr<::ClientInstanceScreenModel> model,
86 MCAPI
void _addPageAt(
int index, ::PageContent const& page);
88 MCAPI
void _addPhotoPageAt(
int index, ::std::
string const& photoName);
90 MCAPI
void _deletePage(
int index);
92 MCAPI
void _editPageText(
int index);
94 MCAPI ::std::
string const& _getPageText(
int index,
bool isBeingEdited);
96 MCAPI
int _getPickIndex(
char const* collectionPrefix, ::UIPropertyBag& bag);
98 MCAPI
void _loadAuthorFromBook();
100 MCAPI
void _loadTextFromBook();
102 MCAPI
void _loadTitleFromBook();
104 MCAPI
void _parsePageText(
int index);
106 MCAPI
void _registerBindings();
108 MCAPI
void _registerEventHandlers();
110 MCAPI
void _swapPages(
int page1Index,
int page2Index);
112 MCAPI
void _tickExport();
114 MCAPI
void _tryFirePageTurnSound(::UIPropertyBag const& bag) const;
116 MCAPI
void _viewPage(
int pageIndex);
123 ::std::shared_ptr<::ClientInstanceScreenModel> model,
127 ::BlockActor* lectern
140 MCAPI
void $addStaticScreenVars(::Json::Value& globalVars);
142 MCAPI
void $preFrameTick();
144 MCAPI ::ui::DirtyFlag $tick();
146 MCAPI
bool $_isStillValid() const;
148 MCAPI ::std::
string $_getButtonBDescription();
Definition BlockActor.h:30
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 UIPropertyBag.h:5
Definition PageContent.h:10