3#include "mc/_HeaderOutputPredefine.h"
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/SoundDirection.h"
11#include "mc/client/gui/TitleMessage.h"
12#include "mc/client/gui/screens/MenuPointer.h"
13#include "mc/client/gui/screens/controllers/ModalScreenData.h"
14#include "mc/deps/application/AppPlatformListener.h"
15#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
16#include "mc/deps/core/utility/NonOwnerPointer.h"
17#include "mc/deps/core/utility/pub_sub/Publisher.h"
18#include "mc/deps/core_graphics/math/Rect.h"
19#include "mc/deps/input/RectangleArea.h"
20#include "mc/deps/minecraft_renderer/renderer/MaterialPtr.h"
21#include "mc/deps/minecraft_renderer/renderer/Mesh.h"
22#include "mc/platform/threading/Mutex.h"
23#include "mc/util/HudVisibility.h"
24#include "mc/util/ProfanityFilterContext.h"
25#include "mc/world/ContainerID.h"
26#include "mc/world/actor/player/PlayerInventorySlotData.h"
38namespace Bedrock::PubSub::ThreadModel {
struct MultiThreaded; }
53 ::ll::TypedStorage<4, 4, ::GuiMessage::MessageType> messageType;
54 ::ll::TypedStorage<8, 32, ::std::string> username;
55 ::ll::TypedStorage<8, 32, ::std::string> message;
56 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> filteredMessage;
57 ::ll::TypedStorage<8, 32, ::std::string> ttsMessage;
58 ::ll::TypedStorage<4, 4, float> lifeTime;
59 ::ll::TypedStorage<1, 1, bool> forceVisible;
60 ::ll::TypedStorage<1, 1, bool> ttsRequired;
61 ::ll::TypedStorage<8, 32, ::std::string> xuid;
62 ::ll::TypedStorage<8, 32, ::std::string const> platformId;
63 ::ll::TypedStorage<1, 1, bool> enableEmoticonify;
68 MessageConfig& operator=(MessageConfig
const&);
74 MCAPI MessageConfig(::GuiData::MessageConfig
const&);
77 ::GuiMessage::MessageType _messageType,
78 ::std::string
const& _username,
79 ::std::string
const& _message,
80 ::std::optional<::std::string>
const& _filteredMessage,
81 ::std::string
const& _ttsMessage,
85 ::std::string
const& _xuid,
86 ::std::string
const& _platformId
89 MCAPI ~MessageConfig();
95 MCAPI
void* $ctor(::GuiData::MessageConfig
const&);
98 ::GuiMessage::MessageType _messageType,
99 ::std::string
const& _username,
100 ::std::string
const& _message,
101 ::std::optional<::std::string>
const& _filteredMessage,
102 ::std::string
const& _ttsMessage,
106 ::std::string
const& _xuid,
107 ::std::string
const& _platformId
121 ::ll::TypedStorage<4, 24, ::ScreenSizeData> mScreenSizeData;
122 ::ll::TypedStorage<1, 1, bool> mScreenSizeDataValid;
123 ::ll::TypedStorage<4, 4, float> mGuiScale;
124 ::ll::TypedStorage<4, 4, float> mInvGuiScale;
125 ::ll::TypedStorage<1, 1, bool> mOverlappingControlsExist;
126 ::ll::TypedStorage<1, 1, bool> mIsCurrentlyActive;
127 ::ll::TypedStorage<8, 16, ::std::set<int>> mPostedErrors;
128 ::ll::TypedStorage<1, 1, ::MenuPointer> mMenuPointer;
129 ::ll::TypedStorage<2, 2, short> mPointerX;
130 ::ll::TypedStorage<2, 2, short> mPointerY;
131 ::ll::TypedStorage<1, 1, bool> mHasShowPreexistingMessages;
132 ::ll::TypedStorage<1, 1, bool> mToolbarWasRendered;
133 ::ll::TypedStorage<4, 4, int> mPrevSelectedSlot;
134 ::ll::TypedStorage<1, 1, ::ContainerID> mPrevSelectedInventoryContainer;
135 ::ll::TypedStorage<4, 4, int> mFlashSlotId;
136 ::ll::TypedStorage<8, 8, double> mFlashSlotStartTime;
137 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClient;
138 ::ll::TypedStorage<4, 16, ::RectangleArea> mToolbarArea;
139 ::ll::TypedStorage<4, 16, ::RectangleArea> mToolbarAreaContainer;
140 ::ll::TypedStorage<8, 32, ::std::string> mLastPopupText;
141 ::ll::TypedStorage<8, 32, ::std::string> mLastPopupSubtitleText;
142 ::ll::TypedStorage<8, 32, ::std::string> mLastJukeboxPopupText;
143 ::ll::TypedStorage<8, 32, ::std::string> mLastJukeboxPopupSubtitleText;
144 ::ll::TypedStorage<4, 4, int> mTickCount;
145 ::ll::TypedStorage<4, 4, float> mItemNameOverlayTime;
146 ::ll::TypedStorage<4, 4, float> mJukeboxNameOverlayTime;
147 ::ll::TypedStorage<1, 1, bool> mPopupNoticeDirty;
148 ::ll::TypedStorage<1, 1, bool> mJukeboxPopupNoticeDirty;
149 ::ll::TypedStorage<8, 24, ::std::vector<::GuiMessage>> mGuiMessages;
150 ::ll::TypedStorage<8, 24, ::std::vector<::GuiMessage>> mSubtitleMessages;
151 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mDevConsoleMessages;
152 ::ll::TypedStorage<4, 4, int> mMaxDevConsoleMessages;
153 ::ll::TypedStorage<8, 24, ::std::vector<::ContentLogMessage>> mContentLogMessages;
154 ::ll::TypedStorage<8, 8, uint64> mContentLogErrorCount;
155 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mPerfTurtleMessages;
156 ::ll::TypedStorage<8, 376, ::std::optional<::ModalScreenData>> mModalScreenData;
157 ::ll::TypedStorage<8, 232, ::TitleMessage> mTitleMessage;
158 ::ll::TypedStorage<4, 52, ::std::array<::HudVisibility, 13>> mHudVisibilityState;
159 ::ll::TypedStorage<4, 4, uint> mServerSettingsId;
160 ::ll::TypedStorage<8, 32, ::std::string> mServerSettings;
161 ::ll::TypedStorage<1, 1, bool> mMuteChat;
162 ::ll::TypedStorage<4, 4, float> mCurrentDropTicks;
163 ::ll::TypedStorage<4, 8, ::PlayerInventorySlotData> mCurrentDropSlot;
164 ::ll::TypedStorage<4, 8, ::PlayerInventorySlotData> mLastSelectedSlot;
165 ::ll::TypedStorage<1, 1, bool> mShowProgress;
166 ::ll::TypedStorage<8, 32, ::std::string> mTipMessage;
167 ::ll::TypedStorage<4, 4, float> mTipMessageLength;
168 ::ll::TypedStorage<8, 616, ::mce::Mesh> mRcFeedbackOuter;
169 ::ll::TypedStorage<8, 616, ::mce::Mesh> mRcFeedbackInner;
170 ::ll::TypedStorage<8, 616, ::mce::Mesh> mVignette;
171 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mInvFillMat;
172 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mCursorMat;
173 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::DevConsoleLogger>> mDevConsoleLogger;
174 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastTickTime;
175 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::std::vector<::GuiMessage>>> mDelayedMessages;
176 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mQueuedDevConsoleMessages;
177 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mQueuedDevMessagesMutex;
178 ::ll::TypedStorage<1, 1, bool> mUseEditorGuiScale;
179 ::ll::TypedStorage<4, 16, ::RectangleArea> mHUDHotbarRectangle;
180 ::ll::TypedStorage<1, 1, ::CoordinateCaptureType> mCoordinateCaptureType;
181 ::ll::TypedStorage<8, 128, ::Bedrock::PubSub::Publisher<void(), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
182 mOnGuiScaleUpdatedPublisher;
183 ::ll::TypedStorage<8, 128, ::Bedrock::PubSub::Publisher<void(), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
184 mServerFormDataAvailable;
189 GuiData& operator=(GuiData
const&);
190 GuiData(GuiData
const&);
196 virtual void onConfigChanged(::Config
const& c) ;
202 MCAPI
explicit GuiData(::IClientInstance& client);
204 MCAPI
void _addMessage(::GuiData::MessageConfig messageConfig, ::ProfanityFilterContext profanityFilterContext);
206 MCAPI
void _setSubtitleInternal(::std::string
const& subtitle, ::std::optional<::std::string> filteredSubtitle);
208 MCAPI
void _setTitleInternal(::std::string
const& title, ::std::optional<::std::string> filteredTitle);
210 MCAPI
void addSubtitle(::std::string
const& message, ::SoundDirection direction,
bool isLocalPlayer);
212 MCAPI
float calculateGuiScale(
213 ::Vec2
const& totalScreenSize,
214 ::Vec2
const& safeZone,
215 float forcedGuiScale,
216 ::cg::math::Rect<float>
const& clientViewportModifiers
219 MCAPI
int calculateMaxGuiScaleIndex(::Vec2
const& screenSize)
const;
221 MCAPI
int calculateOptimalGuiScaleIndex(::Vec2
const& safezoneClientScreenSize)
const;
223 MCAPI
void clearPlayerMessages();
225 MCAPI
void clearSessionState();
227 MCAPI
void displayAnnouncementMessage(
228 ::std::string
const& message,
229 ::std::optional<::std::string>
const& filteredMessage,
230 ::std::string
const& xuid,
231 ::std::string
const& platformId
234 MCAPI
void displayChatMessage(
235 ::std::string
const& author,
236 ::std::string
const& message,
237 ::std::optional<::std::string>
const& filteredMessage,
238 ::std::string
const& xuid,
239 ::std::string
const& platformId
242 MCAPI
void displayClientMessage(
243 ::std::string
const& message,
244 ::std::optional<::std::string>
const& filteredMessage,
248 MCAPI
void displayDevConsoleMessage(::std::string
const& messages);
250 MCAPI
void displayLocalizableMessage(
251 ::std::string
const& message,
252 ::std::optional<::std::string>
const& filteredMessage,
253 ::std::vector<::std::string>
const& params
257 displayLocalizedMessage(::std::string
const& message, ::std::optional<::std::string>
const& filteredMessage);
259 MCAPI
void displaySystemMessage(
260 ::std::string
const& message,
261 ::std::optional<::std::string>
const& filteredMessage,
262 ::std::string
const& ttsMessage,
263 ::ProfanityFilterContext profanityFilterContext
266 MCAPI
void displayTextObjectMessage(
267 ::TextObjectRoot
const& textObject,
268 ::std::string
const& xuid,
269 ::std::string
const& platformId
272 MCAPI
void displayTextObjectWhisperMessage(
273 ::std::string
const& message,
274 ::std::string
const& xuid,
275 ::std::string
const& platformId
278 MCAPI
void displayTextObjectWhisperMessage(
279 ::TextObjectRoot
const& textObject,
280 ::std::string
const& xuid,
281 ::std::string
const& platformId
284 MCAPI
void displayWhisperMessage(
285 ::std::string
const& author,
286 ::std::string
const& message,
287 ::std::optional<::std::string>
const& filteredMessage,
288 ::std::string
const& xuid,
289 ::std::string
const& platformId
292 MCAPI
void flushQueuedDevConsoleMessages();
294 MCAPI
int getClampedGuiScaleOffset()
const;
296 MCAPI
float getGuiScale()
const;
298 MCAPI ::std::string
const getLastFilteredChatMessage();
300 MCAPI ::RectangleArea getLayoutCustomizationMainPanelRectangle()
const;
302 MCAPI
bool getNewJukeboxPopupNotice(::std::string& message, ::std::string& subtitle);
304 MCAPI
bool getNewPopupNotice(::std::string& message, ::std::string& subtitle);
306 MCAPI ::RectangleArea getSafeScreenZoneArea()
const;
308 MCAPI ::RectangleArea getWYSIWYGBottomHudReservedArea()
const;
310 MCAPI ::RectangleArea getWYSIWYGTopReservedArea()
const;
312 MCAPI
bool handleClick();
314 MCAPI
void postError(
int errCode);
316 MCAPI ::RectangleArea
const& recomputeHUDHotbarRectangle(
float scale);
318 MCAPI
void setActionBarMessage(::std::string
const& message, ::std::optional<::std::string>
const& filteredMessage);
320 MCAPI
void setScreenSizeData(::ScreenSizeData
const& screenSizeData);
322 MCAPI
void setSubtitle(::std::string
const& subtitle, ::std::optional<::std::string> filteredSubtitle);
324 MCAPI
void setTextToSpeechEnabled(
bool enabled);
326 MCAPI
void setTitle(::std::string
const& title, ::std::optional<::std::string> filteredTitle);
328 MCAPI ::RectangleArea setTouchToolbarArea(::RectangleArea
const& toolbarArea);
330 MCAPI
void showJukeboxPopupNotice(::std::string
const& message, ::std::string
const& subtitle);
332 MCAPI
void showPopupNotice(::ItemStackBase
const& item);
334 MCAPI
void showPopupNotice(::std::string
const& message, ::std::string
const& subtitle);
336 MCAPI
void showTipMessage(::std::string
const& message);
344 MCAPI static ::std::array<float, 8>
const& GUI_SCALE_VALUES();
350 MCAPI
void* $ctor(::IClientInstance& client);
356 MCAPI
void $onConfigChanged(::Config
const& c);
Definition EnableNonOwnerReferences.h:7
Definition DevConsoleLogger.h:5
Definition GuiMessage.h:5
Definition IClientInstance.h:5
Definition IConfigListener.h:5
Definition ItemStackBase.h:44
Definition TextObjectRoot.h:14
Definition MultiThreaded.h:7
Definition ContentLogMessage.h:5