LeviLamina
Loading...
Searching...
No Matches
RemappingLayout.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/input/IconSize.h"
7#include "mc/client/input/RemappingLayoutRawIndex.h"
8#include "mc/deps/core/utility/pub_sub/Publisher.h"
9#include "mc/deps/input/enums/RawInputType.h"
10
11// auto generated forward declare list
12// clang-format off
13class Keymapping;
14struct DuplicateKey;
15namespace Bedrock::PubSub::ThreadModel { struct SingleThreaded; }
16// clang-format on
17
18class RemappingLayout {
19public:
20 // RemappingLayout inner types define
21 using RefreshKeymappingPublisher =
22 ::Bedrock::PubSub::Publisher<void(::std::optional<uint64>), ::Bedrock::PubSub::ThreadModel::SingleThreaded, 0>;
23
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 24, ::std::vector<::Keymapping>> mKeymappings;
28 ::ll::TypedStorage<8, 24, ::std::vector<::Keymapping>> mDefaultMappings;
29 ::ll::TypedStorage<
30 8,
31 16,
32 ::std::shared_ptr<
33 ::Bedrock::PubSub::
34 Publisher<void(::std::optional<uint64>), ::Bedrock::PubSub::ThreadModel::SingleThreaded, 0>>>
35 mRefreshKeymappingsPublisher;
36 ::ll::TypedStorage<8, 32, ::RemappingLayoutRawIndex> mLayoutRawIndex;
37 // NOLINTEND
38
39public:
40 // prevent constructor by default
41 RemappingLayout(RemappingLayout const&);
42
43public:
44 // virtual functions
45 // NOLINTBEGIN
46 virtual ~RemappingLayout();
47
48 virtual void setMappingWithRawInput(::std::string const& action, int key, ::RawInputType type);
49
50 virtual int getAdjustedKey(int key) const;
51
52 virtual ::std::string getSaveString(::std::string const& action) const;
53
54 virtual ::std::string getMappedKeyName(int key) const;
55
56 virtual ::std::string getMappedKeyName(int key, bool checkUserConfiguredSwap) const;
57
58 virtual ::std::string getMappedKeyName(::Keymapping const& keyMapping) const;
59
60 virtual ::std::string getKeySpriteLocation(
61 int key,
62 bool checkUserConfiguredSwap,
63 bool checkPlatformButtonSwapping,
64 ::IconSize iconSize
65 ) const;
66
67 virtual ::std::string getKeySpriteLocation(::Keymapping const& keyMapping) const;
68
69 virtual int _rawKeyToKey(int rawKeyIndex, ::RawInputType rawInputType) const = 0;
70 // NOLINTEND
71
72public:
73 // member functions
74 // NOLINTBEGIN
75 MCAPI RemappingLayout();
76
77 MCAPI void assignDefaultMapping(::std::vector<::Keymapping>&& newDefaultMapping);
78
79 MCAPI void defaultKeyAtIndex(uint64 index);
80
81 MCAPI ::std::vector<::DuplicateKey> generateIndicesOfDuplicates() const;
82
83 MCAPI ::Keymapping const& getKeymappingByAction(::std::string const& action) const;
84
85 MCAPI ::RemappingLayout& operator=(::RemappingLayout const& other);
86
87 MCAPI void setMapping(::std::string const& action, ::std::vector<int> const& keys);
88
89 MCAPI void unassignDuplicateKeys(uint64 index);
90
91 MCAPI void unassignKey(::DuplicateKey duplicateKey);
92
93 MCAPI void unassignKeyAtIndex(uint64 index);
94 // NOLINTEND
95
96public:
97 // constructor thunks
98 // NOLINTBEGIN
99 MCAPI void* $ctor();
100 // NOLINTEND
101
102public:
103 // destructor thunk
104 // NOLINTBEGIN
105 MCAPI void $dtor();
106 // NOLINTEND
107
108public:
109 // virtual function thunks
110 // NOLINTBEGIN
111 MCAPI void $setMappingWithRawInput(::std::string const& action, int key, ::RawInputType type);
112
113 MCFOLD int $getAdjustedKey(int key) const;
114
115 MCFOLD ::std::string $getSaveString(::std::string const& action) const;
116
117 MCFOLD ::std::string $getMappedKeyName(int key) const;
118
119 MCFOLD ::std::string $getMappedKeyName(int key, bool checkUserConfiguredSwap) const;
120
121 MCAPI ::std::string $getMappedKeyName(::Keymapping const& keyMapping) const;
122
123 MCFOLD ::std::string $getKeySpriteLocation(
124 int key,
125 bool checkUserConfiguredSwap,
126 bool checkPlatformButtonSwapping,
127 ::IconSize iconSize
128 ) const;
129
130 MCAPI ::std::string $getKeySpriteLocation(::Keymapping const& keyMapping) const;
131 // NOLINTEND
132
133public:
134 // vftables
135 // NOLINTBEGIN
136 MCNAPI static void** $vftable();
137 // NOLINTEND
138};
Definition Keymapping.h:5
Definition RemappingLayout.h:5
static MCAPI void ** $vftable()
Definition DuplicateKey.h:5