3#include "mc/_HeaderOutputPredefine.h"
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"
21namespace Json {
class Value; }
27 enum class SelectionDirection :
int {
35 ::ll::TypedStorage<8, 32, ::std::string> mCurrentMessage;
36 ::ll::TypedStorage<8, 32, ::std::string> mCurrentHistoryPrefix;
37 ::ll::TypedStorage<1, 1, bool> mRefreshChatMessages;
38 ::ll::TypedStorage<1, 1, bool> mLockMessagesUpdates;
39 ::ll::TypedStorage<1, 1, bool> mScrollChatToBottom;
40 ::ll::TypedStorage<1, 1, bool> mHasUnreadMessages;
41 ::ll::TypedStorage<8, 8, uint64> mCurrentSentMessageIndex;
42 ::ll::TypedStorage<1, 1, bool> mNeedsLayoutUpdate;
43 ::ll::TypedStorage<1, 1, bool> mLastKeyboardActive;
44 ::ll::TypedStorage<1, 1, bool> mUpdateCoordinateUI;
45 ::ll::TypedStorage<1, 1, bool> mIsDevConsole;
46 ::ll::TypedStorage<1, 1, bool> mSendMessage;
47 ::ll::TypedStorage<1, 1, bool> mUpdateIntellisense;
48 ::ll::TypedStorage<8, 104, ::IntellisenseHandler> mIntellisense;
49 ::ll::TypedStorage<4, 4, ::HostOptionStates> mCurrentHostOption;
50 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mHostCommands;
51 ::ll::TypedStorage<4, 4, uint> mExpectedCommandDepth;
52 ::ll::TypedStorage<8, 32, ::std::string> mTeleportWhoName;
53 ::ll::TypedStorage<8, 32, ::std::string> mTeleportWhereName;
54 ::ll::TypedStorage<8, 32, ::std::string> mDeferedCollectionFocusName;
55 ::ll::TypedStorage<4, 4, int> mDeferedCollectionFocusIndex;
56 ::ll::TypedStorage<1, 1, bool> mWaitOneTick;
57 ::ll::TypedStorage<1, 1, bool> mChatTextBoxNeedsUpdate;
58 ::ll::TypedStorage<4, 12, ::Vec3> mPositionCoordinates;
59 ::ll::TypedStorage<4, 16, ::std::optional<::BlockPos>> mFacingCoordinates;
60 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::HostOptionStates, ::std::string>>> mMainHostButtons;
61 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mProfanityToggleSubscription;
62 ::ll::TypedStorage<1, 1, bool> mShouldUseFilteredMessage;
63 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::AppExtensions::IDevConsoleScreenExtension>> mDevConsoleScreenExtension;
68 ChatScreenController();
73 virtual ~ChatScreenController() =
default;
75 virtual void onInit() ;
77 virtual void onOpen() ;
79 virtual void onEntered() ;
81 virtual void addStaticScreenVars(::Json::Value& globalVars) ;
83 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) ;
85 virtual ::ui::DirtyFlag tick() ;
91 MCAPI ChatScreenController(
92 ::std::shared_ptr<::ClientInstanceScreenModel> model,
95 ::std::unique_ptr<::AppExtensions::IDevConsoleScreenExtension> devConsoleScreenExtension
98 MCAPI
void _getBottomButtonFocusOverrideDown(::std::string& focusOverride);
100 MCAPI
void _getBottomButtonFocusOverrideUp(::std::string& focusOverride, uint64 lastIndex);
102 MCAPI ::std::string _getExitMessage()
const;
104 MCAPI ::std::string _getSendMessage()
const;
106 MCAPI
void _handleChatMessage(::std::string
const& message, ::std::string
const& ttsMessage);
108 MCAPI
void _handleSelectSentMessage(::ChatScreenController::SelectionDirection direction);
110 MCAPI
void _registerBindings();
112 MCAPI
void _registerBindingsSubCommand(
113 ::std::vector<::HostOptionSubCommand>& subCommandButtons,
114 ::StringHash
const& gridName,
115 ::StringHash
const& collectionName
118 MCAPI
void _sendChatMessage();
120 MCAPI
void _teleportWhereHelper();
122 MCAPI
void _teleportWhoHelper();
129 ::std::shared_ptr<::ClientInstanceScreenModel> model,
130 bool openWithCommand,
132 ::std::unique_ptr<::AppExtensions::IDevConsoleScreenExtension> devConsoleScreenExtension
139 MCAPI
void $onInit();
141 MCAPI
void $onOpen();
143 MCAPI
void $onEntered();
145 MCAPI
void $addStaticScreenVars(::Json::Value& globalVars);
147 MCAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
149 MCAPI ::ui::DirtyFlag $tick();
Definition IDevConsoleScreenExtension.h:7
Definition ChatScreenController.h:5
Definition ClientInstanceScreenController.h:5
Definition ClientInstanceScreenModel.h:5
Definition StringHash.h:5
Definition HostOptionSubCommand.h:5