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/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"
35namespace Bedrock::PubSub::ThreadModel {
struct MultiThreaded; }
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;
65 MessageConfig& operator=(MessageConfig
const&);
71 MCAPI MessageConfig(::GuiData::MessageConfig
const&);
73 MCAPI ~MessageConfig();
79 MCAPI
void* $ctor(::GuiData::MessageConfig
const&);
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;
156 GuiData& operator=(GuiData
const&);
157 GuiData(GuiData
const&);
163 virtual void onConfigChanged(::Config
const& c) ;
171 MCAPI
explicit GuiData(::IClientInstance& client);
173 MCAPI
void _addMessage(::GuiMessage message, ::ProfanityFilterContext profanityFilterContext);
175 MCAPI
void _addMessage(::GuiData::MessageConfig messageConfig, ::ProfanityFilterContext profanityFilterContext);
177 MCAPI
void _setSubtitleInternal(::std::string
const& subtitle, ::std::optional<::std::string> filteredSubtitle);
179 MCAPI
void _setTitleInternal(::std::string
const& title, ::std::optional<::std::string> filteredTitle);
181 MCAPI
void _tickDelayedMessages();
183 MCAPI
void _tickItemDrop();
185 MCAPI
void addContentLogMessage(::ContentLogMessage
const& message);
187 MCAPI
int calculateMaxGuiScaleIndex(::Vec2
const& screenSize)
const;
189 MCAPI
void clearPlayerMessages();
191 MCAPI
void clearSessionState();
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
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
209 MCAPI
void displayClientMessage(
210 ::std::string
const& message,
211 ::std::optional<::std::string>
const& filteredMessage,
215 MCAPI
void displayDevConsoleMessage(::std::string
const& messages);
217 MCAPI
void displayLocalizableMessage(
218 ::std::string
const& message,
219 ::std::optional<::std::string>
const& filteredMessage,
220 ::std::vector<::std::string>
const& params
224 displayLocalizedMessage(::std::string
const& message, ::std::optional<::std::string>
const& filteredMessage);
226 MCAPI
void displaySystemMessage(
227 ::std::string
const& message,
228 ::std::optional<::std::string>
const& filteredMessage,
229 ::std::string
const& ttsMessage,
230 ::ProfanityFilterContext profanityFilterContext
233 MCAPI
void displayTextObjectMessage(
234 ::TextObjectRoot
const& textObject,
235 ::std::string
const& xuid,
236 ::std::string
const& platformId
239 MCAPI
void displayTextObjectWhisperMessage(
240 ::std::string
const& message,
241 ::std::string
const& xuid,
242 ::std::string
const& platformId
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
253 MCAPI
float floorAlignToScreenPixel(
float v)
const;
255 MCAPI
void flushQueuedDevConsoleMessages();
257 MCAPI
float getGuiScale()
const;
259 MCAPI ::RectangleArea getLayoutCustomizationMainPanelRectangle()
const;
261 MCAPI ::std::vector<::GuiMessage> getPreexistingMessages();
263 MCAPI ::RectangleArea getSafeScreenZoneArea()
const;
265 MCAPI ::RectangleArea getWYSIWYGBottomHudReservedArea()
const;
267 MCAPI ::RectangleArea getWYSIWYGSafeScreenZoneArea()
const;
269 MCAPI ::RectangleArea getWYSIWYGTopReservedArea()
const;
271 MCAPI
bool handleClick();
273 MCAPI
bool isOddGuiScale()
const;
275 MCAPI
void postError(
int errCode);
277 MCAPI ::RectangleArea
const& recomputeHUDHotbarRectangle(
float scale);
279 MCAPI
void setActionBarMessage(::std::string
const& message, ::std::optional<::std::string>
const& filteredMessage);
281 MCAPI
void setScreenSizeData(::ScreenSizeData
const& screenSizeData);
283 MCAPI
void setTextToSpeechEnabled(
bool enabled);
285 MCAPI ::RectangleArea setTouchToolbarArea(::RectangleArea
const& toolbarArea);
287 MCAPI
void showPopupNotice(::ItemStackBase
const& item);
289 MCAPI
void showPopupNotice(::std::string
const& message, ::std::string
const& subtitle);
297 MCAPI
static int getGuiScaleIndexForLargeScreen(::Vec2
const& screenSize);
303 MCAPI
static float const& BUTTONS_TRANSPARENCY();
305 MCAPI
static float const& DropTicks();
307 MCAPI static ::std::array<float, 8>
const& GUI_SCALE_VALUES();
313 MCAPI
void* $ctor(::IClientInstance& client);
325 MCAPI
void $onConfigChanged(::Config
const& c);
Definition EnableNonOwnerReferences.h:7
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:7
Definition ContentLogMessage.h:5
Definition DevConsoleLogger.h:5