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 // virtual functions
41 // NOLINTBEGIN
42 virtual ~RemappingLayout();
43
44 virtual void setMappingWithRawInput(::std::string const& action, int key, ::RawInputType type);
45
46 virtual int getAdjustedKey(int key) const;
47
48 virtual ::std::string getSaveString(::std::string const& action) const;
49
50 virtual ::std::string getMappedKeyName(int key) const;
51
52 virtual ::std::string getMappedKeyName(int key, bool checkUserConfiguredSwap) const;
53
54 virtual ::std::string getMappedKeyName(::Keymapping const& keyMapping) const;
55
56 virtual ::std::string getKeySpriteLocation(int key, ::IconSize iconSize) const;
57
58 virtual ::std::string getKeySpriteLocation(::Keymapping const& keyMapping) const;
59
60 virtual int _rawKeyToKey(int rawInputKey, ::RawInputType rawInputType) const = 0;
61 // NOLINTEND
62
63public:
64 // member functions
65 // NOLINTBEGIN
66 MCAPI RemappingLayout();
67
68 MCAPI void assignDefaultMapping(::std::vector<::Keymapping>&& newDefaultMapping);
69
70 MCAPI void defaultKeyAtIndex(uint64 index);
71
72 MCAPI ::std::vector<::DuplicateKey> generateIndicesOfDuplicates() const;
73
74 MCAPI ::Keymapping const& getKeymappingByAction(::std::string const& action) const;
75
76 MCAPI void setMapping(::std::string const& action, ::std::vector<int> const& keys);
77
78 MCAPI void unassignDuplicateKeys(uint64 index);
79
80 MCAPI void unassignKey(::DuplicateKey duplicateKey);
81
82 MCAPI void unassignKeyAtIndex(uint64 index);
83 // NOLINTEND
84
85public:
86 // constructor thunks
87 // NOLINTBEGIN
88 MCAPI void* $ctor();
89 // NOLINTEND
90
91public:
92 // destructor thunk
93 // NOLINTBEGIN
94 MCAPI void $dtor();
95 // NOLINTEND
96
97public:
98 // virtual function thunks
99 // NOLINTBEGIN
100 MCAPI void $setMappingWithRawInput(::std::string const& action, int key, ::RawInputType type);
101
102 MCFOLD int $getAdjustedKey(int key) const;
103
104 MCFOLD ::std::string $getSaveString(::std::string const& action) const;
105
106 MCFOLD ::std::string $getMappedKeyName(int key) const;
107
108 MCFOLD ::std::string $getMappedKeyName(int key, bool checkUserConfiguredSwap) const;
109
110 MCAPI ::std::string $getMappedKeyName(::Keymapping const& keyMapping) const;
111
112 MCFOLD ::std::string $getKeySpriteLocation(int key, ::IconSize iconSize) const;
113
114 MCAPI ::std::string $getKeySpriteLocation(::Keymapping const& keyMapping) const;
115 // NOLINTEND
116
117public:
118 // vftables
119 // NOLINTBEGIN
120 MCNAPI static void** $vftable();
121 // NOLINTEND
122};
Definition Keymapping.h:5
Definition RemappingLayout.h:5
static MCAPI void ** $vftable()
Definition DuplicateKey.h:5