LeviLamina
Loading...
Searching...
No Matches
CreditsRenderer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/controls/renderers/MinecraftUICustomRenderer.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/deps/minecraft_renderer/renderer/TexturePtr.h"
9
10// auto generated forward declare list
11// clang-format off
12class FontHandle;
13class IClientInstance;
15class UIControl;
17class UIResolvedDef;
18class UIScene;
19struct ScreenEvent;
20namespace Json { class Value; }
21// clang-format on
22
24public:
25 // CreditsRenderer inner types declare
26 // clang-format off
27 struct CreditsContent;
28 // clang-format on
29
30 // CreditsRenderer inner types define
31 struct CreditsContent {
32 public:
33 // CreditsContent inner types define
34 enum class Type : int {
35 Text = 0,
36 Image = 1,
37 };
38
39 public:
40 // member variables
41 // NOLINTBEGIN
42 ::ll::TypedStorage<4, 4, ::CreditsRenderer::CreditsContent::Type> mType;
43 ::ll::TypedStorage<4, 4, int> mHeight;
44 ::ll::TypedStorage<4, 4, int> mPaddingAfter;
45 ::ll::TypedStorage<8, 32, ::std::string> mText;
46 ::ll::TypedStorage<1, 1, bool> mCentered;
47 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mTexturePtr;
48 // NOLINTEND
49
50 public:
51 // prevent constructor by default
52 CreditsContent();
53
54 public:
55 // member functions
56 // NOLINTBEGIN
57 MCAPI CreditsContent(::std::string const& text, int height, bool centered, int paddingAfter);
58 // NOLINTEND
59
60 public:
61 // constructor thunks
62 // NOLINTBEGIN
63 MCAPI void* $ctor(::std::string const& text, int height, bool centered, int paddingAfter);
64 // NOLINTEND
65 };
66
67 using clock_type = ::std::chrono::steady_clock;
68
69 using duration_sec = ::std::chrono::duration<float, ::std::ratio<1, 1>>;
70
71public:
72 // member variables
73 // NOLINTBEGIN
74 ::ll::TypedStorage<1, 1, bool> mInitialized;
75 ::ll::TypedStorage<4, 8, ::glm::vec2> mOwnerSize;
76 ::ll::TypedStorage<8, 24, ::std::vector<::CreditsRenderer::CreditsContent>> mContent;
77 ::ll::TypedStorage<4, 4, uint> mIndex;
78 ::ll::TypedStorage<4, 4, float> mCurrentOffset;
79 ::ll::TypedStorage<8, 32, ::std::string> mPlayerName;
80 ::ll::TypedStorage<4, 4, float> mScrollSpeed;
81 ::ll::TypedStorage<1, 1, bool> mFinished;
82 ::ll::TypedStorage<8, 24, ::std::vector<::ScreenEvent>> mScreenEvents;
83 ::ll::TypedStorage<4, 4, uint> mCreditsEndEventId;
84 ::ll::TypedStorage<8, 8, double> mTimeNowSeconds;
85 ::ll::TypedStorage<8, 8, double> mTimeLastSeconds;
86 ::ll::TypedStorage<8, 8, double> mDeltaTimeSeconds;
87 // NOLINTEND
88
89public:
90 // prevent constructor by default
91 CreditsRenderer& operator=(CreditsRenderer const&);
92 CreditsRenderer();
93
94public:
95 // virtual functions
96 // NOLINTBEGIN
97 virtual ~CreditsRenderer() /*override*/;
98
99 virtual ::std::shared_ptr<::UICustomRenderer> clone() const /*override*/;
100
101 virtual bool update(::IClientInstance& client, ::UIControl& owner, ::UIScene const& scene) /*override*/;
102
103 virtual void
104 render(::MinecraftUIRenderContext& renderContext, ::IClientInstance& client, ::UIControl& owner, int) /*override*/;
105
106 virtual void
107 collectScreenEvents(::std::queue<::ScreenEvent, ::std::deque<::ScreenEvent>>& screenEvents) /*override*/;
108 // NOLINTEND
109
110public:
111 // member functions
112 // NOLINTBEGIN
113 MCAPI CreditsRenderer(::CreditsRenderer const&);
114
115 MCAPI explicit CreditsRenderer(::UIResolvedDef const& def);
116
117 MCAPI void _addDisciplineTitleContent(
118 ::std::string const& sectionTitle,
119 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
120 int ownerWidth
121 );
122
123 MCAPI void _addGroupTitleContent(
124 ::std::string const& groupTitle,
125 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
126 int ownerWidth
127 );
128
129 MCAPI void _addNameContent(
130 ::std::string const& name,
131 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
132 int ownerWidth
133 );
134
135 MCAPI void _addSectionTitleContent(
136 ::std::string const& sectionTitle,
137 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
138 int ownerWidth
139 );
140
141 MCAPI void _loadImageFile(::IClientInstance& client, ::UIControl& owner, ::std::string const& filePath);
142
143 MCAPI void _loadJsonFile(::IClientInstance& client, ::UIControl& owner, ::std::string const& filePath);
144
145 MCAPI void _loadTextFile(::IClientInstance& client, ::UIControl& owner, ::std::string const& filePath);
146
147 MCAPI void _parseDiscipline(
148 ::Json::Value const& rootData,
149 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
150 int ownerWidth
151 );
152
153 MCAPI void
154 _parseFiles(::IClientInstance& client, ::UIControl& owner, ::std::vector<::std::string> const& filePaths);
155
156 MCAPI void _parseSection(
157 ::Json::Value const& rootData,
158 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
159 int ownerWidth
160 );
161
162 MCAPI void _parseTitleGroup(
163 ::Json::Value const& rootData,
164 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
165 int ownerWidth
166 );
167 // NOLINTEND
168
169public:
170 // static variables
171 // NOLINTBEGIN
172 MCAPI static int const& FILE_PADDING();
173 // NOLINTEND
174
175public:
176 // constructor thunks
177 // NOLINTBEGIN
178 MCAPI void* $ctor(::CreditsRenderer const&);
179
180 MCAPI void* $ctor(::UIResolvedDef const& def);
181 // NOLINTEND
182
183public:
184 // destructor thunk
185 // NOLINTBEGIN
186 MCAPI void $dtor();
187 // NOLINTEND
188
189public:
190 // virtual function thunks
191 // NOLINTBEGIN
192 MCAPI ::std::shared_ptr<::UICustomRenderer> $clone() const;
193
194 MCAPI bool $update(::IClientInstance& client, ::UIControl& owner, ::UIScene const& scene);
195
196 MCAPI void $render(::MinecraftUIRenderContext& renderContext, ::IClientInstance& client, ::UIControl& owner, int);
197
198 MCAPI void $collectScreenEvents(::std::queue<::ScreenEvent, ::std::deque<::ScreenEvent>>& screenEvents);
199 // NOLINTEND
200
201public:
202 // vftables
203 // NOLINTBEGIN
204 MCNAPI static void** $vftable();
205 // NOLINTEND
206};
Definition CreditsRenderer.h:5
static MCAPI void ** $vftable()
Definition FontHandle.h:5
Definition IClientInstance.h:5
Definition Value.h:16
Definition MinecraftUICustomRenderer.h:5
Definition MinecraftUIRenderContext.h:5
Definition UIControl.h:5
Definition UICustomRenderer.h:5
Definition UIResolvedDef.h:5
Definition UIScene.h:5
Definition CreditsRenderer.h:13
Definition ScreenEvent.h:5