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() =
default;
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 _parsePageText(
int index);
92 MCAPI
void _setPageText(
int index, ::std::
string const& text);
94 MCAPI
void _swapPages(
int page1Index,
int page2Index);
96 MCAPI
void _tryFirePageTurnSound(::UIPropertyBag const& bag) const;
102 MCAPI static
int _getPickIndex(
char const* collectionPrefix, ::UIPropertyBag& bag);
109 ::std::shared_ptr<::ClientInstanceScreenModel> model,
113 ::BlockActor* lectern
120 MCAPI
void $addStaticScreenVars(::Json::Value& globalVars);
122 MCAPI
void $preFrameTick();
124 MCAPI ::ui::DirtyFlag $tick();
126 MCAPI
bool $_isStillValid() const;
128 MCAPI ::std::
string $_getButtonBDescription();
Definition BlockActor.h:29
Definition BookScreenController.h:5
Definition BookScreenManager.h:5
Definition ClientInstanceScreenController.h:5
Definition ClientInstanceScreenModel.h:5
Definition UIPropertyBag.h:5
Definition PageContent.h:10