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/deps/application/AppPlatformListener.h"
14#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
15#include "mc/deps/core/utility/NonOwnerPointer.h"
16#include "mc/deps/core/utility/pub_sub/Publisher.h"
17#include "mc/deps/core_graphics/math/Rect.h"
18#include "mc/deps/input/RectangleArea.h"
19#include "mc/deps/minecraft_renderer/renderer/MaterialPtr.h"
20#include "mc/deps/minecraft_renderer/renderer/Mesh.h"
21#include "mc/platform/threading/Mutex.h"
22#include "mc/util/HudVisibility.h"
23#include "mc/util/ProfanityFilterContext.h"
24#include "mc/world/ContainerID.h"
25#include "mc/world/actor/player/PlayerInventorySlotData.h"
37namespace Bedrock::PubSub::ThreadModel {
struct MultiThreaded; }
52 ::ll::TypedStorage<4, 4, ::GuiMessage::MessageType> messageType;
53 ::ll::TypedStorage<8, 32, ::std::string> username;
54 ::ll::TypedStorage<8, 32, ::std::string> message;
55 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> filteredMessage;
56 ::ll::TypedStorage<8, 32, ::std::string> ttsMessage;
57 ::ll::TypedStorage<4, 4, float> lifeTime;
58 ::ll::TypedStorage<1, 1, bool> forceVisible;
59 ::ll::TypedStorage<1, 1, bool> ttsRequired;
60 ::ll::TypedStorage<8, 32, ::std::string> xuid;
61 ::ll::TypedStorage<8, 32, ::std::string const> platformId;
62 ::ll::TypedStorage<1, 1, bool> enableEmoticonify;
67 MessageConfig& operator=(MessageConfig
const&);
73 MCAPI MessageConfig(::GuiData::MessageConfig
const&);
75 MCAPI ~MessageConfig();
81 MCAPI
void* $ctor(::GuiData::MessageConfig
const&);
94 ::ll::TypedStorage<4, 24, ::ScreenSizeData> mScreenSizeData;
95 ::ll::TypedStorage<1, 1, bool> mScreenSizeDataValid;
96 ::ll::TypedStorage<4, 4, float> mGuiScale;
97 ::ll::TypedStorage<4, 4, float> mInvGuiScale;
98 ::ll::TypedStorage<1, 1, bool> mOverlappingControlsExist;
99 ::ll::TypedStorage<1, 1, bool> mIsCurrentlyActive;
100 ::ll::TypedStorage<8, 16, ::std::set<int>> mPostedErrors;
101 ::ll::TypedStorage<1, 1, ::MenuPointer> mMenuPointer;
102 ::ll::TypedStorage<2, 2, short> mPointerX;
103 ::ll::TypedStorage<2, 2, short> mPointerY;
104 ::ll::TypedStorage<1, 1, bool> mHasShowPreexistingMessages;
105 ::ll::TypedStorage<1, 1, bool> mToolbarWasRendered;
106 ::ll::TypedStorage<4, 4, int> mPrevSelectedSlot;
107 ::ll::TypedStorage<1, 1, ::ContainerID> mPrevSelectedInventoryContainer;
108 ::ll::TypedStorage<4, 4, int> mFlashSlotId;
109 ::ll::TypedStorage<8, 8, double> mFlashSlotStartTime;
110 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClient;
111 ::ll::TypedStorage<4, 16, ::RectangleArea> mToolbarArea;
112 ::ll::TypedStorage<4, 16, ::RectangleArea> mToolbarAreaContainer;
113 ::ll::TypedStorage<8, 32, ::std::string> mLastPopupText;
114 ::ll::TypedStorage<8, 32, ::std::string> mLastPopupSubtitleText;
115 ::ll::TypedStorage<8, 32, ::std::string> mLastJukeboxPopupText;
116 ::ll::TypedStorage<8, 32, ::std::string> mLastJukeboxPopupSubtitleText;
117 ::ll::TypedStorage<4, 4, int> mTickCount;
118 ::ll::TypedStorage<4, 4, float> mItemNameOverlayTime;
119 ::ll::TypedStorage<4, 4, float> mJukeboxNameOverlayTime;
120 ::ll::TypedStorage<1, 1, bool> mPopupNoticeDirty;
121 ::ll::TypedStorage<1, 1, bool> mJukeboxPopupNoticeDirty;
122 ::ll::TypedStorage<8, 24, ::std::vector<::GuiMessage>> mGuiMessages;
123 ::ll::TypedStorage<8, 24, ::std::vector<::GuiMessage>> mSubtitleMessages;
124 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mDevConsoleMessages;
125 ::ll::TypedStorage<4, 4, int> mMaxDevConsoleMessages;
126 ::ll::TypedStorage<8, 24, ::std::vector<::ContentLogMessage>> mContentLogMessages;
127 ::ll::TypedStorage<8, 8, uint64> mContentLogErrorCount;
128 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mPerfTurtleMessages;
129 ::ll::TypedStorage<8, 232, ::TitleMessage> mTitleMessage;
130 ::ll::TypedStorage<4, 52, ::std::array<::HudVisibility, 13>> mHudVisibilityState;
131 ::ll::TypedStorage<4, 4, uint> mServerSettingsId;
132 ::ll::TypedStorage<8, 32, ::std::string> mServerSettings;
133 ::ll::TypedStorage<1, 1, bool> mMuteChat;
134 ::ll::TypedStorage<4, 4, float> mCurrentDropTicks;
135 ::ll::TypedStorage<4, 8, ::PlayerInventorySlotData> mCurrentDropSlot;
136 ::ll::TypedStorage<4, 8, ::PlayerInventorySlotData> mLastSelectedSlot;
137 ::ll::TypedStorage<1, 1, bool> mShowProgress;
138 ::ll::TypedStorage<8, 32, ::std::string> mTipMessage;
139 ::ll::TypedStorage<4, 4, float> mTipMessageLength;
140 ::ll::TypedStorage<8, 528, ::mce::Mesh> mRcFeedbackOuter;
141 ::ll::TypedStorage<8, 528, ::mce::Mesh> mRcFeedbackInner;
142 ::ll::TypedStorage<8, 528, ::mce::Mesh> mVignette;
143 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mInvFillMat;
144 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mCursorMat;
145 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::DevConsoleLogger>> mDevConsoleLogger;
146 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastTickTime;
147 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::std::vector<::GuiMessage>>> mDelayedMessages;
148 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mQueuedDevConsoleMessages;
149 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mQueuedDevMessagesMutex;
150 ::ll::TypedStorage<1, 1, bool> mUseEditorGuiScale;
151 ::ll::TypedStorage<4, 16, ::RectangleArea> mHUDHotbarRectangle;
152 ::ll::TypedStorage<1, 1, ::CoordinateCaptureType> mCoordinateCaptureType;
153 ::ll::TypedStorage<8, 128, ::Bedrock::PubSub::Publisher<void(), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
154 mOnGuiScaleUpdatedPublisher;
155 ::ll::TypedStorage<8, 128, ::Bedrock::PubSub::Publisher<void(), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
156 mServerFormDataAvailable;
161 GuiData& operator=(GuiData
const&);
162 GuiData(GuiData
const&);
168 virtual void onConfigChanged(::Config
const& c) ;
176 MCAPI
explicit GuiData(::IClientInstance& client);
178 MCAPI
void _addMessage(::GuiMessage message, ::ProfanityFilterContext profanityFilterContext);
180 MCAPI
void _addMessage(::GuiData::MessageConfig messageConfig, ::ProfanityFilterContext profanityFilterContext);
182 MCAPI
void _setSubtitleInternal(::std::string
const& subtitle, ::std::optional<::std::string> filteredSubtitle);
184 MCAPI
void _setTitleInternal(::std::string
const& title, ::std::optional<::std::string> filteredTitle);
186 MCAPI
void _tickDelayedMessages();
188 MCAPI
void _tickItemDrop();
190 MCAPI
void addContentLogMessage(::ContentLogMessage
const& message);
192 MCAPI
void addSubtitle(::std::string
const& message, ::SoundDirection direction);
194 MCAPI
float calculateGuiScale(
195 ::Vec2
const& totalScreenSize,
196 ::Vec2
const& safeZone,
197 float forcedGuiScale,
198 ::cg::math::Rect<float>
const& clientViewportModifiers
201 MCAPI
int calculateOptimalGuiScaleIndex(::Vec2
const& safezoneClientScreenSize)
const;
203 MCAPI
void clearPlayerMessages();
205 MCAPI
void clearSessionState();
207 MCAPI
void displayAnnouncementMessage(
208 ::std::string
const& author,
209 ::std::string
const& message,
210 ::std::optional<::std::string>
const& filteredMessage,
211 ::std::string
const& xuid,
212 ::std::string
const& platformId
215 MCAPI
void displayChatMessage(
216 ::std::string
const& author,
217 ::std::string
const& message,
218 ::std::optional<::std::string>
const& filteredMessage,
219 ::std::string
const& xuid,
220 ::std::string
const& platformId
223 MCAPI
void displayClientMessage(
224 ::std::string
const& message,
225 ::std::optional<::std::string>
const& filteredMessage,
229 MCAPI
void displayDevConsoleMessage(::std::string
const& messages);
231 MCAPI
void displayLocalizableMessage(
232 ::std::string
const& message,
233 ::std::optional<::std::string>
const& filteredMessage,
234 ::std::vector<::std::string>
const& params
238 displayLocalizedMessage(::std::string
const& message, ::std::optional<::std::string>
const& filteredMessage);
240 MCAPI
void displaySystemMessage(
241 ::std::string
const& message,
242 ::std::optional<::std::string>
const& filteredMessage,
243 ::std::string
const& ttsMessage,
244 ::ProfanityFilterContext profanityFilterContext
247 MCAPI
void displayTextObjectMessage(
248 ::TextObjectRoot
const& textObject,
249 ::std::string
const& xuid,
250 ::std::string
const& platformId
253 MCAPI
void displayTextObjectWhisperMessage(
254 ::std::string
const& message,
255 ::std::string
const& xuid,
256 ::std::string
const& platformId
259 MCAPI
void displayWhisperMessage(
260 ::std::string
const& author,
261 ::std::string
const& message,
262 ::std::optional<::std::string>
const& filteredMessage,
263 ::std::string
const& xuid,
264 ::std::string
const& platformId
267 MCAPI
float floorAlignToScreenPixel(
float v)
const;
269 MCAPI
void flushQueuedDevConsoleMessages();
271 MCAPI
float getGuiScale()
const;
273 MCAPI ::RectangleArea getLayoutCustomizationMainPanelRectangle()
const;
275 MCAPI ::std::vector<::GuiMessage> getPreexistingMessages();
277 MCAPI ::RectangleArea getSafeScreenZoneArea()
const;
279 MCAPI ::RectangleArea getWYSIWYGBottomHudReservedArea()
const;
281 MCAPI ::RectangleArea getWYSIWYGSafeScreenZoneArea()
const;
283 MCAPI ::RectangleArea getWYSIWYGTopReservedArea()
const;
285 MCAPI
bool handleClick();
287 MCAPI
bool isOddGuiScale()
const;
289 MCAPI
void postError(
int errCode);
291 MCAPI ::RectangleArea
const& recomputeHUDHotbarRectangle(
float scale);
293 MCAPI
void setActionBarMessage(::std::string
const& message, ::std::optional<::std::string>
const& filteredMessage);
295 MCAPI
void setScreenSizeData(::ScreenSizeData
const& screenSizeData);
297 MCAPI
void setTextToSpeechEnabled(
bool enabled);
299 MCAPI ::RectangleArea setTouchToolbarArea(::RectangleArea
const& toolbarArea);
301 MCAPI
void showPopupNotice(::ItemStackBase
const& item);
303 MCAPI
void showPopupNotice(::std::string
const& message, ::std::string
const& subtitle);
311 MCAPI
static int getGuiScaleIndexForLargeScreen(::Vec2
const& screenSize);
313 MCAPI
static int getGuiScaleIndexForSmallScreen(::Vec2
const& screenSize);
315 MCAPI
static int getGuiScaleIndexForSplitscreenConsole(::Vec2
const& screenSize);
321 MCAPI static ::std::array<float, 8>
const& GUI_SCALE_VALUES();
327 MCAPI
void* $ctor(::IClientInstance& client);
339 MCAPI
void $onConfigChanged(::Config
const& c);
Definition EnableNonOwnerReferences.h:7
Definition DevConsoleLogger.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
Definition ItemStackBase.h:44
Definition TextObjectRoot.h:14
Definition MultiThreaded.h:12
Definition ContentLogMessage.h:5