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;
15class UIPropertyBag;
16struct PageContent;
17namespace Json { class Value; }
18// clang-format on
19
21public:
22 // BookScreenController inner types define
23 enum class BookView : uchar {
24 Viewing = 0,
25 Signing = 1,
26 Picking = 2,
27 Exporting = 3,
28 };
29
30public:
31 // member variables
32 // NOLINTBEGIN
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;
53 // NOLINTEND
54
55public:
56 // prevent constructor by default
57 BookScreenController();
58
59public:
60 // virtual functions
61 // NOLINTBEGIN
62 virtual ~BookScreenController() /*override*/;
63
64 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
65
66 virtual void preFrameTick() /*override*/;
67
68 virtual ::ui::DirtyFlag tick() /*override*/;
69
70 virtual bool _isStillValid() const /*override*/;
71
72 virtual ::std::string _getButtonBDescription() /*override*/;
73 // NOLINTEND
74
75public:
76 // member functions
77 // NOLINTBEGIN
78 MCAPI BookScreenController(
79 ::std::shared_ptr<::ClientInstanceScreenModel> model,
80 int bookSlot,
81 bool editable,
82 int page,
83 ::BlockActor* lectern
84 );
85
86 MCAPI void _addPageAt(int index, ::PageContent const& page);
87
88 MCAPI void _addPhotoPageAt(int index, ::std::string const& photoName);
89
90 MCAPI void _deletePage(int index);
91
92 MCAPI void _editPageText(int index);
93
94 MCAPI ::std::string const& _getPageText(int index, bool isBeingEdited);
95
96 MCAPI int _getPickIndex(char const* collectionPrefix, ::UIPropertyBag& bag);
97
98 MCAPI void _loadAuthorFromBook();
99
100 MCAPI void _loadTextFromBook();
101
102 MCAPI void _loadTitleFromBook();
103
104 MCAPI void _parsePageText(int index);
105
106 MCAPI void _registerBindings();
107
108 MCAPI void _registerEventHandlers();
109
110 MCAPI void _swapPages(int page1Index, int page2Index);
111
112 MCAPI void _tickExport();
113
114 MCAPI void _tryFirePageTurnSound(::UIPropertyBag const& bag) const;
115
116 MCAPI void _viewPage(int pageIndex);
117 // NOLINTEND
118
119public:
120 // constructor thunks
121 // NOLINTBEGIN
122 MCAPI void* $ctor(
123 ::std::shared_ptr<::ClientInstanceScreenModel> model,
124 int bookSlot,
125 bool editable,
126 int page,
127 ::BlockActor* lectern
128 );
129 // NOLINTEND
130
131public:
132 // destructor thunk
133 // NOLINTBEGIN
134 MCAPI void $dtor();
135 // NOLINTEND
136
137public:
138 // virtual function thunks
139 // NOLINTBEGIN
140 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
141
142 MCAPI void $preFrameTick();
143
144 MCAPI ::ui::DirtyFlag $tick();
145
146 MCAPI bool $_isStillValid() const;
147
148 MCAPI ::std::string $_getButtonBDescription();
149 // NOLINTEND
150
151public:
152 // vftables
153 // NOLINTBEGIN
155
156 MCNAPI static void** $vftableForScreenController();
157 // NOLINTEND
158};
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 Value.h:16
Definition UIPropertyBag.h:5
Definition PageContent.h:10