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
51 using clock_type = ::std::chrono::steady_clock;
52
53 using duration_sec = ::std::chrono::duration<float, ::std::ratio<1, 1>>;
54
55public:
56 // member variables
57 // NOLINTBEGIN
58 ::ll::TypedStorage<1, 1, bool> mInitialized;
59 ::ll::TypedStorage<4, 8, ::glm::vec2> mOwnerSize;
60 ::ll::TypedStorage<8, 24, ::std::vector<::CreditsRenderer::CreditsContent>> mContent;
61 ::ll::TypedStorage<4, 4, uint> mIndex;
62 ::ll::TypedStorage<4, 4, float> mCurrentOffset;
63 ::ll::TypedStorage<8, 32, ::std::string> mPlayerName;
64 ::ll::TypedStorage<4, 4, float> mScrollSpeed;
65 ::ll::TypedStorage<1, 1, bool> mFinished;
66 ::ll::TypedStorage<8, 24, ::std::vector<::ScreenEvent>> mScreenEvents;
67 ::ll::TypedStorage<4, 4, uint> mCreditsEndEventId;
68 ::ll::TypedStorage<8, 8, double> mTimeNowSeconds;
69 ::ll::TypedStorage<8, 8, double> mTimeLastSeconds;
70 ::ll::TypedStorage<8, 8, double> mDeltaTimeSeconds;
71 // NOLINTEND
72
73public:
74 // prevent constructor by default
75 CreditsRenderer& operator=(CreditsRenderer const&);
76 CreditsRenderer();
77
78public:
79 // virtual functions
80 // NOLINTBEGIN
81 virtual ~CreditsRenderer() /*override*/ = default;
82
83 virtual ::std::shared_ptr<::UICustomRenderer> clone() const /*override*/;
84
85 virtual bool update(::IClientInstance& client, ::UIControl& owner, ::UIScene const& scene) /*override*/;
86
87 virtual void
88 render(::MinecraftUIRenderContext& renderContext, ::IClientInstance& client, ::UIControl& owner, int) /*override*/;
89
90 virtual void
91 collectScreenEvents(::std::queue<::ScreenEvent, ::std::deque<::ScreenEvent>>& screenEvents) /*override*/;
92 // NOLINTEND
93
94public:
95 // member functions
96 // NOLINTBEGIN
97 MCAPI CreditsRenderer(::CreditsRenderer const&);
98
99 MCAPI explicit CreditsRenderer(::UIResolvedDef const& def);
100
101 MCAPI void _addDisciplineTitleContent(
102 ::std::string const& sectionTitle,
103 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
104 int ownerWidth
105 );
106
107 MCAPI void _addGroupTitleContent(
108 ::std::string const& groupTitle,
109 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
110 int ownerWidth
111 );
112
113 MCAPI void _addNameContent(
114 ::std::string const& name,
115 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
116 int ownerWidth
117 );
118
119 MCAPI void _addSectionTitleContent(
120 ::std::string const& sectionTitle,
121 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
122 int ownerWidth
123 );
124
125 MCAPI void _loadImageFile(::IClientInstance& client, ::UIControl& owner, ::std::string const& filePath);
126
127 MCAPI void _loadJsonFile(::IClientInstance& client, ::UIControl& owner, ::std::string const& filePath);
128
129 MCAPI void _loadTextFile(::IClientInstance& client, ::UIControl& owner, ::std::string const& filePath);
130
131 MCAPI void _parseDiscipline(
132 ::Json::Value const& rootData,
133 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
134 int ownerWidth
135 );
136
137 MCAPI void _parseSection(
138 ::Json::Value const& rootData,
139 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
140 int ownerWidth
141 );
142
143 MCAPI void _parseTitleGroup(
144 ::Json::Value const& rootData,
145 ::Bedrock::NotNullNonOwnerPtr<::FontHandle> const& fontHandle,
146 int ownerWidth
147 );
148 // NOLINTEND
149
150public:
151 // static variables
152 // NOLINTBEGIN
153 MCAPI static ::std::string_view const& INDENT_TEXT();
154
155 MCAPI static ::std::string_view const& SECTION_BORDER_TEXT();
156 // NOLINTEND
157
158public:
159 // constructor thunks
160 // NOLINTBEGIN
161 MCAPI void* $ctor(::CreditsRenderer const&);
162
163 MCAPI void* $ctor(::UIResolvedDef const& def);
164 // NOLINTEND
165
166public:
167 // virtual function thunks
168 // NOLINTBEGIN
169 MCAPI ::std::shared_ptr<::UICustomRenderer> $clone() const;
170
171 MCAPI bool $update(::IClientInstance& client, ::UIControl& owner, ::UIScene const& scene);
172
173 MCAPI void $render(::MinecraftUIRenderContext& renderContext, ::IClientInstance& client, ::UIControl& owner, int);
174
175 MCAPI void $collectScreenEvents(::std::queue<::ScreenEvent, ::std::deque<::ScreenEvent>>& screenEvents);
176 // NOLINTEND
177
178public:
179 // vftables
180 // NOLINTBEGIN
181 MCNAPI static void** $vftable();
182 // NOLINTEND
183};
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