LeviLamina
Loading...
Searching...
No Matches
MinecraftInputHandler.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/game/IConfigListener.h"
7#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/deps/core/utility/pub_sub/Publisher.h"
10#include "mc/deps/input/InputMode.h"
11#include "mc/deps/input/enums/ButtonState.h"
12#include "mc/deps/input/enums/RawInputType.h"
13
14// auto generated forward declare list
15// clang-format off
17class Config;
19class IClientInstance;
20class IGameModuleApp;
21class IMinecraftGame;
22class InputHandler;
27class MouseMapper;
30namespace Bedrock::PubSub::ThreadModel { struct MultiThreaded; }
31namespace Input::Debug { class ISplitscreenRedirect; }
32// clang-format on
33
35public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::InputHandler>> mInputHandler;
39 ::ll::TypedStorage<4, 4, int> mControllerId;
40 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mClient;
41 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IAdvancedGraphicsOptions>> mAdvancedGraphicsOptions;
42 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::Input::Debug::ISplitscreenRedirect>>
43 mDebugSplitscreenInputRedirect;
44 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::MinecraftBindingFactoryMap>> mBindingFactoryMap;
45 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::MinecraftInputMappingFactoryMap>> mMappingFactoryMap;
46 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SplitscreenJoinListener>> mSplitscreenJoinListener;
47 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::InputSettingsHandler>> mInputSettingsHandler;
48 ::ll::TypedStorage<
49 8,
50 128,
51 ::Bedrock::PubSub::Publisher<void(::IClientInstance&), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
52 mAnyInputSubscription;
53 ::ll::TypedStorage<
54 8,
55 128,
56 ::Bedrock::PubSub::
57 Publisher<void(int, ::RawInputType, ::ButtonState, bool), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
58 mRawInputEventPublisher;
59 ::ll::TypedStorage<
60 8,
61 128,
62 ::Bedrock::PubSub::
63 Publisher<void(::IClientInstance&, ::InputMode), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
64 mInputModePublisher;
65 ::ll::TypedStorage<8, 8, ::MouseMapper*> mMouseMapper;
66 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::MinecraftInputHandlerProxy>> mProxy;
67 // NOLINTEND
68
69public:
70 // prevent constructor by default
71 MinecraftInputHandler();
72
73public:
74 // virtual functions
75 // NOLINTBEGIN
76 virtual ~MinecraftInputHandler() /*override*/;
77
78 virtual void onConfigChanged(::Config const& c) /*override*/;
79
80 virtual void _registerInputHandlers();
81
82 virtual void _registerDebugInputHandlers();
83
84 virtual ::std::unique_ptr<::ClientMoveInputHandler> _createClientMoveInputHandler() = 0;
85 // NOLINTEND
86
87public:
88 // member functions
89 // NOLINTBEGIN
90 MCAPI MinecraftInputHandler(
91 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& client,
92 ::Bedrock::NotNullNonOwnerPtr<::IAdvancedGraphicsOptions> const& advancedGraphicsOptions,
93 ::Bedrock::NotNullNonOwnerPtr<::Input::Debug::ISplitscreenRedirect> const& debugSplitscreenInputRedirect
94 );
95
96 MCAPI void _registerMenuButton(::std::string const& buttonName, bool suspendable);
97
98 MCAPI void
99 getCursorPos(float& xCursor, float& yCursor, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& client) const;
100
101 MCAPI void init(::IGameModuleApp& gameModuleApp);
102
103 MCAPI ::ClientMoveInputHandler*
104 initClientInput(::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& client, ::IGameModuleApp& gameModuleApp);
105
106 MCAPI void tick(
107 ::IMinecraftGame& mcGame,
108 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& primaryClient,
109 ::Bedrock::NotNullNonOwnerPtr<::ControllerIDtoClientMap> const& map,
110 bool allowMultipleClients
111 );
112 // NOLINTEND
113
114public:
115 // constructor thunks
116 // NOLINTBEGIN
117 MCAPI void* $ctor(
118 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& client,
119 ::Bedrock::NotNullNonOwnerPtr<::IAdvancedGraphicsOptions> const& advancedGraphicsOptions,
120 ::Bedrock::NotNullNonOwnerPtr<::Input::Debug::ISplitscreenRedirect> const& debugSplitscreenInputRedirect
121 );
122 // NOLINTEND
123
124public:
125 // destructor thunk
126 // NOLINTBEGIN
127 MCAPI void $dtor();
128 // NOLINTEND
129
130public:
131 // virtual function thunks
132 // NOLINTBEGIN
133 MCAPI void $onConfigChanged(::Config const& c);
134
135 MCAPI void $_registerInputHandlers();
136
137 MCAPI void $_registerDebugInputHandlers();
138 // NOLINTEND
139};
Definition EnableNonOwnerReferences.h:7
Definition ClientMoveInputHandler.h:5
Definition Config.h:5
Definition IAdvancedGraphicsOptions.h:10
Definition IClientInstance.h:5
Definition IConfigListener.h:5
Definition IGameModuleApp.h:5
Definition IMinecraftGame.h:5
Definition InputHandler.h:5
Definition InputSettingsHandler.h:5
Definition ISplitscreenRedirect.h:7
Definition MinecraftBindingFactoryMap.h:5
Definition MinecraftInputHandlerProxy.h:5
Definition MinecraftInputHandler.h:5
Definition MinecraftInputMappingFactoryMap.h:5
Definition MouseMapper.h:5
Definition SplitscreenJoinListener.h:5
Definition ControllerIDtoClientMap.h:5