LeviLamina
Loading...
Searching...
No Matches
ClientInputHandler.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/deps/input/InputBindingMode.h"
8#include "mc/deps/input/InputMode.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
13class BindingFactory;
17class Config;
18class IClientInstance;
19class IGameModuleApp;
20class InputHandler;
21class ItemStack;
23class ScreenContext;
28// clang-format on
29
31public:
32 // member variables
33 // NOLINTBEGIN
34 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mClient;
35 ::ll::TypedStorage<8, 8, ::InputHandler&> mInputHandler;
36 ::ll::TypedStorage<4, 4, ::InputBindingMode> mInputBindingMode;
37 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClientBindingFactory>> mBindingFactory;
38 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClientInputMappingFactory>> mMappingFactory;
39 ::ll::TypedStorage<8, 32, ::std::string> mExpectedInGameInputMode;
40 ::ll::TypedStorage<1, 1, bool> mIsFlying;
41 ::ll::TypedStorage<1, 1, bool> mIsSneaking;
42 ::ll::TypedStorage<1, 1, bool> mIsSprinting;
43 ::ll::TypedStorage<1, 1, bool> mIsSwimming;
44 ::ll::TypedStorage<1, 1, bool> mIsInWater;
45 ::ll::TypedStorage<1, 1, bool> mIsExpediateEmoteActive;
46 ::ll::TypedStorage<1, 1, bool> mIsInAscendableBlock;
47 ::ll::TypedStorage<1, 1, bool> mIsOnDescendableBlock;
48 ::ll::TypedStorage<1, 1, bool> mIsCreativeMode;
49 ::ll::TypedStorage<1, 1, bool> mIsSpectatorMode;
50 ::ll::TypedStorage<1, 1, bool> mInteractActive;
51 ::ll::TypedStorage<1, 1, bool> mHasMobEffects;
52 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClientInputHandlerProxy>> mProxy;
53 // NOLINTEND
54
55public:
56 // prevent constructor by default
57 ClientInputHandler& operator=(ClientInputHandler const&);
58 ClientInputHandler(ClientInputHandler const&);
59 ClientInputHandler();
60
61public:
62 // member functions
63 // NOLINTBEGIN
64 MCAPI ClientInputHandler(
65 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& client,
66 ::InputHandler& inputHandler,
67 ::IGameModuleApp& gameModuleApp
68 );
69
70 MCAPI ::Actor* _interactWithEntity() const;
71
72 MCAPI ::std::string _interactWithImmersiveReader() const;
73
74 MCAPI ::ItemStack const& _interactWithItem() const;
75
76 MCAPI bool _shouldUseGameInputMapping() const;
77
78 MCFOLD bool allowInteract() const;
79
80 MCAPI bool allowPicking() const;
81
82 MCAPI bool canInteract() const;
83
84 MCAPI bool canPaddle() const;
85
86 MCAPI void clearInputDeviceQueues();
87
88 MCAPI void clearInvalidDownKeys();
89
90 MCFOLD ::BindingFactory& getBindingFactory();
91
92 MCAPI ::std::string getBoatExitText() const;
93
94 MCAPI ::InputMode getCurrentInputMode() const;
95
96 MCAPI void getCursorPos(float& xCursor, float& yCursor) const;
97
98 MCFOLD ::std::string const& getExpectedInGameInputMode() const;
99
100 MCFOLD ::InputBindingMode getInputBindingMode();
101
102 MCAPI bool getInteractActive() const;
103
104 MCAPI ::std::string getInteractText() const;
105
106 MCAPI bool getSplitscreenJoinPromptVisible() const;
107
108 MCAPI bool hasInteractText() const;
109
110 MCAPI bool isBlockSelectToggled() const;
111
112 MCFOLD bool isCreativeMode() const;
113
114 MCAPI bool isTouchGameplayAllowed() const;
115
116 MCAPI void onConfigChanged(::Config const& c);
117
118 MCAPI void onMobEffectsChanged(::MobEffectsLayout const& layout);
119
120 MCAPI void popInputMapping(bool inGame);
121
122 MCAPI void pushInputMapping(bool inGame);
123
124 MCAPI void releaseButtonsAndSticks();
125
126 MCAPI void render(::ScreenContext& screenContext);
127
128 MCAPI void resetPlayerState();
129
130 MCAPI void setBlockSelectToggle(bool value);
131
132 MCAPI void setDisableInput(bool disable);
133
134 MCAPI void setInputBindingMode(::InputBindingMode mode);
135
136 MCAPI void setSuspendDirectionalInput(bool suspendDirectionalInput);
137
138 MCAPI void setSuspendInput(bool suspendInput);
139
140 MCAPI bool showBoatExit() const;
141
142 MCAPI bool showCodeBuilder() const;
143
144 MCAPI bool showImmersiveReader() const;
145
146 MCAPI void updateInputMapping();
147
148 MCAPI bool updateInputMode(::std::string const& mode);
149
150 MCAPI void updateInteractActiveState(bool value);
151
152 MCAPI void updatePlayerState(
153 ::gsl::not_null<::IClientInstance const*> client,
154 ::MovementAbilitiesComponent const& abilities,
155 ::MobEffectsComponent const& mobEffects,
156 ::ActorDataFlagComponent const& synchedActorData,
157 ::MoveInputComponent& moveInput,
158 bool isRiding,
159 bool isInWater
160 );
161
162 MCAPI bool useFreeformPickDirection() const;
163
164 MCAPI ~ClientInputHandler();
165 // NOLINTEND
166
167public:
168 // constructor thunks
169 // NOLINTBEGIN
170 MCAPI void* $ctor(
171 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& client,
172 ::InputHandler& inputHandler,
173 ::IGameModuleApp& gameModuleApp
174 );
175 // NOLINTEND
176
177public:
178 // destructor thunk
179 // NOLINTBEGIN
180 MCAPI void $dtor();
181 // NOLINTEND
182};
Definition Actor.h:123
Definition BindingFactory.h:5
Definition ClientBindingFactory.h:5
Definition ClientInputHandlerProxy.h:5
Definition ClientInputHandler.h:5
Definition ClientInputMappingFactory.h:5
Definition Config.h:5
Definition IClientInstance.h:5
Definition IGameModuleApp.h:5
Definition InputHandler.h:5
Definition ItemStack.h:35
Definition MobEffectsLayout.h:5
Definition ScreenContext.h:5
Definition ActorDataFlagComponent.h:10
Definition MobEffectsComponent.h:10
Definition MoveInputComponent.h:11
Definition MovementAbilitiesComponent.h:8