LeviLamina
Loading...
Searching...
No Matches
PersonaScreenModelCommon.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/screens/models/PreviewedItemEventInformation.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/world/actor/player/persona/ArmSize.h"
10#include "mc/world/actor/player/persona/BodySize.h"
11#include "mc/world/actor/player/persona/PersonaCharacterHandle.h"
12#include "mc/world/actor/player/persona/PersonaError.h"
13#include "mc/world/actor/player/persona/PieceSide.h"
14#include "mc/world/actor/player/persona/PieceType.h"
15#include "mc/world/actor/player/persona/ProfileType.h"
16
17// auto generated forward declare list
18// clang-format off
19class IClientInstance;
21class IMinecraftGame;
22class IStoreCatalogItem;
24class PersonaClient;
25class PersonaPiece;
26class SkinHandle;
27struct PersonaCharacter;
28namespace mce { class Color; }
29namespace mce { class UUID; }
30namespace persona { class PieceOfferWrapper; }
31namespace persona { struct FreeItemState; }
32namespace persona::color { class ColorInfo; }
33// clang-format on
34
36public:
37 // PersonaScreenModelCommon inner types define
38 using ColorInfo = ::persona::color::ColorInfo;
39
40public:
41 // member variables
42 // NOLINTBEGIN
43 ::ll::TypedStorage<8, 8, ::IMinecraftGame&> mMinecraft;
44 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mClient;
45 ::ll::TypedStorage<8, 8, ::PersonaClient&> mSkinRepoClientInterface;
46 ::ll::TypedStorage<8, 8, ::IMinecraftEventing&> mEventing;
47 ::ll::TypedStorage<8, 152, ::PreviewedItemEventInformation> mPreviewedItemInfo;
48 ::ll::TypedStorage<8, 8, int64> mNextPossibleEventTime;
49 ::ll::TypedStorage<1, 1, bool> mIsCurrentSkinPackOwned;
50 ::ll::TypedStorage<8, 16, ::std::shared_ptr<bool>> mExistanceTracker;
51 ::ll::TypedStorage<8, 40, ::persona::PersonaCharacterHandle> mActiveCharacterHandle;
52 ::ll::TypedStorage<1, 1, bool> mActiveCharacterInitialized;
53 ::ll::TypedStorage<1, 1, bool> mWaitingForNewPersona;
54 // NOLINTEND
55
56public:
57 // prevent constructor by default
58 PersonaScreenModelCommon& operator=(PersonaScreenModelCommon const&);
59 PersonaScreenModelCommon(PersonaScreenModelCommon const&);
60 PersonaScreenModelCommon();
61
62public:
63 // virtual functions
64 // NOLINTBEGIN
65 virtual ~PersonaScreenModelCommon();
66
67 virtual void update(::ui::DirtyFlag& dirtyFlags);
68
69 virtual void updateSkin(::persona::PersonaCharacterHandle const& characterHandle, ::SkinHandle handle);
70 // NOLINTEND
71
72public:
73 // member functions
74 // NOLINTBEGIN
75 MCAPI PersonaScreenModelCommon(
76 ::IMinecraftGame& minecraft,
77 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& client
78 );
79
80 MCAPI ::std::function<void(bool)> _getNormalPersonaChangedCallback(
81 ::persona::PersonaCharacterHandle const& handle,
82 ::std::function<void(bool)> finalCallback
83 );
84
85 MCAPI void attemptCopyValidActiveAppearanceToCurrentCharacter(::std::function<void(bool)> callback);
86
87 MCAPI void changePersonaArmSize(
88 ::persona::PersonaCharacterHandle const& handle,
89 ::persona::ArmSize::Type const& armSize,
90 ::std::function<void(bool)> callback
91 );
92
93 MCAPI void changePersonaEmote(
94 ::persona::PersonaCharacterHandle const& handle,
95 ::std::string const& pieceId,
96 ::persona::FreeItemState const& freeItemState,
97 int emoteWheelSlot,
98 ::std::function<void(bool)> callback
99 );
100
101 MCAPI void changePersonaHeight(
102 ::persona::PersonaCharacterHandle const& handle,
103 ::persona::BodySize::Type const& bodyType,
104 ::std::function<void(bool)> callback
105 );
106
107 MCAPI void changePersonaPiece(
108 ::persona::PersonaCharacterHandle const& handle,
109 ::persona::PieceType pieceType,
110 ::mce::UUID const& pieceId,
111 ::std::string const& productId,
112 ::persona::FreeItemState const& freeItemState,
113 ::std::function<void(bool)> callback,
114 ::persona::PieceSide side
115 );
116
117 MCAPI void changePersonaTintColor(
118 ::persona::PersonaCharacterHandle const& handle,
119 ::persona::PieceType pieceType,
120 ::mce::Color const& color,
121 ushort channel,
122 ::std::function<void(bool)> callback
123 );
124
125 MCAPI void changePersonaTintColors(
126 ::persona::PersonaCharacterHandle const& handle,
127 ::persona::PieceType pieceType,
128 ::std::vector<::persona::color::ColorInfo> const& tintColors,
129 ::std::function<void(bool)> callback
130 );
131
132 MCAPI bool createActivePersonaFromCurrentCharacter(::std::function<void(bool)> callback);
133
134 MCAPI void fireEventPersonaAvatarUpdated(::PersonaAppearance const& oldAppearance, bool isBeingDeleted);
135
136 MCAPI void fireEventPersonaGeneralError(::persona::PersonaError errorType) const;
137
138 MCFOLD ::PersonaCharacter const& getActiveCharacter() const;
139
140 MCFOLD ::PersonaCharacter& getActiveCharacter();
141
142 MCFOLD ::persona::PersonaCharacterHandle& getActiveCharacterHandle();
143
144 MCFOLD ::SkinHandle const& getActiveCharacterSkinHandle() const;
145
146 MCFOLD ::PersonaCharacter& getCurrentCharacter();
147
148 MCFOLD ::persona::PersonaCharacterHandle getCurrentCharacterHandle() const;
149
150 MCFOLD ::SkinHandle const& getCurrentCharacterSkinHandle() const;
151
152 MCAPI ::std::string
153 getEmoteFileSystemFromAppearance(::persona::PersonaCharacterHandle const& handle, int emoteIndex);
154
155 MCAPI ::persona::PieceOfferWrapper
156 getEmotePieceOfferFromAppearance(::persona::PersonaCharacterHandle const& handle, int emoteIndex);
157
158 MCAPI ::std::string
159 getEmoteThumbnailPathFromAppearance(::persona::PersonaCharacterHandle const& handle, int emoteIndex);
160
161 MCAPI ::std::string getEmoteTitleFromAppearance(::persona::PersonaCharacterHandle const& handle, int emoteIndex);
162
163 MCAPI ::PersonaCharacter& getPersonaCharacter(::persona::ProfileType profileType);
164
165 MCAPI ::SkinHandle getPersonaClassicSkinHandle(::persona::PersonaCharacterHandle const& handle);
166
167 MCAPI int getPersonaFilledSlotsCount() const;
168
169 MCAPI ::SkinHandle const& getPersonaHandleFromSlot(int slotIndex);
170
171 MCAPI ::PersonaPiece const& getPersonaPiece(::std::string const& pieceId) const;
172
173 MCAPI ::SkinHandle getPersonaSkinHandle(::persona::PersonaCharacterHandle const& handle);
174
175 MCAPI ::persona::ProfileType getPersonaType(::persona::PersonaCharacterHandle const& handle);
176
177 MCAPI ::persona::ProfileType getSelectedPersonaSkinSlot() const;
178
179 MCAPI ::PersonaCharacter& getSelectedSlotCharacter();
180
181 MCAPI ::mce::Color
182 getTintColor(::persona::PersonaCharacterHandle const& handle, ::persona::PieceType type, int channel);
183
184 MCAPI void invalidateActiveCharacter();
185
186 MCFOLD bool isActivePersonaInitialized() const;
187
188 MCAPI bool isBuiltInPackId(::mce::UUID const& id) const;
189
190 MCAPI bool isEmoteSlotSetOnCurrentAppearance(int emoteWheelSlot);
191
192 MCAPI bool isPieceOwned(::IStoreCatalogItem const& offer);
193
194 MCAPI bool isValidAndOwnedAppearance(::PersonaAppearance const& appearance) const;
195
196 MCAPI void removeAllPersonaEmotes(::persona::PersonaCharacterHandle const& handle);
197
198 MCAPI void removeCurrentPersonaSlot();
199
200 MCAPI void removePieceByType(
201 ::persona::PersonaCharacterHandle const& handle,
202 ::persona::PieceType const& pieceTypeToRemove,
203 ::std::function<void(bool)> callback,
204 ::persona::PieceSide side
205 );
206
207 MCAPI void
208 revertPersona(::persona::PersonaCharacterHandle const& characterHandle, ::std::function<void(bool)> callback);
209
210 MCAPI void
211 revertPersonaPiece(::persona::PersonaCharacterHandle const& handle, ::persona::PieceType const& typeToRevert);
212
213 MCAPI void saveCurrentCharacterPersona();
214
215 MCAPI void savePersona(::persona::PersonaCharacterHandle const& characterHandle);
216
217 MCAPI bool selectNextPersonaSkinSlot();
218
219 MCAPI bool selectPersonaSlot(int personaSlotToSelectOffset);
220
221 MCAPI bool selectPreviousPersonaSkinSlot();
222
223 MCAPI void updateClassicSkinCape(::persona::PersonaCharacterHandle const& handle);
224
225 MCAPI void updatePersonaWithNewAppearance(
226 ::PersonaAppearance const& newAppearance,
227 ::persona::PersonaCharacterHandle const& handle,
228 ::std::function<void(bool)> callback
229 ) const;
230
231 MCAPI void updatePreviewedItem(::PreviewedItemEventInformation previewedItemEventInfo);
232 // NOLINTEND
233
234public:
235 // static variables
236 // NOLINTBEGIN
237 MCAPI static ::std::vector<::mce::UUID> const& mBuiltInSkinPackIds();
238 // NOLINTEND
239
240public:
241 // constructor thunks
242 // NOLINTBEGIN
243 MCAPI void* $ctor(::IMinecraftGame& minecraft, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& client);
244 // NOLINTEND
245
246public:
247 // destructor thunk
248 // NOLINTBEGIN
249 MCAPI void $dtor();
250 // NOLINTEND
251
252public:
253 // virtual function thunks
254 // NOLINTBEGIN
255 MCAPI void $update(::ui::DirtyFlag& dirtyFlags);
256
257 MCAPI void $updateSkin(::persona::PersonaCharacterHandle const& characterHandle, ::SkinHandle handle);
258 // NOLINTEND
259
260public:
261 // vftables
262 // NOLINTBEGIN
263 MCNAPI static void** $vftable();
264 // NOLINTEND
265};
Definition IClientInstance.h:5
Definition IMinecraftEventing.h:138
Definition IMinecraftGame.h:5
Definition PersonaAppearance.h:5
Definition PersonaClient.h:5
Definition PersonaPiece.h:20
Definition PersonaScreenModelCommon.h:5
static MCAPI void ** $vftable()
Definition SkinHandle.h:5
Definition Color.h:13
Definition UUID.h:7
Definition PieceOfferWrapper.h:7
Definition ColorInfo.h:12
Definition PersonaCharacter.h:5
Definition FreeItemState.h:7