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/screens/controllers/ClientInstanceScreenController.h"
13#include "mc/client/input/vanilla/remapping/ActionEnum.h"
14#include "mc/deps/core/timing/Stopwatch.h"
15#include "mc/deps/core/utility/pub_sub/Subscription.h"
16#include "mc/options/option_types/OptionID.h"
17#include "mc/world/ContainerID.h"
18#include "mc/world/actor/ai/util/BossBarColor.h"
19#include "mc/world/level/BlockPos.h"
31namespace Json {
class Value; }
32namespace mce {
class Color; }
44 enum class Tooltips : uchar {
54 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> chatbuttonList;
55 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> ttsButtonList;
62 enum class Type : uchar {
71 ::ll::TypedStorage<4, 4, ::Remapping::ActionEnum> action;
72 ::ll::TypedStorage<1, 1, ::HudScreenController::Tooltip::Type> type;
73 ::ll::TypedStorage<8, 64, ::std::function<::std::string()>> generateTooltipDescription;
74 ::ll::TypedStorage<8, 32, ::std::string> keyPostfix;
81 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnBossEventWithPacketSubscription;
82 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnBossEventSubscription;
83 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnLevelSoundEvent;
84 ::ll::TypedStorage<1, 1, bool> mEDUDiscoveryObserved;
85 ::ll::TypedStorage<4, 4, int> mInputDelayTimer;
86 ::ll::TypedStorage<8, 32, ::std::string> mPopupItemText;
87 ::ll::TypedStorage<8, 32, ::std::string> mPopupJukeboxText;
88 ::ll::TypedStorage<8, 32, ::std::string> mTipText;
89 ::ll::TypedStorage<4, 12, ::BlockPos> mPlayerPos;
90 ::ll::TypedStorage<4, 12, ::BlockPos> mAgentPos;
91 ::ll::TypedStorage<4, 4, ::ui::DirtyFlag> mRecordedDirtyState;
92 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::HudContainerManagerController>> mHudScreenManagerController;
93 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ScoreboardScreenController>> mScoreboardScreenController;
94 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::GameTipScreenController>> mGameTipScreenController;
95 ::ll::TypedStorage<1, 1, bool> mIsPlayerRiding;
96 ::ll::TypedStorage<1, 1, bool> mIsCreative;
97 ::ll::TypedStorage<1, 1, bool> mIsSpectator;
98 ::ll::TypedStorage<1, 1, bool> mIsExpediateEmoteActive;
99 ::ll::TypedStorage<1, 1, bool> mHasPresentedInitialChat;
100 ::ll::TypedStorage<1, 1, bool> mIsAutoSaving;
101 ::ll::TypedStorage<1, 1, bool> mIsAutoSaveTimerDone;
102 ::ll::TypedStorage<8, 56, ::Stopwatch> mAutoSaveTimer;
103 ::ll::TypedStorage<8, 56, ::Stopwatch> mHUDOpacityTimer;
104 ::ll::TypedStorage<4, 4, float> mHUDOpacityOverride;
105 ::ll::TypedStorage<1, 1, bool> mOverrideHUDOpacity;
106 ::ll::TypedStorage<1, 1, bool> mShouldFireInitialControlTipsActivationEvent;
107 ::ll::TypedStorage<1, 1, bool> mIsDisplayingGameTip;
108 ::ll::TypedStorage<1, 1, bool> mIsTitleOnDisplay;
109 ::ll::TypedStorage<1, 1, bool> mIsActionBarMessageOnDisplay;
110 ::ll::TypedStorage<8, 232, ::TitleMessage> mTitleQueuedData;
111 ::ll::TypedStorage<8, 232, ::TitleMessage> mTitleOnDisplayData;
112 ::ll::TypedStorage<8, 24, ::std::vector<::HudScreenController::Tooltip>> mLeftTooltips;
113 ::ll::TypedStorage<8, 24, ::std::vector<::HudScreenController::Tooltip>> mRightTooltips;
114 ::ll::TypedStorage<8, 24, ::std::vector<::HudScreenController::Tooltip>> mEmoteTooltips;
115 ::ll::TypedStorage<1, 1, bool> mOnNewDeathScreen;
116 ::ll::TypedStorage<1, 1, bool> mShowCursor;
117 ::ll::TypedStorage<8, 16, ::std::map<::OptionID, float>> mCustomizableFloatOptions;
118 ::ll::TypedStorage<8, 16, ::std::set<uint>> mPreviouslyActiveControlOptions;
119 ::ll::TypedStorage<4, 4, ::ui::DirtyFlag> mOnNewDeathScreenDirtyFlag;
120 ::ll::TypedStorage<1, 1, bool> mIsNewDeathScreenEnabled;
121 ::ll::TypedStorage<1, 1, bool> mProfanityFilterChanged;
122 ::ll::TypedStorage<1, 1, bool> mShouldUseFilteredMessage;
123 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mProfanityToggleSubscription;
124 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnRouteChangedSubscription;
125 ::ll::TypedStorage<1, 1, bool> mShouldShowLocatorBarPrev;
126 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mSubtitlePositionSubscription;
127 ::ll::TypedStorage<1, 1, bool> mSubtitlePositionChanged;
132 HudScreenController();
137 virtual ~HudScreenController() =
default;
139 virtual ::ui::DirtyFlag tick() ;
142 ::std::string
const& collectionName,
143 uint collectionNameHash,
145 ::std::string
const& bindingName,
146 uint bindingNameHash,
147 ::std::string
const& bindingNameOverride,
152 ::std::string
const& bindingName,
153 uint bindingNameHash,
154 ::std::string
const& bindingNameOverride,
158 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) ;
160 virtual void onInit() ;
162 virtual void onOpen() ;
164 virtual void onScreenPushedAbove() ;
166 virtual void addStaticScreenVars(::Json::Value& globalVars) ;
168 virtual ::ui::SceneType getSceneType() const ;
170 virtual
bool _isStillValid() const ;
176 MCAPI explicit HudScreenController(::std::shared_ptr<::ClientInstanceScreenModel> model);
178 MCAPI
void _bindActionIconForGamepad(
179 ::Remapping::ActionEnum action,
180 ::std::
string const& bindingNameOverride,
184 MCAPI
void _bindInventoryPromptsFlyout(
185 uint bindingNameHash,
186 ::std::
string const& bindingNameOverride,
190 MCAPI
bool _bindKeyboardTooltip(
191 ::HudScreenController::
Tooltip const& tip,
192 uint bindingNameHash,
193 ::std::
string const& bindingNameOverride,
198 _bindMenuPromptsFlyout(uint bindingNameHash, ::std::
string const& bindingNameOverride, ::UIPropertyBag& bag) const;
200 MCAPI
void _bindTooltipCollection(
201 ::std::vector<::HudScreenController::
Tooltip> const& tooltips,
203 uint bindingNameHash,
204 ::std::
string const& bindingNameOverride,
205 ::UIPropertyBag& bag,
206 ::HudScreenController::Tooltips tooltipType
210 _bindTooltipFlyout(uint bindingNameHash, ::std::
string const& bindingNameOverride, ::UIPropertyBag& bag) const;
212 MCAPI
void _fireInitialControlTipsActivationEvent() const;
214 MCAPI ::std::
string _formatButtonList(::std::vector<::std::
string> buttonList) const;
216 MCAPI ::mce::Color _getBossColorValue(::BossBarColor barColor) const;
218 MCAPI ::std::
string _getContextAttackButton() const;
220 MCAPI ::std::
string _getContextChat() const;
222 MCAPI ::std::
string _getContextCodeBuilder() const;
224 MCAPI ::std::
string _getContextCraftingButton() const;
226 MCAPI ::std::
string _getContextDescendButton() const;
228 MCAPI ::std::
string _getContextDismountButton() const;
230 MCAPI ::std::
string _getContextDropItemButton() const;
232 MCAPI ::std::
string _getContextEmoteButton() const;
234 MCAPI ::std::
string _getContextImmersiveReader() const;
236 MCAPI ::std::
string _getContextInventoryButton() const;
238 MCAPI ::std::
string _getContextJumpButton() const;
240 MCAPI ::std::
string _getContextToggleFlight() const;
242 MCAPI ::std::
string _getContextUseButton() const;
244 MCAPI ::std::
string _getEmoteName(
int slot);
246 MCAPI
void _getFloatCustomizableOptionValue(::OptionID optionID);
248 MCAPI ::Keymapping const& _getGamepadMapping(::Remapping::ActionEnum action) const;
250 MCAPI
float _getHudAlpha();
252 MCAPI ::Keymapping const& _getKeyboardMapping(::Remapping::ActionEnum action) const;
254 MCAPI ::Keymapping const& _getMapping(::Remapping::ActionEnum action, ::RemappingLayout const& layout) const;
256 MCAPI
void _handleNewActionBarMessage();
258 MCAPI
void _handleSlotSelection(
int slot, ::ContainerID containerId);
260 MCAPI
bool _isAutoSaveIconVisible();
263 _isToolTipsHidden(::HudScreenController::Tooltips tooltipType, ::HudScreenController::
Tooltip const* tip) const;
265 MCAPI
bool _isTouchActive() const;
267 MCAPI
void _leaveControlCustomizationScreen();
269 MCAPI
void _pushNewChatMessage(::std::
string const& message,
float time);
271 MCAPI
void _pushNewSubtitleMessage(
272 ::std::
string const& message,
274 ::SoundDirection direction,
278 MCAPI
void _recreateSubtitleContainer();
280 MCAPI
void _refreshSubtitleMessages();
282 MCAPI
bool _shouldShowLocatorBar() const;
284 MCAPI
bool _shouldShowTags() const;
286 MCAPI
bool _showClassicUI() const;
288 MCAPI
bool _showPaperDoll() const;
290 MCAPI
bool _showPocketUI() const;
292 MCAPI
bool _showSurvivalUI() const;
294 MCAPI
void displayOpenEmoteInstructions(::HudScreenController::
ButtonLists const& buttonLists) const;
296 MCAPI ::HudScreenController::
ButtonLists const getButtonLists() const;
298 MCAPI ::std::
string const getFormattedOpenChatMessage(::std::vector<::std::
string> const& buttonList) const;
300 MCAPI ::std::
string const getFormattedOpenEmoteMessage(::std::vector<::std::
string> const& buttonList) const;
302 MCAPI ::HudScreenController::
ButtonLists const getGamepadEmoteButtonLists() const;
304 MCAPI ::HudScreenController::
ButtonLists const getKeyboardEmoteButtonLists() const;
306 MCAPI
void setupControlCustomizationCallbacksForOptions(::ControlOptionType controlOptionType);
312 MCAPI static
bool _shouldShowDefaultUseTooltip(::Block const& block);
318 MCAPI static
char const*& ROOT_CONTROL_NAME();
320 MCAPI static
char const*& ROOT_CONTROL_NAME_INCLUDING_NAMESPACE();
326 MCAPI
void* $ctor(::std::shared_ptr<::ClientInstanceScreenModel> model);
332 MCAPI ::ui::DirtyFlag $tick();
335 ::std::
string const& collectionName,
336 uint collectionNameHash,
338 ::std::
string const& bindingName,
339 uint bindingNameHash,
340 ::std::
string const& bindingNameOverride,
345 ::std::
string const& bindingName,
346 uint bindingNameHash,
347 ::std::
string const& bindingNameOverride,
351 MCAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
353 MCAPI
void $onInit();
355 MCAPI
void $onOpen();
357 MCAPI
void $onScreenPushedAbove();
359 MCAPI
void $addStaticScreenVars(::Json::Value& globalVars);
361 MCFOLD ::ui::SceneType $getSceneType() const;
363 MCAPI
bool $_isStillValid() const;
Definition ClientInstanceScreenController.h:5
Definition ClientInstanceScreenModel.h:5
Definition GameTipScreenController.h:5
Definition HudContainerManagerController.h:14
Definition HudScreenController.h:5
Definition Keymapping.h:5
Definition RemappingLayout.h:5
Definition ScoreboardScreenController.h:5
Definition UIPropertyBag.h:5