Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
HudScreenController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
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"
20
21// auto generated forward declare list
22// clang-format off
23class Block;
28class UIPropertyBag;
29namespace Json { class Value; }
30namespace mce { class Color; }
31// clang-format on
32
34public:
35 // HudScreenController inner types declare
36 // clang-format off
37 struct ButtonLists;
38 struct Tooltip;
39 // clang-format on
40
41 // HudScreenController inner types define
42 enum class Tooltips : uchar {
43 None = 0,
44 LeftTips = 1,
45 RightTips = 2,
46 };
47
48 struct ButtonLists {
49 public:
50 // member variables
51 // NOLINTBEGIN
52 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> chatbuttonList;
53 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> ttsButtonList;
54 // NOLINTEND
55 };
56
57 struct Tooltip {
58 public:
59 // Tooltip inner types define
60 enum class Type : uchar {
61 KeyboardOnly = 0,
62 GamepadOnly = 1,
63 Mixed = 2,
64 };
65
66 public:
67 // member variables
68 // NOLINTBEGIN
69 ::ll::TypedStorage<4, 4, ::Remapping::ActionEnum> action;
70 ::ll::TypedStorage<1, 1, ::HudScreenController::Tooltip::Type> type;
71 ::ll::TypedStorage<8, 64, ::std::function<::std::string()>> generateTooltipDescription;
72 ::ll::TypedStorage<8, 32, ::std::string> keyPostfix;
73 // NOLINTEND
74 };
75
76public:
77 // member variables
78 // NOLINTBEGIN
79 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnBossEventWithPacketSubscription;
80 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnBossEventSubscription;
81 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnLevelSoundEvent;
82 ::ll::TypedStorage<1, 1, bool> mEduDiscoveryObserved;
83 ::ll::TypedStorage<4, 4, int> mInputDelayTimer;
84 ::ll::TypedStorage<8, 32, ::std::string> mPopupItemText;
85 ::ll::TypedStorage<8, 32, ::std::string> mPopupJukeboxText;
86 ::ll::TypedStorage<8, 32, ::std::string> mTipText;
87 ::ll::TypedStorage<4, 12, ::BlockPos> mPlayerPos;
88 ::ll::TypedStorage<4, 12, ::BlockPos> mAgentPos;
89 ::ll::TypedStorage<4, 4, ::ui::DirtyFlag> mRecordedDirtyState;
90 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::HudContainerManagerController>> mHudScreenManagerController;
91 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ScoreboardScreenController>> mScoreboardScreenController;
92 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::GameTipScreenController>> mGameTipScreenController;
93 ::ll::TypedStorage<1, 1, bool> mIsPlayerRiding;
94 ::ll::TypedStorage<1, 1, bool> mIsCreative;
95 ::ll::TypedStorage<1, 1, bool> mIsSpectator;
96 ::ll::TypedStorage<1, 1, bool> mIsExpediateEmoteActive;
97 ::ll::TypedStorage<1, 1, bool> mHasPresentedInitialChat;
98 ::ll::TypedStorage<1, 1, bool> mIsAutoSaving;
99 ::ll::TypedStorage<1, 1, bool> mIsAutoSaveTimerDone;
100 ::ll::TypedStorage<8, 56, ::Stopwatch> mAutoSaveTimer;
101 ::ll::TypedStorage<8, 56, ::Stopwatch> mHUDOpacityTimer;
102 ::ll::TypedStorage<4, 4, float> mHUDOpacityOverride;
103 ::ll::TypedStorage<1, 1, bool> mOverrideHUDOpacity;
104 ::ll::TypedStorage<1, 1, bool> mShouldFireInitialControlTipsActivationEvent;
105 ::ll::TypedStorage<1, 1, bool> mIsDisplayingGameTip;
106 ::ll::TypedStorage<1, 1, bool> mIsTitleOnDisplay;
107 ::ll::TypedStorage<1, 1, bool> mIsActionBarMessageOnDisplay;
108 ::ll::TypedStorage<8, 232, ::TitleMessage> mTitleQueuedData;
109 ::ll::TypedStorage<8, 232, ::TitleMessage> mTitleOnDisplayData;
110 ::ll::TypedStorage<8, 24, ::std::vector<::HudScreenController::Tooltip>> mLeftTooltips;
111 ::ll::TypedStorage<8, 24, ::std::vector<::HudScreenController::Tooltip>> mRightTooltips;
112 ::ll::TypedStorage<8, 24, ::std::vector<::HudScreenController::Tooltip>> mEmoteTooltips;
113 ::ll::TypedStorage<1, 1, bool> mOnNewDeathScreen;
114 ::ll::TypedStorage<1, 1, bool> mShowCursor;
115 ::ll::TypedStorage<8, 16, ::std::map<::OptionID, float>> mCustomizableFloatOptions;
116 ::ll::TypedStorage<8, 16, ::std::set<uint>> mPreviouslyActiveControlOptions;
117 ::ll::TypedStorage<4, 4, ::ui::DirtyFlag> mOnNewDeathScreenDirtyFlag;
118 ::ll::TypedStorage<1, 1, bool> mIsNewDeathScreenEnabled;
119 ::ll::TypedStorage<1, 1, bool> mProfanityFilterChanged;
120 ::ll::TypedStorage<1, 1, bool> mShouldUseFilteredMessage;
121 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mProfanityToggleSubscription;
122 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnRouteChangedSubscription;
123 ::ll::TypedStorage<1, 1, bool> mShouldShowLocatorBarPrev;
124 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mSubtitlePositionSubscription;
125 ::ll::TypedStorage<1, 1, bool> mSubtitlePositionChanged;
126 // NOLINTEND
127
128public:
129 // prevent constructor by default
130 HudScreenController();
131
132public:
133 // virtual functions
134 // NOLINTBEGIN
135 virtual ~HudScreenController() /*override*/ = default;
136
137 virtual ::ui::DirtyFlag tick() /*override*/;
138
139 virtual bool bind(
140 ::std::string const& collectionName,
141 uint collectionNameHash,
142 int collectionIndex,
143 ::std::string const& bindingName,
144 uint bindingNameHash,
145 ::std::string const& bindingNameOverride,
146 ::UIPropertyBag& bag
147 ) /*override*/;
148
149 virtual bool bind(
150 ::std::string const& bindingName,
151 uint bindingNameHash,
152 ::std::string const& bindingNameOverride,
153 ::UIPropertyBag& bag
154 ) /*override*/;
155
156 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) /*override*/;
157
158 virtual void onInit() /*override*/;
159
160 virtual void onOpen() /*override*/;
161
162 virtual void onScreenPushedAbove() /*override*/;
163
164 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
165
166 virtual ::ui::SceneType getSceneType() const /*override*/;
167
168 virtual bool _isStillValid() const /*override*/;
169 // NOLINTEND
170
171public:
172 // member functions
173 // NOLINTBEGIN
174 MCAPI explicit HudScreenController(::std::shared_ptr<::ClientInstanceScreenModel> model);
175
177 ::Remapping::ActionEnum action,
178 ::std::string const& bindingNameOverride,
179 ::UIPropertyBag& bag
180 ) const;
181
183 uint bindingNameHash,
184 ::std::string const& bindingNameOverride,
185 ::UIPropertyBag& bag
186 ) const;
187
189 ::HudScreenController::Tooltip const& tip,
190 uint bindingNameHash,
191 ::std::string const& bindingNameOverride,
192 ::UIPropertyBag& bag
193 ) const;
194
195 MCNAPI void
196 _bindMenuPromptsFlyout(uint bindingNameHash, ::std::string const& bindingNameOverride, ::UIPropertyBag& bag) const;
197
199 ::std::vector<::HudScreenController::Tooltip> const& tooltips,
200 int collectionIndex,
201 uint bindingNameHash,
202 ::std::string const& bindingNameOverride,
203 ::UIPropertyBag& bag,
204 ::HudScreenController::Tooltips tooltipType
205 ) const;
206
207 MCNAPI void
208 _bindTooltipFlyout(uint bindingNameHash, ::std::string const& bindingNameOverride, ::UIPropertyBag& bag) const;
209
211
212 MCNAPI ::std::string _formatButtonList(::std::vector<::std::string> buttonList) const;
213
214 MCNAPI ::mce::Color _getBossColorValue(::BossBarColor barColor) const;
215
216 MCNAPI ::std::string _getContextAttackButton() const;
217
218 MCNAPI ::std::string _getContextChat() const;
219
220 MCNAPI ::std::string _getContextCodeBuilder() const;
221
222 MCNAPI ::std::string _getContextCraftingButton() const;
223
224 MCNAPI ::std::string _getContextDescendButton() const;
225
226 MCNAPI ::std::string _getContextDismountButton() const;
227
228 MCNAPI ::std::string _getContextDropItemButton() const;
229
230 MCNAPI ::std::string _getContextEmoteButton() const;
231
232 MCNAPI ::std::string _getContextImmersiveReader() const;
233
234 MCNAPI ::std::string _getContextInventoryButton() const;
235
236 MCNAPI ::std::string _getContextJumpButton() const;
237
238 MCNAPI ::std::string _getContextToggleFlight() const;
239
240 MCNAPI ::std::string _getContextUseButton() const;
241
242 MCNAPI ::std::string _getEmoteName(int slot);
243
244 MCNAPI void _getFloatCustomizableOptionValue(::OptionID optionID);
245
246 MCNAPI float _getHudAlpha();
247
249
250 MCNAPI void _handleSlotSelection(int slot, ::ContainerID containerId);
251
253
254 MCNAPI bool
255 _isToolTipsHidden(::HudScreenController::Tooltips tooltipType, ::HudScreenController::Tooltip const* tip) const;
256
257 MCNAPI bool _isTouchActive() const;
258
260
261 MCNAPI void _pushNewChatMessage(::std::string const& message, float time);
262
264 ::std::string const& message,
265 float timeSec,
266 ::SoundDirection direction,
267 bool isLocalPlayer
268 );
269
271
273
274 MCNAPI bool _shouldShowLocatorBar() const;
275
276 MCNAPI bool _shouldShowTags() const;
277
278 MCNAPI bool _showClassicUI() const;
279
280 MCNAPI bool _showPaperDoll() const;
281
282 MCNAPI bool _showPocketUI() const;
283
284 MCNAPI bool _showSurvivalUI() const;
285
286 MCNAPI void displayOpenEmoteInstructions(::HudScreenController::ButtonLists const& buttonLists) const;
287
288 MCNAPI ::HudScreenController::ButtonLists const getButtonLists() const;
289
290 MCNAPI ::std::string const getFormattedOpenChatMessage(::std::vector<::std::string> const& buttonList) const;
291
292 MCNAPI ::std::string const getFormattedOpenEmoteMessage(::std::vector<::std::string> const& buttonList) const;
293
294 MCNAPI ::HudScreenController::ButtonLists const getGamepadEmoteButtonLists() const;
295
296 MCNAPI ::HudScreenController::ButtonLists const getKeyboardEmoteButtonLists() const;
297
298 MCNAPI void setupControlCustomizationCallbacksForOptions(::ControlOptionType controlOptionType);
299 // NOLINTEND
300
301public:
302 // static functions
303 // NOLINTBEGIN
304 MCNAPI static bool _shouldShowDefaultUseTooltip(::Block const& block);
305 // NOLINTEND
306
307public:
308 // static variables
309 // NOLINTBEGIN
310 MCNAPI static char const*& ROOT_CONTROL_NAME();
311
312 MCNAPI static char const*& ROOT_CONTROL_NAME_INCLUDING_NAMESPACE();
313 // NOLINTEND
314
315public:
316 // constructor thunks
317 // NOLINTBEGIN
318 MCAPI void* $ctor(::std::shared_ptr<::ClientInstanceScreenModel> model);
319 // NOLINTEND
320
321public:
322 // virtual function thunks
323 // NOLINTBEGIN
324 MCNAPI ::ui::DirtyFlag $tick();
325
326 MCNAPI bool $bind(
327 ::std::string const& collectionName,
328 uint collectionNameHash,
329 int collectionIndex,
330 ::std::string const& bindingName,
331 uint bindingNameHash,
332 ::std::string const& bindingNameOverride,
333 ::UIPropertyBag& bag
334 );
335
336 MCNAPI bool $bind(
337 ::std::string const& bindingName,
338 uint bindingNameHash,
339 ::std::string const& bindingNameOverride,
340 ::UIPropertyBag& bag
341 );
342
343 MCNAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
344
345 MCNAPI void $onInit();
346
347 MCNAPI void $onOpen();
348
349 MCNAPI void $onScreenPushedAbove();
350
351 MCNAPI void $addStaticScreenVars(::Json::Value& globalVars);
352
353 MCNAPI ::ui::SceneType $getSceneType() const;
354
355 MCNAPI bool $_isStillValid() const;
356 // NOLINTEND
357};
Definition Block.h:42
Definition ClientInstanceScreenController.h:5
Definition ClientInstanceScreenModel.h:5
Definition GameTipScreenController.h:5
Definition HudContainerManagerController.h:14
Definition HudScreenController.h:5
MCAPI void $onScreenPushedAbove()
MCAPI::std::string _getContextDismountButton() const
MCAPI void $onInit()
MCAPI::std::string _getContextImmersiveReader() const
MCAPI void _bindTooltipCollection(::std::vector<::HudScreenController::Tooltip > const &tooltips, int collectionIndex, uint bindingNameHash, ::std::string const &bindingNameOverride, ::UIPropertyBag &bag, ::HudScreenController::Tooltips tooltipType) const
MCAPI::std::string _getContextCraftingButton() const
MCAPI::std::string _getEmoteName(int slot)
MCAPI void _bindActionIconForGamepad(::Remapping::ActionEnum action, ::std::string const &bindingNameOverride, ::UIPropertyBag &bag) const
MCAPI bool _showClassicUI() const
MCAPI void _recreateSubtitleContainer()
MCAPI void _handleSlotSelection(int slot, ::ContainerID containerId)
MCAPI::std::string _getContextCodeBuilder() const
MCAPI void $onOpen()
static MCAPI char const *& ROOT_CONTROL_NAME_INCLUDING_NAMESPACE()
MCAPI void $addStaticScreenVars(::Json::Value &globalVars)
MCAPI void _fireInitialControlTipsActivationEvent() const
MCAPI::mce::Color _getBossColorValue(::BossBarColor barColor) const
MCAPI bool $bind(::std::string const &collectionName, uint collectionNameHash, int collectionIndex, ::std::string const &bindingName, uint bindingNameHash, ::std::string const &bindingNameOverride, ::UIPropertyBag &bag)
MCAPI void _leaveControlCustomizationScreen()
MCAPI::std::string _getContextChat() const
MCAPI float _getHudAlpha()
MCAPI bool _shouldShowTags() const
MCAPI::std::string const getFormattedOpenEmoteMessage(::std::vector<::std::string > const &buttonList) const
MCAPI::std::string _getContextDropItemButton() const
static MCAPI char const *& ROOT_CONTROL_NAME()
MCAPI bool _bindKeyboardTooltip(::HudScreenController::Tooltip const &tip, uint bindingNameHash, ::std::string const &bindingNameOverride, ::UIPropertyBag &bag) const
MCAPI void setupControlCustomizationCallbacksForOptions(::ControlOptionType controlOptionType)
MCAPI void _getFloatCustomizableOptionValue(::OptionID optionID)
MCAPI::ui::DirtyFlag $tick()
MCAPI::HudScreenController::ButtonLists const getGamepadEmoteButtonLists() const
MCAPI::std::string _getContextToggleFlight() const
MCAPI void displayOpenEmoteInstructions(::HudScreenController::ButtonLists const &buttonLists) const
MCAPI bool $_isStillValid() const
MCAPI void _pushNewChatMessage(::std::string const &message, float time)
MCAPI void _bindInventoryPromptsFlyout(uint bindingNameHash, ::std::string const &bindingNameOverride, ::UIPropertyBag &bag) const
MCAPI::HudScreenController::ButtonLists const getButtonLists() const
MCAPI void _handleNewActionBarMessage()
MCAPI bool _isTouchActive() const
MCAPI::std::string _getContextEmoteButton() const
MCAPI::std::string _getContextJumpButton() const
MCAPI::std::string _formatButtonList(::std::vector<::std::string > buttonList) const
MCAPI bool _showPocketUI() const
MCAPI::std::string _getContextUseButton() const
MCAPI bool _showPaperDoll() const
MCAPI void _pushNewSubtitleMessage(::std::string const &message, float timeSec, ::SoundDirection direction, bool isLocalPlayer)
MCAPI void _bindMenuPromptsFlyout(uint bindingNameHash, ::std::string const &bindingNameOverride, ::UIPropertyBag &bag) const
MCAPI bool _isAutoSaveIconVisible()
static MCAPI bool _shouldShowDefaultUseTooltip(::Block const &block)
MCAPI bool _isToolTipsHidden(::HudScreenController::Tooltips tooltipType, ::HudScreenController::Tooltip const *tip) const
MCAPI::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification)
MCAPI::std::string const getFormattedOpenChatMessage(::std::vector<::std::string > const &buttonList) const
MCAPI::ui::SceneType $getSceneType() const
MCAPI bool _shouldShowLocatorBar() const
MCAPI::std::string _getContextAttackButton() const
MCAPI void _refreshSubtitleMessages()
MCAPI::std::string _getContextDescendButton() const
MCAPI bool _showSurvivalUI() const
MCAPI::HudScreenController::ButtonLists const getKeyboardEmoteButtonLists() const
MCAPI void _bindTooltipFlyout(uint bindingNameHash, ::std::string const &bindingNameOverride, ::UIPropertyBag &bag) const
MCAPI::std::string _getContextInventoryButton() const
Definition Value.h:16
Definition ScoreboardScreenController.h:5
Definition UIPropertyBag.h:5
Definition Color.h:13
STL namespace.
Definition HudScreenController.h:16
Definition HudScreenController.h:18