3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/util/HudElement.h"
7#include "mc/client/game/CoordinateCaptureType.h"
8#include "mc/client/game/IConfigListener.h"
9#include "mc/client/gui/GuiMessage.h"
10#include "mc/client/gui/ScreenSizeData.h"
11#include "mc/client/gui/SoundDirection.h"
12#include "mc/client/gui/TitleMessage.h"
13#include "mc/client/gui/screens/MenuPointer.h"
14#include "mc/client/gui/screens/controllers/ModalScreenData.h"
15#include "mc/deps/application/AppPlatformListener.h"
16#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
17#include "mc/deps/core/utility/NonOwnerPointer.h"
18#include "mc/deps/core/utility/pub_sub/Publisher.h"
19#include "mc/deps/core_graphics/math/Rect.h"
20#include "mc/deps/input/RectangleArea.h"
21#include "mc/deps/minecraft_renderer/renderer/MaterialPtr.h"
22#include "mc/deps/minecraft_renderer/renderer/Mesh.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; }
43 LLAPI
void setHudVisibilityState(::std::vector<::HudElement>
const& elements, ::HudVisibility visibility);
45 LLNDAPI
bool isHudElementVisible(::HudElement element)
const;
58 ::ll::TypedStorage<4, 4, ::GuiMessage::MessageType> messageType;
59 ::ll::TypedStorage<8, 32, ::std::string> username;
60 ::ll::TypedStorage<8, 32, ::std::string> message;
61 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> filteredMessage;
62 ::ll::TypedStorage<8, 32, ::std::string> ttsMessage;
63 ::ll::TypedStorage<4, 4, float> lifeTime;
64 ::ll::TypedStorage<1, 1, bool> forceVisible;
65 ::ll::TypedStorage<1, 1, bool> ttsRequired;
66 ::ll::TypedStorage<8, 32, ::std::string> xuid;
67 ::ll::TypedStorage<8, 32, ::std::string const> platformId;
68 ::ll::TypedStorage<1, 1, bool> enableEmoticonify;
73 MessageConfig& operator=(MessageConfig
const&);
79 MCAPI MessageConfig(::GuiData::MessageConfig
const&);
82 ::GuiMessage::MessageType _messageType,
83 ::std::string
const& _username,
84 ::std::string
const& _message,
85 ::std::optional<::std::string>
const& _filteredMessage,
86 ::std::string
const& _ttsMessage,
90 ::std::string
const& _xuid,
91 ::std::string
const& _platformId
94 MCAPI ~MessageConfig();
100 MCAPI
void* $ctor(::GuiData::MessageConfig
const&);
103 ::GuiMessage::MessageType _messageType,
104 ::std::string
const& _username,
105 ::std::string
const& _message,
106 ::std::optional<::std::string>
const& _filteredMessage,
107 ::std::string
const& _ttsMessage,
111 ::std::string
const& _xuid,
112 ::std::string
const& _platformId
126 ::ll::TypedStorage<4, 24, ::ScreenSizeData> mScreenSizeData;
127 ::ll::TypedStorage<1, 1, bool> mScreenSizeDataValid;
128 ::ll::TypedStorage<4, 4, float> mGuiScale;
129 ::ll::TypedStorage<4, 4, float> mInvGuiScale;
130 ::ll::TypedStorage<1, 1, bool> mOverlappingControlsExist;
131 ::ll::TypedStorage<1, 1, bool> mIsCurrentlyActive;
132 ::ll::TypedStorage<8, 16, ::std::set<int>> mPostedErrors;
133 ::ll::TypedStorage<1, 1, ::MenuPointer> mMenuPointer;
134 ::ll::TypedStorage<2, 2, short> mPointerX;
135 ::ll::TypedStorage<2, 2, short> mPointerY;
136 ::ll::TypedStorage<1, 1, bool> mHasShowPreexistingMessages;
137 ::ll::TypedStorage<1, 1, bool> mToolbarWasRendered;
138 ::ll::TypedStorage<4, 4, int> mPrevSelectedSlot;
139 ::ll::TypedStorage<1, 1, ::ContainerID> mPrevSelectedInventoryContainer;
140 ::ll::TypedStorage<4, 4, int> mFlashSlotId;
141 ::ll::TypedStorage<8, 8, double> mFlashSlotStartTime;
142 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClient;
143 ::ll::TypedStorage<4, 16, ::RectangleArea> mToolbarArea;
144 ::ll::TypedStorage<4, 16, ::RectangleArea> mToolbarAreaContainer;
145 ::ll::TypedStorage<8, 32, ::std::string> mLastPopupText;
146 ::ll::TypedStorage<8, 32, ::std::string> mLastPopupSubtitleText;
147 ::ll::TypedStorage<8, 32, ::std::string> mLastJukeboxPopupText;
148 ::ll::TypedStorage<8, 32, ::std::string> mLastJukeboxPopupSubtitleText;
149 ::ll::TypedStorage<4, 4, int> mTickCount;
150 ::ll::TypedStorage<4, 4, float> mItemNameOverlayTime;
151 ::ll::TypedStorage<4, 4, float> mJukeboxNameOverlayTime;
152 ::ll::TypedStorage<1, 1, bool> mPopupNoticeDirty;
153 ::ll::TypedStorage<1, 1, bool> mJukeboxPopupNoticeDirty;
154 ::ll::TypedStorage<8, 24, ::std::vector<::GuiMessage>> mGuiMessages;
155 ::ll::TypedStorage<8, 24, ::std::vector<::GuiMessage>> mSubtitleMessages;
156 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mDevConsoleMessages;
157 ::ll::TypedStorage<4, 4, int> mMaxDevConsoleMessages;
158 ::ll::TypedStorage<8, 24, ::std::vector<::ContentLogMessage>> mContentLogMessages;
159 ::ll::TypedStorage<8, 8, uint64> mContentLogErrorCount;
160 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mPerfTurtleMessages;
161 ::ll::TypedStorage<8, 376, ::std::optional<::ModalScreenData>> mModalScreenData;
162 ::ll::TypedStorage<8, 232, ::TitleMessage> mTitleMessage;
163 ::ll::TypedStorage<4, 52, ::std::array<::HudVisibility, 13>> mHudVisibilityState;
164 ::ll::TypedStorage<4, 4, uint> mServerSettingsId;
165 ::ll::TypedStorage<8, 32, ::std::string> mServerSettings;
166 ::ll::TypedStorage<1, 1, bool> mMuteChat;
167 ::ll::TypedStorage<4, 4, float> mCurrentDropTicks;
168 ::ll::TypedStorage<4, 8, ::PlayerInventorySlotData> mCurrentDropSlot;
169 ::ll::TypedStorage<4, 8, ::PlayerInventorySlotData> mLastSelectedSlot;
170 ::ll::TypedStorage<1, 1, bool> mShowProgress;
171 ::ll::TypedStorage<8, 32, ::std::string> mTipMessage;
172 ::ll::TypedStorage<4, 4, float> mTipMessageLength;
173 ::ll::TypedStorage<8, 632, ::mce::Mesh> mRcFeedbackOuter;
174 ::ll::TypedStorage<8, 632, ::mce::Mesh> mRcFeedbackInner;
175 ::ll::TypedStorage<8, 632, ::mce::Mesh> mVignette;
176 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mInvFillMat;
177 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mCursorMat;
178 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::DevConsoleLogger>> mDevConsoleLogger;
179 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastTickTime;
180 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::std::vector<::GuiMessage>>> mDelayedMessages;
181 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mQueuedDevConsoleMessages;
182 ::ll::TypedStorage<8, 80, ::std::mutex> mQueuedDevMessagesMutex;
183 ::ll::TypedStorage<1, 1, bool> mUseEditorGuiScale;
184 ::ll::TypedStorage<4, 16, ::RectangleArea> mHUDHotbarRectangle;
185 ::ll::TypedStorage<1, 1, ::CoordinateCaptureType> mCoordinateCaptureType;
186 ::ll::TypedStorage<8, 128, ::Bedrock::PubSub::Publisher<void(), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
187 mOnGuiScaleUpdatedPublisher;
188 ::ll::TypedStorage<8, 128, ::Bedrock::PubSub::Publisher<void(), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
189 mServerFormDataAvailable;
194 GuiData& operator=(GuiData
const&);
195 GuiData(GuiData
const&);
201 virtual void onConfigChanged(::Config
const& c) ;
207 MCAPI
explicit GuiData(::IClientInstance& client);
209 MCAPI
void _addMessage(::GuiData::MessageConfig messageConfig, ::ProfanityFilterContext profanityFilterContext);
211 MCAPI
void _setSubtitleInternal(::std::string
const& subtitle, ::std::optional<::std::string> filteredSubtitle);
213 MCAPI
void _setTitleInternal(::std::string
const& title, ::std::optional<::std::string> filteredTitle);
215 MCAPI
void addSubtitle(::std::string
const& message, ::SoundDirection direction,
bool isLocalPlayer);
217 MCAPI
float calculateGuiScale(
218 ::Vec2
const& totalScreenSize,
219 ::Vec2
const& safeZone,
220 ::cg::math::Rect<float>
const& clientViewportModifiers
223 MCAPI
int calculateMaxGuiScaleIndex(::Vec2
const& screenSize)
const;
225 MCAPI
int calculateOptimalGuiScaleIndex(::Vec2
const& safezoneClientScreenSize)
const;
227 MCAPI
void clearPlayerMessages();
229 MCAPI
void clearSessionState();
231 MCAPI
void displayAnnouncementMessage(
232 ::std::string
const& message,
233 ::std::optional<::std::string>
const& filteredMessage,
234 ::std::string
const& xuid,
235 ::std::string
const& platformId
238 MCAPI
void displayChatMessage(
239 ::std::string
const& author,
240 ::std::string
const& message,
241 ::std::optional<::std::string>
const& filteredMessage,
242 ::std::string
const& xuid,
243 ::std::string
const& platformId
246 MCAPI
void displayClientMessage(
247 ::std::string
const& message,
248 ::std::optional<::std::string>
const& filteredMessage,
252 MCAPI
void displayDevConsoleMessage(::std::string
const& messages);
254 MCAPI
void displayLocalizableMessage(
255 ::std::string
const& message,
256 ::std::optional<::std::string>
const& filteredMessage,
257 ::std::vector<::std::string>
const& params
261 displayLocalizedMessage(::std::string
const& message, ::std::optional<::std::string>
const& filteredMessage);
263 MCAPI
void displaySystemMessage(
264 ::std::string
const& message,
265 ::std::optional<::std::string>
const& filteredMessage,
266 ::std::string
const& ttsMessage,
267 ::ProfanityFilterContext profanityFilterContext
270 MCAPI
void displayTextObjectMessage(
271 ::TextObjectRoot
const& textObject,
272 ::std::string
const& xuid,
273 ::std::string
const& platformId
276 MCAPI
void displayTextObjectWhisperMessage(
277 ::std::string
const& message,
278 ::std::string
const& xuid,
279 ::std::string
const& platformId
282 MCAPI
void displayTextObjectWhisperMessage(
283 ::TextObjectRoot
const& textObject,
284 ::std::string
const& xuid,
285 ::std::string
const& platformId
288 MCAPI
void displayWhisperMessage(
289 ::std::string
const& author,
290 ::std::string
const& message,
291 ::std::optional<::std::string>
const& filteredMessage,
292 ::std::string
const& xuid,
293 ::std::string
const& platformId
296 MCAPI
void flushQueuedDevConsoleMessages();
298 MCAPI
int getClampedGuiScaleOffset()
const;
300 MCAPI
float getGuiScale()
const;
302 MCAPI ::std::string
const getLastFilteredChatMessage();
304 MCAPI ::RectangleArea getLayoutCustomizationMainPanelRectangle()
const;
306 MCAPI
bool getNewJukeboxPopupNotice(::std::string& message, ::std::string& subtitle);
308 MCAPI
bool getNewPopupNotice(::std::string& message, ::std::string& subtitle);
310 MCAPI ::RectangleArea getSafeScreenZoneArea()
const;
312 MCAPI ::RectangleArea getWYSIWYGBottomHudReservedArea()
const;
314 MCAPI ::RectangleArea getWYSIWYGTopReservedArea()
const;
316 MCAPI
bool handleClick();
318 MCAPI
void postError(
int errCode);
320 MCAPI ::RectangleArea
const& recomputeHUDHotbarRectangle(
float scale);
322 MCAPI
void setActionBarMessage(::std::string
const& message, ::std::optional<::std::string>
const& filteredMessage);
324 MCAPI
void setScreenSizeData(::ScreenSizeData
const& screenSizeData);
326 MCAPI
void setSubtitle(::std::string
const& subtitle, ::std::optional<::std::string> filteredSubtitle);
328 MCAPI
void setTextToSpeechEnabled(
bool enabled);
330 MCAPI
void setTitle(::std::string
const& title, ::std::optional<::std::string> filteredTitle);
332 MCAPI ::RectangleArea setTouchToolbarArea(::RectangleArea
const& toolbarArea);
334 MCAPI
void showJukeboxPopupNotice(::std::string
const& message, ::std::string
const& subtitle);
336 MCAPI
void showPopupNotice(::ItemStackBase
const& item);
338 MCAPI
void showPopupNotice(::std::string
const& message, ::std::string
const& subtitle);
340 MCAPI
void showTipMessage(::std::string
const& message);
348 MCAPI static ::std::array<float, 8>
const& GUI_SCALE_VALUES();
354 MCAPI
void* $ctor(::IClientInstance& client);
360 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