LeviLamina
Loading...
Searching...
No Matches
GameTipScreenController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/GameEventNotification.h"
8#include "mc/client/gui/screens/controllers/ClientInstanceScreenController.h"
9#include "mc/client/social/IToastEventListener.h"
10#include "mc/client/tutorial/game_tip_constants/Animation.h"
11#include "mc/client/tutorial/game_tip_constants/Interruption.h"
12#include "mc/deps/core/utility/pub_sub/Subscription.h"
13#include "mc/deps/input/InputMode.h"
14
15// auto generated forward declare list
16// clang-format off
18class GameTip;
20class Option;
21class ToastMessage;
22class UIPropertyBag;
23// clang-format on
24
26public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::HudContainerManagerController>> mHudContainerManagerController;
30 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::GameTip>>> mAvailableTips;
31 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::GameTip>> mActiveNowTip;
32 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::GameTip>> mInterruptedTip;
33 ::ll::TypedStorage<4, 4, float> mActiveNowTipGuiScale;
34 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mActiveDisplayFactoryName;
35 ::ll::TypedStorage<8, 64, ::std::unordered_set<::GameTipConstants::Interruption>> mInterruptions;
36 ::ll::TypedStorage<8, 8, ::std::chrono::seconds> mCooldownAfterStoppedDisplaying;
37 ::ll::TypedStorage<8, 8, ::std::chrono::seconds> mCooldownAfterInterruption;
38 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastTipStoppedDisplayingTime;
39 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastInterruptionFinishedTime;
40 ::ll::TypedStorage<4, 4, ::InputMode> mInputModeLastTick;
41 ::ll::TypedStorage<1, 1, bool> mFirstTick;
42 ::ll::TypedStorage<1, 1, bool> mUpdateBinds;
43 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mGametipOptionSubscription;
44 ::ll::TypedStorage<1, 1, bool> mShowGameTipsAnimations;
45 // NOLINTEND
46
47public:
48 // prevent constructor by default
49 GameTipScreenController();
50
51public:
52 // virtual functions
53 // NOLINTBEGIN
54 virtual ~GameTipScreenController() /*override*/;
55
56 virtual void onOpen() /*override*/;
57
58 virtual void onTerminate() /*override*/;
59
60 virtual ::ui::DirtyFlag tick() /*override*/;
61
62 virtual void
63 handleToastEvent(::IToastEventListener::ToastEventType const eventType, ::ToastMessage const msg) /*override*/;
64
65 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) /*override*/;
66 // NOLINTEND
67
68public:
69 // member functions
70 // NOLINTBEGIN
71 MCAPI GameTipScreenController(
72 ::std::shared_ptr<::ClientInstanceScreenModel> model,
73 ::std::shared_ptr<::HudContainerManagerController> mHudScreenManagerController
74 );
75
76 MCAPI void _addActiveTipArrowProperties(::UIPropertyBag& bag);
77
78 MCAPI void _addInterruption(::GameTipConstants::Interruption interruption);
79
80 MCAPI void _cleanUpFinishedTips();
81
82 MCAPI void _destroyActiveTip();
83
84 MCAPI void _displayActiveTip(::GameTipConstants::Animation animation);
85
86 MCAPI void _displayNewTip(::std::shared_ptr<::GameTip> const& tip);
87
88 MCAPI void _gametipOptionCallback(::Option const& gametipEnabled);
89
90 MCAPI ::std::string _getActiveTipAnimationFileName(::InputMode inputMode);
91
92 MCAPI ::std::string _getActiveTipLocalizationText(::InputMode inputMode) const;
93
94 MCAPI ::std::array<::std::string, 2> _getActiveTipOffset() const;
95
96 MCAPI void _handleInterruptions();
97
98 MCAPI void _handleMobsNearbyInterruption();
99
100 MCAPI void _instantiateTips();
101
102 MCAPI void _maybeUpdateActiveNowTip();
103
104 MCAPI void _registerEventHandlers();
105
106 MCAPI void _removeInterruption(::GameTipConstants::Interruption interruption);
107
108 MCAPI void _stopDisplayingActiveTip();
109
110 MCAPI bool isDisplayingTip() const;
111 // NOLINTEND
112
113public:
114 // constructor thunks
115 // NOLINTBEGIN
116 MCAPI void* $ctor(
117 ::std::shared_ptr<::ClientInstanceScreenModel> model,
118 ::std::shared_ptr<::HudContainerManagerController> mHudScreenManagerController
119 );
120 // NOLINTEND
121
122public:
123 // destructor thunk
124 // NOLINTBEGIN
125 MCAPI void $dtor();
126 // NOLINTEND
127
128public:
129 // virtual function thunks
130 // NOLINTBEGIN
131 MCAPI void $onOpen();
132
133 MCFOLD void $onTerminate();
134
135 MCAPI ::ui::DirtyFlag $tick();
136
137 MCAPI void $handleToastEvent(::IToastEventListener::ToastEventType const eventType, ::ToastMessage const msg);
138
139 MCAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
140 // NOLINTEND
141
142public:
143 // vftables
144 // NOLINTBEGIN
146
147 MCNAPI static void** $vftableForScreenController();
148
149 MCNAPI static void** $vftable();
150 // NOLINTEND
151};
Definition ClientInstanceScreenController.h:5
Definition ClientInstanceScreenModel.h:5
Definition GameTipScreenController.h:5
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftable()
static MCAPI void ** $vftableForScreenController()
Definition GameTip.h:5
Definition HudContainerManagerController.h:14
Definition IToastEventListener.h:5
Definition Option.h:22
Definition ToastMessage.h:5
Definition UIPropertyBag.h:5