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