LeviLamina
Loading...
Searching...
No Matches
ChatScreenController.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/IntellisenseHandler.h"
9#include "mc/client/gui/screens/controllers/ClientInstanceScreenController.h"
10#include "mc/client/gui/screens/controllers/HostOptionStates.h"
11#include "mc/deps/core/math/Vec3.h"
12#include "mc/deps/core/utility/pub_sub/Subscription.h"
13#include "mc/world/level/BlockPos.h"
14
15// auto generated forward declare list
16// clang-format off
18class StringHash;
20namespace Json { class Value; }
21// clang-format on
22
24public:
25 // ChatScreenController inner types define
26 enum class SelectionDirection : int {};
27
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 32, ::std::string> mCurrentMessage;
32 ::ll::TypedStorage<8, 32, ::std::string> mCurrentHistoryPrefix;
33 ::ll::TypedStorage<1, 1, bool> mRefreshChatMessages;
34 ::ll::TypedStorage<8, 8, uint64> mCurrentSentMessageIndex;
35 ::ll::TypedStorage<1, 1, bool> mNeedsLayoutUpdate;
36 ::ll::TypedStorage<1, 1, bool> mLastKeyboardActive;
37 ::ll::TypedStorage<1, 1, bool> mUpdateCoordinateUI;
38 ::ll::TypedStorage<1, 1, bool> mIsDevConsole;
39 ::ll::TypedStorage<1, 1, bool> mSendMessage;
40 ::ll::TypedStorage<1, 1, bool> mUpdateIntellisense;
41 ::ll::TypedStorage<8, 104, ::IntellisenseHandler> mIntellisense;
42 ::ll::TypedStorage<4, 4, ::HostOptionStates> mCurrentHostOption;
43 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mHostCommands;
44 ::ll::TypedStorage<4, 4, uint> mExpectedCommandDepth;
45 ::ll::TypedStorage<8, 32, ::std::string> mTeleportWhoName;
46 ::ll::TypedStorage<8, 32, ::std::string> mTeleportWhereName;
47 ::ll::TypedStorage<8, 32, ::std::string> mDeferedCollectionFocusName;
48 ::ll::TypedStorage<4, 4, int> mDeferedCollectionFocusIndex;
49 ::ll::TypedStorage<1, 1, bool> mWaitOneTick;
50 ::ll::TypedStorage<1, 1, bool> mChatTextBoxNeedsUpdate;
51 ::ll::TypedStorage<4, 12, ::Vec3> mPositionCoordinates;
52 ::ll::TypedStorage<4, 16, ::std::optional<::BlockPos>> mFacingCoordinates;
53 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::HostOptionStates, ::std::string>>> mMainHostButtons;
54 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mProfanityToggleSubscription;
55 ::ll::TypedStorage<1, 1, bool> mShouldUseFilteredMessage;
56 // NOLINTEND
57
58public:
59 // prevent constructor by default
60 ChatScreenController();
61
62public:
63 // virtual functions
64 // NOLINTBEGIN
65 virtual ~ChatScreenController() /*override*/;
66
67 virtual void onInit() /*override*/;
68
69 virtual void onOpen() /*override*/;
70
71 virtual void onEntered() /*override*/;
72
73 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
74
75 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) /*override*/;
76
77 virtual ::ui::DirtyFlag tick() /*override*/;
78 // NOLINTEND
79
80public:
81 // member functions
82 // NOLINTBEGIN
83 MCAPI
84 ChatScreenController(::std::shared_ptr<::ClientInstanceScreenModel> model, bool openWithCommand, bool isDevConsole);
85
86 MCAPI void _beginNewCommand();
87
88 MCAPI void _buildHostButtons();
89
90 MCAPI void _getBottomButtonFocusOverrideDown(::std::string& focusOverride);
91
92 MCAPI void _getBottomButtonFocusOverrideUp(::std::string& focusOverride, uint64 lastIndex);
93
94 MCAPI ::std::string _getExitMessage() const;
95
96 MCAPI ::std::optional<uint64> _getNextMessageIndex(
97 ::ChatScreenController::SelectionDirection direction,
98 ::std::deque<::std::string> const& sentMessages
99 ) const;
100
101 MCAPI ::std::string _getSendMessage() const;
102
103 MCAPI void _handleChatMessage(::std::string const& message, ::std::string const& ttsMessage);
104
105 MCAPI void _handleMenuCancel();
106
107 MCAPI void _handleSelectSentMessage(::ChatScreenController::SelectionDirection direction);
108
109 MCAPI void _initScreenControllerProxy();
110
111 MCAPI void _pasteClipboardInChat();
112
113 MCAPI void _refreshChatMessages();
114
115 MCAPI void _refreshDevConsoleScreenMessages();
116
117 MCAPI void _registerBindings();
118
119 MCAPI void _registerBindingsHostOptions();
120
121 MCAPI void _registerBindingsSubCommand(
122 ::std::vector<::HostOptionSubCommand>& subCommandButtons,
123 ::StringHash const& gridName,
124 ::StringHash const& collectionName
125 );
126
127 MCAPI void _registerEventHandlers();
128
129 MCAPI void _registerEventHandlersHostOptions();
130
131 MCAPI void _registerSubControllers();
132
133 MCAPI void _sendChatMessage();
134
135 MCAPI void _teleportWhereHelper();
136
137 MCAPI void _teleportWhoHelper();
138 // NOLINTEND
139
140public:
141 // static variables
142 // NOLINTBEGIN
143 MCAPI static char const* const& DEV_CONSOLE_SCREEN_NAME();
144 // NOLINTEND
145
146public:
147 // constructor thunks
148 // NOLINTBEGIN
149 MCAPI void* $ctor(::std::shared_ptr<::ClientInstanceScreenModel> model, bool openWithCommand, bool isDevConsole);
150 // NOLINTEND
151
152public:
153 // destructor thunk
154 // NOLINTBEGIN
155 MCAPI void $dtor();
156 // NOLINTEND
157
158public:
159 // virtual function thunks
160 // NOLINTBEGIN
161 MCAPI void $onInit();
162
163 MCAPI void $onOpen();
164
165 MCAPI void $onEntered();
166
167 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
168
169 MCAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
170
171 MCAPI ::ui::DirtyFlag $tick();
172 // NOLINTEND
173
174public:
175 // vftables
176 // NOLINTBEGIN
178
179 MCNAPI static void** $vftableForScreenController();
180 // NOLINTEND
181};
Definition ChatScreenController.h:5
static MCAPI void ** $vftableForScreenController()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
Definition ClientInstanceScreenController.h:5
Definition ClientInstanceScreenModel.h:5
Definition Value.h:16
Definition StringHash.h:5
Definition HostOptionSubCommand.h:5