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 MCNAPI BookScreenController(
86 MCAPI
void _addPageAt(
int index, ::
PageContent const& page);
90 MCAPI
void _parsePageText(
int index);
122 MCAPI
void $preFrameTick();
126 MCAPI
bool $_isStillValid() const;
Definition BlockActor.h:30
Definition BookScreenController.h:5
MCAPI void _setPageText(int index, ::std::string const &text)
MCAPI void _addPhotoPageAt(int index, ::std::string const &photoName)
MCAPI::std::string $_getButtonBDescription()
MCAPI void * $ctor(::std::shared_ptr<::ClientInstanceScreenModel > model, int bookSlot, bool editable, int page, ::BlockActor *lectern)
MCAPI void _tryFirePageTurnSound(::UIPropertyBag const &bag) const
MCAPI void $addStaticScreenVars(::Json::Value &globalVars)
MCAPI void _swapPages(int page1Index, int page2Index)
MCAPI::ui::DirtyFlag $tick()
static MCAPI int _getPickIndex(char const *collectionPrefix, ::UIPropertyBag &bag)
Definition BookScreenManager.h:5
Definition ClientInstanceScreenController.h:5
Definition ClientInstanceScreenModel.h:5
Definition UIPropertyBag.h:5
Definition PageContent.h:10