LeviLamina
Loading...
Searching...
No Matches
GuiData.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/game/CoordinateCaptureType.h"
7#include "mc/client/game/IConfigListener.h"
8#include "mc/client/gui/GuiMessage.h"
9#include "mc/client/gui/ScreenSizeData.h"
10#include "mc/client/gui/TitleMessage.h"
11#include "mc/client/gui/screens/MenuPointer.h"
12#include "mc/deps/application/AppPlatformListener.h"
13#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
14#include "mc/deps/core/utility/NonOwnerPointer.h"
15#include "mc/deps/core/utility/pub_sub/Publisher.h"
16#include "mc/deps/input/RectangleArea.h"
17#include "mc/deps/minecraft_renderer/renderer/MaterialPtr.h"
18#include "mc/deps/minecraft_renderer/renderer/Mesh.h"
19#include "mc/platform/threading/Mutex.h"
20#include "mc/util/HudVisibility.h"
21#include "mc/util/ProfanityFilterContext.h"
22#include "mc/world/ContainerID.h"
23#include "mc/world/actor/player/PlayerInventorySlotData.h"
24
25// auto generated forward declare list
26// clang-format off
27class GuiMessage;
28class IClientInstance;
29class ItemStackBase;
30class TextObjectRoot;
31class Vec2;
32struct Config;
34struct DevConsoleLogger;
35namespace Bedrock::PubSub::ThreadModel { struct MultiThreaded; }
36// clang-format on
37
39public:
40 // GuiData inner types declare
41 // clang-format off
42 struct MessageConfig;
43 // clang-format on
44
45 // GuiData inner types define
46 struct MessageConfig {
47 public:
48 // member variables
49 // NOLINTBEGIN
50 ::ll::TypedStorage<4, 4, ::GuiMessage::MessageType> messageType;
51 ::ll::TypedStorage<8, 32, ::std::string> username;
52 ::ll::TypedStorage<8, 32, ::std::string> message;
53 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> filteredMessage;
54 ::ll::TypedStorage<8, 32, ::std::string> ttsMessage;
55 ::ll::TypedStorage<4, 4, float> lifeTime;
56 ::ll::TypedStorage<1, 1, bool> forceVisible;
57 ::ll::TypedStorage<1, 1, bool> ttsRequired;
58 ::ll::TypedStorage<8, 32, ::std::string> xuid;
59 ::ll::TypedStorage<8, 32, ::std::string const> platformId;
60 ::ll::TypedStorage<1, 1, bool> enableEmoticonify;
61 // NOLINTEND
62
63 public:
64 // prevent constructor by default
65 MessageConfig& operator=(MessageConfig const&);
66 MessageConfig();
67
68 public:
69 // member functions
70 // NOLINTBEGIN
71 MCAPI MessageConfig(::GuiData::MessageConfig const&);
72
73 MCAPI ~MessageConfig();
74 // NOLINTEND
75
76 public:
77 // constructor thunks
78 // NOLINTBEGIN
79 MCAPI void* $ctor(::GuiData::MessageConfig const&);
80 // NOLINTEND
81
82 public:
83 // destructor thunk
84 // NOLINTBEGIN
85 MCAPI void $dtor();
86 // NOLINTEND
87 };
88
89public:
90 // member variables
91 // NOLINTBEGIN
92 ::ll::TypedStorage<4, 24, ::ScreenSizeData> mScreenSizeData;
93 ::ll::TypedStorage<1, 1, bool> mScreenSizeDataValid;
94 ::ll::TypedStorage<4, 4, float> mGuiScale;
95 ::ll::TypedStorage<4, 4, float> mInvGuiScale;
96 ::ll::TypedStorage<1, 1, bool> mOverlappingControlsExist;
97 ::ll::TypedStorage<1, 1, bool> mIsCurrentlyActive;
98 ::ll::TypedStorage<8, 16, ::std::set<int>> mPostedErrors;
99 ::ll::TypedStorage<1, 1, ::MenuPointer> mMenuPointer;
100 ::ll::TypedStorage<2, 2, short> mPointerX;
101 ::ll::TypedStorage<2, 2, short> mPointerY;
102 ::ll::TypedStorage<1, 1, bool> mHasShowPreexistingMessages;
103 ::ll::TypedStorage<1, 1, bool> mToolbarWasRendered;
104 ::ll::TypedStorage<4, 4, int> mPrevSelectedSlot;
105 ::ll::TypedStorage<1, 1, ::ContainerID> mPrevSelectedInventoryContainer;
106 ::ll::TypedStorage<4, 4, int> mFlashSlotId;
107 ::ll::TypedStorage<8, 8, double> mFlashSlotStartTime;
108 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClient;
109 ::ll::TypedStorage<4, 16, ::RectangleArea> mToolbarArea;
110 ::ll::TypedStorage<4, 16, ::RectangleArea> mToolbarAreaContainer;
111 ::ll::TypedStorage<8, 32, ::std::string> mLastPopupText;
112 ::ll::TypedStorage<8, 32, ::std::string> mLastPopupSubtitleText;
113 ::ll::TypedStorage<8, 32, ::std::string> mLastJukeboxPopupText;
114 ::ll::TypedStorage<8, 32, ::std::string> mLastJukeboxPopupSubtitleText;
115 ::ll::TypedStorage<4, 4, int> mTickCount;
116 ::ll::TypedStorage<4, 4, float> mItemNameOverlayTime;
117 ::ll::TypedStorage<4, 4, float> mJukeboxNameOverlayTime;
118 ::ll::TypedStorage<1, 1, bool> mPopupNoticeDirty;
119 ::ll::TypedStorage<1, 1, bool> mJukeboxPopupNoticeDirty;
120 ::ll::TypedStorage<8, 24, ::std::vector<::GuiMessage>> mGuiMessages;
121 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mDevConsoleMessages;
122 ::ll::TypedStorage<4, 4, int> mMaxDevConsoleMessages;
123 ::ll::TypedStorage<8, 24, ::std::vector<::ContentLogMessage>> mContentLogMessages;
124 ::ll::TypedStorage<8, 8, uint64> mContentLogErrorCount;
125 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mPerfTurtleMessages;
126 ::ll::TypedStorage<8, 232, ::TitleMessage> mTitleMessage;
127 ::ll::TypedStorage<4, 52, ::std::array<::HudVisibility, 13>> mHudVisibilityState;
128 ::ll::TypedStorage<4, 4, uint> mServerSettingsId;
129 ::ll::TypedStorage<8, 32, ::std::string> mServerSettings;
130 ::ll::TypedStorage<1, 1, bool> mMuteChat;
131 ::ll::TypedStorage<4, 4, float> mCurrentDropTicks;
132 ::ll::TypedStorage<4, 8, ::PlayerInventorySlotData> mCurrentDropSlot;
133 ::ll::TypedStorage<4, 8, ::PlayerInventorySlotData> mLastSelectedSlot;
134 ::ll::TypedStorage<1, 1, bool> mShowProgress;
135 ::ll::TypedStorage<8, 32, ::std::string> mTipMessage;
136 ::ll::TypedStorage<4, 4, float> mTipMessageLength;
137 ::ll::TypedStorage<8, 528, ::mce::Mesh> mRcFeedbackOuter;
138 ::ll::TypedStorage<8, 528, ::mce::Mesh> mRcFeedbackInner;
139 ::ll::TypedStorage<8, 528, ::mce::Mesh> mVignette;
140 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mInvFillMat;
141 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mCursorMat;
142 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::DevConsoleLogger>> mDevConsoleLogger;
143 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastTickTime;
144 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::std::vector<::GuiMessage>>> mDelayedMessages;
145 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mQueuedDevConsoleMessages;
146 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mQueuedDevMessagesMutex;
147 ::ll::TypedStorage<1, 1, bool> mUseEditorGuiScale;
148 ::ll::TypedStorage<4, 16, ::RectangleArea> mHUDHotbarRectangle;
149 ::ll::TypedStorage<1, 1, ::CoordinateCaptureType> mCoordinateCaptureType;
150 ::ll::TypedStorage<8, 128, ::Bedrock::PubSub::Publisher<void(), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
151 mOnGuiScaleUpdatedPublisher;
152 // NOLINTEND
153
154public:
155 // prevent constructor by default
156 GuiData& operator=(GuiData const&);
157 GuiData(GuiData const&);
158 GuiData();
159
160public:
161 // virtual functions
162 // NOLINTBEGIN
163 virtual void onConfigChanged(::Config const& c) /*override*/;
164
165 virtual ~GuiData() /*override*/;
166 // NOLINTEND
167
168public:
169 // member functions
170 // NOLINTBEGIN
171 MCAPI explicit GuiData(::IClientInstance& client);
172
173 MCAPI void _addMessage(::GuiMessage message, ::ProfanityFilterContext profanityFilterContext);
174
175 MCAPI void _addMessage(::GuiData::MessageConfig messageConfig, ::ProfanityFilterContext profanityFilterContext);
176
177 MCAPI void _setSubtitleInternal(::std::string const& subtitle, ::std::optional<::std::string> filteredSubtitle);
178
179 MCAPI void _setTitleInternal(::std::string const& title, ::std::optional<::std::string> filteredTitle);
180
181 MCAPI void _tickDelayedMessages();
182
183 MCAPI void _tickItemDrop();
184
185 MCAPI void addContentLogMessage(::ContentLogMessage const& message);
186
187 MCAPI int calculateMaxGuiScaleIndex(::Vec2 const& screenSize) const;
188
189 MCAPI void clearPlayerMessages();
190
191 MCAPI void clearSessionState();
192
193 MCAPI void displayAnnouncementMessage(
194 ::std::string const& author,
195 ::std::string const& message,
196 ::std::optional<::std::string> const& filteredMessage,
197 ::std::string const& xuid,
198 ::std::string const& platformId
199 );
200
201 MCAPI void displayChatMessage(
202 ::std::string const& author,
203 ::std::string const& message,
204 ::std::optional<::std::string> const& filteredMessage,
205 ::std::string const& xuid,
206 ::std::string const& platformId
207 );
208
209 MCAPI void displayClientMessage(
210 ::std::string const& message,
211 ::std::optional<::std::string> const& filteredMessage,
212 bool ttsRequired
213 );
214
215 MCAPI void displayDevConsoleMessage(::std::string const& messages);
216
217 MCAPI void displayLocalizableMessage(
218 ::std::string const& message,
219 ::std::optional<::std::string> const& filteredMessage,
220 ::std::vector<::std::string> const& params
221 );
222
223 MCAPI void
224 displayLocalizedMessage(::std::string const& message, ::std::optional<::std::string> const& filteredMessage);
225
226 MCAPI void displaySystemMessage(
227 ::std::string const& message,
228 ::std::optional<::std::string> const& filteredMessage,
229 ::std::string const& ttsMessage,
230 ::ProfanityFilterContext profanityFilterContext
231 );
232
233 MCAPI void displayTextObjectMessage(
234 ::TextObjectRoot const& textObject,
235 ::std::string const& xuid,
236 ::std::string const& platformId
237 );
238
239 MCAPI void displayTextObjectWhisperMessage(
240 ::std::string const& message,
241 ::std::string const& xuid,
242 ::std::string const& platformId
243 );
244
245 MCAPI void displayWhisperMessage(
246 ::std::string const& author,
247 ::std::string const& message,
248 ::std::optional<::std::string> const& filteredMessage,
249 ::std::string const& xuid,
250 ::std::string const& platformId
251 );
252
253 MCAPI float floorAlignToScreenPixel(float v) const;
254
255 MCAPI void flushQueuedDevConsoleMessages();
256
257 MCAPI float getGuiScale() const;
258
259 MCAPI ::RectangleArea getLayoutCustomizationMainPanelRectangle() const;
260
261 MCAPI ::std::vector<::GuiMessage> getPreexistingMessages();
262
263 MCAPI ::RectangleArea getSafeScreenZoneArea() const;
264
265 MCAPI ::RectangleArea getWYSIWYGBottomHudReservedArea() const;
266
267 MCAPI ::RectangleArea getWYSIWYGSafeScreenZoneArea() const;
268
269 MCAPI ::RectangleArea getWYSIWYGTopReservedArea() const;
270
271 MCAPI bool handleClick();
272
273 MCAPI bool isOddGuiScale() const;
274
275 MCAPI void postError(int errCode);
276
277 MCAPI ::RectangleArea const& recomputeHUDHotbarRectangle(float scale);
278
279 MCAPI void setActionBarMessage(::std::string const& message, ::std::optional<::std::string> const& filteredMessage);
280
281 MCAPI void setScreenSizeData(::ScreenSizeData const& screenSizeData);
282
283 MCAPI void setTextToSpeechEnabled(bool enabled);
284
285 MCAPI ::RectangleArea setTouchToolbarArea(::RectangleArea const& toolbarArea);
286
287 MCAPI void showPopupNotice(::ItemStackBase const& item);
288
289 MCAPI void showPopupNotice(::std::string const& message, ::std::string const& subtitle);
290
291 MCAPI void tick();
292 // NOLINTEND
293
294public:
295 // static functions
296 // NOLINTBEGIN
297 MCAPI static int getGuiScaleIndexForLargeScreen(::Vec2 const& screenSize);
298 // NOLINTEND
299
300public:
301 // static variables
302 // NOLINTBEGIN
303 MCAPI static float const& BUTTONS_TRANSPARENCY();
304
305 MCAPI static float const& DropTicks();
306
307 MCAPI static ::std::array<float, 8> const& GUI_SCALE_VALUES();
308 // NOLINTEND
309
310public:
311 // constructor thunks
312 // NOLINTBEGIN
313 MCAPI void* $ctor(::IClientInstance& client);
314 // NOLINTEND
315
316public:
317 // destructor thunk
318 // NOLINTBEGIN
319 MCAPI void $dtor();
320 // NOLINTEND
321
322public:
323 // virtual function thunks
324 // NOLINTBEGIN
325 MCAPI void $onConfigChanged(::Config const& c);
326 // NOLINTEND
327
328public:
329 // vftables
330 // NOLINTBEGIN
331 MCNAPI static void** $vftableForIConfigListener();
332
333 MCNAPI static void** $vftableForAppPlatformListener();
334
336 // NOLINTEND
337};
Definition AppPlatformListener.h:15
Definition EnableNonOwnerReferences.h:7
Definition GuiData.h:5
static MCAPI void ** $vftableForAppPlatformListener()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftableForIConfigListener()
Definition GuiMessage.h:5
Definition IClientInstance.h:5
Definition IConfigListener.h:5
MCAPI void $dtor()
Definition ItemStackBase.h:44
Definition TextObjectRoot.h:14
Definition Vec2.h:5
Definition Config.h:5
Definition ContentLogMessage.h:5
Definition DevConsoleLogger.h:5
Definition GuiData.h:13