3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/game/ControlOptionType.h"
7#include "mc/client/gui/DirtyFlag.h"
8#include "mc/client/gui/GameEventNotification.h"
9#include "mc/client/gui/SceneType.h"
10#include "mc/client/gui/SoundDirection.h"
11#include "mc/client/gui/TitleMessage.h"
12#include "mc/client/gui/oreui/routing/RouterAction.h"
13#include "mc/client/gui/screens/controllers/ClientInstanceScreenController.h"
14#include "mc/client/input/vanilla/remapping/ActionEnum.h"
15#include "mc/deps/core/timing/Stopwatch.h"
16#include "mc/deps/core/utility/pub_sub/Subscription.h"
17#include "mc/options/option_types/OptionID.h"
18#include "mc/world/ContainerID.h"
19#include "mc/world/actor/ai/util/BossBarColor.h"
20#include "mc/world/actor/ai/util/BossEventUpdateType.h"
21#include "mc/world/level/BlockPos.h"
37namespace Json {
class Value; }
39namespace mce {
class Color; }
51 enum class Tooltips : uchar {
61 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> chatbuttonList;
62 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> ttsButtonList;
69 enum class Type : uchar {
78 ::ll::TypedStorage<4, 4, ::Remapping::ActionEnum> action;
79 ::ll::TypedStorage<1, 1, ::HudScreenController::Tooltip::Type> type;
80 ::ll::TypedStorage<8, 64, ::std::function<::std::string()>> generateTooltipDescription;
81 ::ll::TypedStorage<8, 32, ::std::string> keyPostfix;
86 Tooltip& operator=(Tooltip
const&);
92 MCAPI Tooltip(::HudScreenController::Tooltip
const&);
100 MCAPI
void* $ctor(::HudScreenController::Tooltip
const&);
113 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnBossEventWithPacketSubscription;
114 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnBossEventSubscription;
115 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnLevelSoundEvent;
116 ::ll::TypedStorage<1, 1, bool> mEDUDiscoveryObserved;
117 ::ll::TypedStorage<4, 4, int> mInputDelayTimer;
118 ::ll::TypedStorage<8, 32, ::std::string> mPopupItemText;
119 ::ll::TypedStorage<8, 32, ::std::string> mPopupJukeboxText;
120 ::ll::TypedStorage<8, 32, ::std::string> mTipText;
121 ::ll::TypedStorage<4, 12, ::BlockPos> mPlayerPos;
122 ::ll::TypedStorage<4, 12, ::BlockPos> mAgentPos;
123 ::ll::TypedStorage<4, 4, ::ui::DirtyFlag> mRecordedDirtyState;
124 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::HudContainerManagerController>> mHudScreenManagerController;
125 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ScoreboardScreenController>> mScoreboardScreenController;
126 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::GameTipScreenController>> mGameTipScreenController;
127 ::ll::TypedStorage<1, 1, bool> mIsPlayerRiding;
128 ::ll::TypedStorage<1, 1, bool> mIsCreative;
129 ::ll::TypedStorage<1, 1, bool> mIsSpectator;
130 ::ll::TypedStorage<1, 1, bool> mIsExpediateEmoteActive;
131 ::ll::TypedStorage<1, 1, bool> mHasPresentedInitialChat;
132 ::ll::TypedStorage<1, 1, bool> mIsAutoSaving;
133 ::ll::TypedStorage<1, 1, bool> mIsAutoSaveTimerDone;
134 ::ll::TypedStorage<8, 56, ::Stopwatch> mAutoSaveTimer;
135 ::ll::TypedStorage<8, 56, ::Stopwatch> mHUDOpacityTimer;
136 ::ll::TypedStorage<4, 4, float> mHUDOpacityOverride;
137 ::ll::TypedStorage<1, 1, bool> mOverrideHUDOpacity;
138 ::ll::TypedStorage<1, 1, bool> mShouldFireInitialControlTipsActivationEvent;
139 ::ll::TypedStorage<1, 1, bool> mIsDisplayingGameTip;
140 ::ll::TypedStorage<1, 1, bool> mIsTitleOnDisplay;
141 ::ll::TypedStorage<1, 1, bool> mIsActionBarMessageOnDisplay;
142 ::ll::TypedStorage<8, 232, ::TitleMessage> mTitleQueuedData;
143 ::ll::TypedStorage<8, 232, ::TitleMessage> mTitleOnDisplayData;
144 ::ll::TypedStorage<8, 24, ::std::vector<::HudScreenController::Tooltip>> mLeftTooltips;
145 ::ll::TypedStorage<8, 24, ::std::vector<::HudScreenController::Tooltip>> mRightTooltips;
146 ::ll::TypedStorage<8, 24, ::std::vector<::HudScreenController::Tooltip>> mEmoteTooltips;
147 ::ll::TypedStorage<1, 1, bool> mOnNewDeathScreen;
148 ::ll::TypedStorage<1, 1, bool> mShowCursor;
149 ::ll::TypedStorage<8, 16, ::std::map<::OptionID, float>> mCustomizableFloatOptions;
150 ::ll::TypedStorage<8, 16, ::std::set<uint>> mPreviouslyActiveControlOptions;
151 ::ll::TypedStorage<4, 4, ::ui::DirtyFlag> mOnNewDeathScreenDirtyFlag;
152 ::ll::TypedStorage<1, 1, bool> mIsNewDeathScreenEnabled;
153 ::ll::TypedStorage<1, 1, bool> mProfanityFilterChanged;
154 ::ll::TypedStorage<1, 1, bool> mShouldUseFilteredMessage;
155 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mProfanityToggleSubscription;
156 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnRouteChangedSubscription;
157 ::ll::TypedStorage<1, 1, bool> mShouldShowLocatorBarPrev;
158 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mSubtitlePositionSubscription;
159 ::ll::TypedStorage<1, 1, bool> mSubtitlePositionChanged;
164 HudScreenController();
169 virtual ~HudScreenController() ;
171 virtual ::ui::DirtyFlag tick() ;
174 ::std::string
const& collectionName,
175 uint collectionNameHash,
177 ::std::string
const& bindingName,
178 uint bindingNameHash,
179 ::std::string
const& bindingNameOverride,
184 ::std::string
const& bindingName,
185 uint bindingNameHash,
186 ::std::string
const& bindingNameOverride,
190 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) ;
192 virtual void onInit() ;
194 virtual void onOpen() ;
196 virtual void onScreenPushedAbove() ;
198 virtual void addStaticScreenVars(::Json::Value& globalVars) ;
200 virtual ::ui::SceneType getSceneType() const ;
202 virtual
bool _isStillValid() const ;
208 MCAPI explicit HudScreenController(::std::shared_ptr<::ClientInstanceScreenModel> model);
210 MCAPI
void _bindActionIconForGamepad(
211 ::Remapping::ActionEnum action,
212 ::std::
string const& bindingNameOverride,
216 MCAPI
void _bindInventoryPromptsFlyout(
217 uint bindingNameHash,
218 ::std::
string const& bindingNameOverride,
222 MCAPI
bool _bindKeyboardTooltip(
223 ::HudScreenController::
Tooltip const& tip,
224 uint bindingNameHash,
225 ::std::
string const& bindingNameOverride,
230 _bindMenuPromptsFlyout(uint bindingNameHash, ::std::
string const& bindingNameOverride, ::UIPropertyBag& bag) const;
232 MCAPI
void _bindTooltipCollection(
233 ::std::vector<::HudScreenController::
Tooltip> const& tooltips,
235 uint bindingNameHash,
236 ::std::
string const& bindingNameOverride,
237 ::UIPropertyBag& bag,
238 ::HudScreenController::Tooltips tooltipType
242 _bindTooltipFlyout(uint bindingNameHash, ::std::
string const& bindingNameOverride, ::UIPropertyBag& bag) const;
244 MCAPI
bool _canChatAndEmoteGameTipBeShown() const;
246 MCAPI
void _checkEduDiscoveryReachable();
248 MCAPI
void _fireInitialControlTipsActivationEvent() const;
250 MCAPI ::std::
string _formatButtonList(::std::vector<::std::
string> buttonList) const;
252 MCAPI ::mce::Color _getBossColorValue(::BossBarColor barColor) const;
254 MCAPI ::std::
string _getContextAttackButton() const;
256 MCAPI ::std::
string _getContextChat() const;
258 MCAPI ::std::
string _getContextCodeBuilder() const;
260 MCAPI ::std::
string _getContextCraftingButton() const;
262 MCAPI ::std::
string _getContextDescendButton() const;
264 MCAPI ::std::
string _getContextDismountButton() const;
266 MCAPI ::std::
string _getContextDropItemButton() const;
268 MCAPI ::std::
string _getContextEmoteButton() const;
270 MCAPI ::std::
string _getContextImmersiveReader() const;
272 MCAPI ::std::
string _getContextInventoryButton() const;
274 MCAPI ::std::
string _getContextJumpButton() const;
276 MCAPI ::std::
string _getContextToggleFlight() const;
278 MCAPI ::std::
string _getContextUseButton() const;
280 MCAPI
void _getCustomizableOptionValues();
282 MCAPI ::ui::DirtyFlag _getDirtyFlag(::ui::DirtyFlag returnValue);
284 MCAPI ::std::
string _getEmoteName(
int slot);
286 MCAPI
void _getFloatCustomizableOptionValue(::OptionID optionID);
288 MCAPI ::Keymapping const& _getGamepadMapping(::Remapping::ActionEnum action) const;
290 MCAPI
float _getHudAlpha();
292 MCAPI ::Keymapping const& _getKeyboardMapping(::Remapping::ActionEnum action) const;
294 MCAPI ::Keymapping const& _getMapping(::Remapping::ActionEnum action, ::RemappingLayout const& layout) const;
296 MCAPI
void _handleChatMessages();
298 MCAPI
void _handleClearTitle();
300 MCAPI
void _handleNewActionBarMessage();
302 MCAPI
void _handleNewPopupItemText();
304 MCAPI
void _handleNewSubtitleText();
306 MCAPI
void _handleNewTipText();
308 MCAPI
void _handleSlotSelection(
int slot, ::ContainerID containerId);
310 MCAPI
void _handleSubtitleMessages();
312 MCAPI
bool _isAutoSaveIconVisible();
315 _isToolTipsHidden(::HudScreenController::Tooltips tooltipType, ::HudScreenController::
Tooltip const* tip) const;
317 MCAPI
bool _isTouchActive() const;
319 MCAPI
void _leaveControlCustomizationScreen();
321 MCAPI
void _onBossEvent(::BossEventUpdateType type, ::ActorUniqueID const&
id, ::BossEventPacket const& packet);
323 MCAPI
void _onSoundEvent(
324 ::std::
string const& name,
325 ::std::optional<::std::
string> subtitle,
328 ::Vec3 const& forward,
333 MCAPI
void _pushExistingChatMessages();
335 MCAPI
void _pushNewChatMessage(::std::
string const& message,
float time);
337 MCAPI
void _pushNewSubtitleMessage(
338 ::std::
string const& message,
340 ::SoundDirection direction,
344 MCAPI
void _recreateSubtitleContainer();
346 MCAPI
void _refreshChatMessages();
348 MCAPI
void _refreshSubtitleMessages();
350 MCAPI
void _registerEventHandlers();
352 MCAPI
void _registerSubControllers();
354 MCAPI
void _registerTooltips();
356 MCAPI
bool _shouldShowLocatorBar() const;
358 MCAPI
bool _shouldShowTags() const;
360 MCAPI
bool _showClassicUI() const;
362 MCAPI
bool _showPaperDoll() const;
364 MCAPI
bool _showPocketUI() const;
366 MCAPI
bool _showSurvivalUI() const;
368 MCAPI
void _updateTitleText();
371 addBossUI(::ActorUniqueID const&
id, ::Bedrock::Safety::RedactableString name,
float percent, ::BossBarColor color);
373 MCAPI
void displayOpenEmoteInstructions(::HudScreenController::
ButtonLists const& buttonLists) const;
375 MCAPI ::HudScreenController::
ButtonLists const getButtonLists() const;
377 MCAPI ::std::
string const getFormattedOpenChatMessage(::std::vector<::std::
string> const& buttonList) const;
379 MCAPI ::std::
string const getFormattedOpenEmoteMessage(::std::vector<::std::
string> const& buttonList) const;
381 MCAPI ::HudScreenController::
ButtonLists const getGamepadEmoteButtonLists() const;
383 MCAPI ::HudScreenController::
ButtonLists const getKeyboardEmoteButtonLists() const;
385 MCAPI
void onRouteChanged(
386 ::std::optional<::OreUI::RouterLocation> const& previousLocation,
387 ::std::optional<::OreUI::RouterLocation> const& currentLocation,
388 ::OreUI::RouterAction
391 MCAPI
void setupControlCustomizationCallbacksForOptions(::ControlOptionType controlOptionType);
397 MCAPI static
bool _shouldShowDefaultUseTooltip(::Block const& block);
403 MCAPI static
char const*& ROOT_CONTROL_NAME();
405 MCAPI static
char const*& ROOT_CONTROL_NAME_INCLUDING_NAMESPACE();
411 MCAPI
void* $ctor(::std::shared_ptr<::ClientInstanceScreenModel> model);
423 MCAPI ::ui::DirtyFlag $tick();
426 ::std::
string const& collectionName,
427 uint collectionNameHash,
429 ::std::
string const& bindingName,
430 uint bindingNameHash,
431 ::std::
string const& bindingNameOverride,
436 ::std::
string const& bindingName,
437 uint bindingNameHash,
438 ::std::
string const& bindingNameOverride,
442 MCAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
444 MCAPI
void $onInit();
446 MCAPI
void $onOpen();
448 MCAPI
void $onScreenPushedAbove();
450 MCAPI
void $addStaticScreenVars(::Json::Value& globalVars);
452 MCFOLD ::ui::SceneType $getSceneType() const;
454 MCAPI
bool $_isStillValid() const;
Definition RedactableString.h:10
Definition BossEventPacket.h:23
Definition ClientInstanceScreenController.h:5
Definition ClientInstanceScreenModel.h:5
Definition GameTipScreenController.h:5
Definition HudContainerManagerController.h:14
Definition HudScreenController.h:5
static MCAPI void ** $vftableForScreenController()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
Definition Keymapping.h:5
Definition RouterLocation.h:7
Definition RemappingLayout.h:5
Definition ScoreboardScreenController.h:5
Definition UIPropertyBag.h:5
Definition ActorUniqueID.h:10