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