Skip to content
LeviMC
English
AutoLightDark
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 AppExtensions { class IDevConsoleScreenExtension; }
21namespace Json { class Value; }
22// clang-format on
23
25public:
26 // ChatScreenController inner types define
27 enum class SelectionDirection : int {
28 Next = 0,
29 Previous = 1,
30 };
31
32public:
33 // member variables
34 // NOLINTBEGIN
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;
64 // NOLINTEND
65
66public:
67 // prevent constructor by default
68 ChatScreenController();
69
70public:
71 // virtual functions
72 // NOLINTBEGIN
73 virtual ~ChatScreenController() /*override*/ = default;
74
75 virtual void onInit() /*override*/;
76
77 virtual void onOpen() /*override*/;
78
79 virtual void onEntered() /*override*/;
80
81 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
82
83 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) /*override*/;
84
85 virtual ::ui::DirtyFlag tick() /*override*/;
86 // NOLINTEND
87
88public:
89 // member functions
90 // NOLINTBEGIN
92 ::std::shared_ptr<::ClientInstanceScreenModel> model,
93 bool openWithCommand,
94 bool isDevConsole,
95 ::std::unique_ptr<::AppExtensions::IDevConsoleScreenExtension> devConsoleScreenExtension
96 );
97
98 MCNAPI void _getBottomButtonFocusOverrideDown(::std::string& focusOverride);
99
100 MCNAPI void _getBottomButtonFocusOverrideUp(::std::string& focusOverride, uint64 lastIndex);
101
102 MCNAPI ::std::string _getExitMessage() const;
103
104 MCNAPI ::std::string _getSendMessage() const;
105
106 MCNAPI void _handleChatMessage(::std::string const& message, ::std::string const& ttsMessage);
107
108 MCNAPI void _handleSelectSentMessage(::ChatScreenController::SelectionDirection direction);
109
110 MCNAPI void _registerBindings();
111
113 ::std::vector<::HostOptionSubCommand>& subCommandButtons,
114 ::StringHash const& gridName,
115 ::StringHash const& collectionName
116 );
117
119
120 MCNAPI void _sendChatMessage();
121
122 MCNAPI void _teleportWhereHelper();
123
124 MCNAPI void _teleportWhoHelper();
125 // NOLINTEND
126
127public:
128 // constructor thunks
129 // NOLINTBEGIN
130 MCNAPI void* $ctor(
131 ::std::shared_ptr<::ClientInstanceScreenModel> model,
132 bool openWithCommand,
133 bool isDevConsole,
134 ::std::unique_ptr<::AppExtensions::IDevConsoleScreenExtension> devConsoleScreenExtension
135 );
136 // NOLINTEND
137
138public:
139 // virtual function thunks
140 // NOLINTBEGIN
141 MCNAPI void $onInit();
142
143 MCNAPI void $onOpen();
144
145 MCNAPI void $onEntered();
146
147 MCNAPI void $addStaticScreenVars(::Json::Value& globalVars);
148
149 MCNAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
150
151 MCNAPI ::ui::DirtyFlag $tick();
152 // NOLINTEND
153};
Definition IDevConsoleScreenExtension.h:7
Definition ChatScreenController.h:5
MCAPI::std::string _getExitMessage() const
MCAPI void _getBottomButtonFocusOverrideDown(::std::string &focusOverride)
MCAPI void _registerBindingsSubCommand(::std::vector<::HostOptionSubCommand > &subCommandButtons, ::StringHash const &gridName, ::StringHash const &collectionName)
MCAPI void _handleChatMessage(::std::string const &message, ::std::string const &ttsMessage)
MCAPI void * $ctor(::std::shared_ptr<::ClientInstanceScreenModel > model, bool openWithCommand, bool isDevConsole, ::std::unique_ptr<::AppExtensions::IDevConsoleScreenExtension > devConsoleScreenExtension)
MCAPI void _teleportWhereHelper()
MCAPI void _teleportWhoHelper()
MCAPI void $onEntered()
MCAPI::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification)
MCAPI void _registerSubControllers()
MCAPI void _registerBindings()
MCAPI::ui::DirtyFlag $tick()
MCAPI::std::string _getSendMessage() const
MCAPI void _getBottomButtonFocusOverrideUp(::std::string &focusOverride, uint64 lastIndex)
MCAPI void $addStaticScreenVars(::Json::Value &globalVars)
MCAPI void $onInit()
MCAPI void _sendChatMessage()
MCAPI void $onOpen()
MCAPI void _handleSelectSentMessage(::ChatScreenController::SelectionDirection direction)
MCAPI ChatScreenController(::std::shared_ptr<::ClientInstanceScreenModel > model, bool openWithCommand, bool isDevConsole, ::std::unique_ptr<::AppExtensions::IDevConsoleScreenExtension > devConsoleScreenExtension)
Definition ClientInstanceScreenController.h:5
Definition ClientInstanceScreenModel.h:5
Definition Value.h:16
Definition StringHash.h:5
Definition HostOptionSubCommand.h:5