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/deps/shared_types/persona/ArmSizeType.h"
10#include "mc/deps/shared_types/persona/BodySizeType.h"
11#include "mc/deps/shared_types/persona/PieceSide.h"
12#include "mc/deps/shared_types/persona/PieceType.h"
13#include "mc/world/actor/player/persona/PersonaCharacterHandle.h"
14
15// auto generated forward declare list
16// clang-format off
17class IClientInstance;
19class IMinecraftGame;
21class PersonaClient;
22class SkinHandle;
23namespace mce { class Color; }
24namespace mce { class UUID; }
25namespace persona { class PieceOfferWrapper; }
26namespace persona { struct FreeItemState; }
27namespace persona::color { class ColorInfo; }
28// clang-format on
29
31public:
32 // PersonaScreenModelCommon inner types define
33 using ColorInfo = ::persona::color::ColorInfo;
34
35public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 8, ::IMinecraftGame&> mMinecraft;
39 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mClient;
40 ::ll::TypedStorage<8, 8, ::PersonaClient&> mSkinRepoClientInterface;
41 ::ll::TypedStorage<8, 8, ::IMinecraftEventing&> mEventing;
42 ::ll::TypedStorage<8, 152, ::PreviewedItemEventInformation> mPreviewedItemInfo;
43 ::ll::TypedStorage<8, 8, int64> mNextPossibleEventTime;
44 ::ll::TypedStorage<1, 1, bool> mIsCurrentSkinPackOwned;
45 ::ll::TypedStorage<8, 16, ::std::shared_ptr<bool>> mExistanceTracker;
46 ::ll::TypedStorage<8, 40, ::persona::PersonaCharacterHandle> mActiveCharacterHandle;
47 ::ll::TypedStorage<1, 1, bool> mActiveCharacterInitialized;
48 ::ll::TypedStorage<1, 1, bool> mWaitingForNewPersona;
49 // NOLINTEND
50
51public:
52 // prevent constructor by default
53 PersonaScreenModelCommon& operator=(PersonaScreenModelCommon const&);
54 PersonaScreenModelCommon(PersonaScreenModelCommon const&);
55 PersonaScreenModelCommon();
56
57public:
58 // virtual functions
59 // NOLINTBEGIN
60 virtual ~PersonaScreenModelCommon() = default;
61
62 virtual void update(::ui::DirtyFlag& dirtyFlags);
63
64 virtual void updateSkin(::persona::PersonaCharacterHandle const& characterHandle, ::SkinHandle handle);
65 // NOLINTEND
66
67public:
68 // member functions
69 // NOLINTBEGIN
70 MCAPI PersonaScreenModelCommon(
71 ::IMinecraftGame& minecraft,
72 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& client
73 );
74
75 MCAPI ::std::function<void(bool)> _getNormalPersonaChangedCallback(
76 ::persona::PersonaCharacterHandle const& handle,
77 ::std::function<void(bool)> finalCallback
78 );
79
80 MCAPI void attemptCopyValidActiveAppearanceToCurrentCharacter(::std::function<void(bool)> callback);
81
82 MCAPI void changePersonaArmSize(
83 ::persona::PersonaCharacterHandle const& handle,
84 ::SharedTypes::persona::ArmSizeType const& armSize,
85 ::std::function<void(bool)> callback
86 );
87
88 MCAPI void changePersonaEmote(
89 ::persona::PersonaCharacterHandle const& handle,
90 ::std::string const& pieceId,
91 ::persona::FreeItemState const& freeItemState,
92 int emoteWheelSlot,
93 ::std::function<void(bool)> callback
94 );
95
96 MCAPI void changePersonaHeight(
97 ::persona::PersonaCharacterHandle const& handle,
98 ::SharedTypes::persona::BodySizeType const& bodyType,
99 ::std::function<void(bool)> callback
100 );
101
102 MCAPI void changePersonaPiece(
103 ::persona::PersonaCharacterHandle const& handle,
104 ::SharedTypes::persona::PieceType pieceType,
105 ::mce::UUID const& pieceId,
106 ::std::string const& productId,
107 ::persona::FreeItemState const& freeItemState,
108 ::std::function<void(bool)> callback,
109 ::SharedTypes::persona::PieceSide side
110 );
111
112 MCAPI void changePersonaTintColor(
113 ::persona::PersonaCharacterHandle const& handle,
114 ::SharedTypes::persona::PieceType pieceType,
115 ::mce::Color const& color,
116 ushort channel,
117 ::std::function<void(bool)> callback
118 );
119
120 MCAPI void changePersonaTintColors(
121 ::persona::PersonaCharacterHandle const& handle,
122 ::SharedTypes::persona::PieceType pieceType,
123 ::std::vector<::persona::color::ColorInfo> const& tintColors,
124 ::std::function<void(bool)> callback
125 );
126
127 MCAPI bool createActivePersonaFromCurrentCharacter(::std::function<void(bool)> callback);
128
129 MCAPI void fireEventPersonaAvatarUpdated(::PersonaAppearance const& oldAppearance, bool isBeingDeleted);
130
131 MCAPI ::persona::PieceOfferWrapper
132 getEmotePieceOfferFromAppearance(::persona::PersonaCharacterHandle const& handle, int emoteIndex);
133
134 MCAPI ::SkinHandle getPersonaClassicSkinHandle(::persona::PersonaCharacterHandle const& handle);
135
136 MCAPI ::SkinHandle getPersonaSkinHandle(::persona::PersonaCharacterHandle const& handle);
137
138 MCAPI ::mce::Color
139 getTintColor(::persona::PersonaCharacterHandle const& handle, ::SharedTypes::persona::PieceType type, int channel);
140
141 MCAPI void removePieceByType(
142 ::persona::PersonaCharacterHandle const& handle,
143 ::SharedTypes::persona::PieceType const& pieceTypeToRemove,
144 ::std::function<void(bool)> callback,
145 ::SharedTypes::persona::PieceSide side
146 );
147
148 MCAPI void
149 revertPersona(::persona::PersonaCharacterHandle const& characterHandle, ::std::function<void(bool)> callback);
150
151 MCAPI void saveCurrentCharacterPersona();
152
153 MCAPI void savePersona(::persona::PersonaCharacterHandle const& characterHandle);
154
155 MCAPI void updatePreviewedItem(::PreviewedItemEventInformation previewedItemEventInfo);
156 // NOLINTEND
157
158public:
159 // static variables
160 // NOLINTBEGIN
161 MCAPI static ::std::vector<::mce::UUID> const& mBuiltInSkinPackIds();
162 // NOLINTEND
163
164public:
165 // constructor thunks
166 // NOLINTBEGIN
167 MCAPI void* $ctor(::IMinecraftGame& minecraft, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& client);
168 // NOLINTEND
169
170public:
171 // virtual function thunks
172 // NOLINTBEGIN
173 MCAPI void $update(::ui::DirtyFlag& dirtyFlags);
174
175 MCAPI void $updateSkin(::persona::PersonaCharacterHandle const& characterHandle, ::SkinHandle handle);
176 // NOLINTEND
177};
Definition IClientInstance.h:5
Definition IMinecraftEventing.h:147
Definition IMinecraftGame.h:5
Definition PersonaAppearance.h:5
Definition PersonaClient.h:5
Definition PersonaScreenModelCommon.h:5
Definition SkinHandle.h:5
Definition Color.h:13
Definition UUID.h:8
Definition PieceOfferWrapper.h:7
Definition ColorInfo.h:7
Definition FreeItemState.h:7