LeviLamina
Loading...
Searching...
No Matches
FontAlias.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/Font.h"
7#include "mc/client/gui/FontHandle.h"
8#include "mc/deps/core/file/PathBuffer.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/deps/minecraft_renderer/renderer/Type.h"
11
12// auto generated forward declare list
13// clang-format off
15class ScreenContext;
16namespace Core { class Path; }
17namespace mce { class Color; }
18namespace mce { class MaterialPtr; }
19namespace mce { class TextureGroup; }
20namespace mce::Font { struct RenderingParameters; }
21// clang-format on
22
23class FontAlias : public ::Font {
24public:
25 // FontAlias inner types declare
26 // clang-format off
27 struct ReferenceData;
28 // clang-format on
29
30 // FontAlias inner types define
31 struct ReferenceData {
32 public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<8, 80, ::FontHandle> mFontHandle;
36 ::ll::TypedStorage<8, 32, ::std::string> mLanguageCode;
37 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<int, int>>> mIncludedUnicodeRanges;
38 ::ll::TypedStorage<4, 4, float> mFontScale;
39 // NOLINTEND
40
41 public:
42 // prevent constructor by default
43 ReferenceData& operator=(ReferenceData const&);
44 ReferenceData();
45
46 public:
47 // member functions
48 // NOLINTBEGIN
49 MCAPI ReferenceData(::FontAlias::ReferenceData const&);
50
51 MCAPI ::FontAlias::ReferenceData& operator=(::FontAlias::ReferenceData&&);
52
53 MCAPI ~ReferenceData();
54 // NOLINTEND
55
56 public:
57 // constructor thunks
58 // NOLINTBEGIN
59 MCAPI void* $ctor(::FontAlias::ReferenceData const&);
60 // NOLINTEND
61
62 public:
63 // destructor thunk
64 // NOLINTBEGIN
65 MCAPI void $dtor();
66 // NOLINTEND
67 };
68
69public:
70 // member variables
71 // NOLINTBEGIN
72 ::ll::TypedStorage<8, 24, ::std::vector<::FontAlias::ReferenceData>> mFontReferences;
73 ::ll::TypedStorage<8, 32, ::std::string> mCurrentLanguageCode;
74 ::ll::TypedStorage<1, 1, bool> mAllReferencesMaterialsCanBeOverridden;
75 ::ll::TypedStorage<1, 1, bool> mAllReferencesScreenPixelAligned;
76 ::ll::TypedStorage<1, 1, bool> mAllReferencesSupportShadowInSingleDraw;
77 ::ll::TypedStorage<4, 4, float> mMaxWrapHeight;
78 ::ll::TypedStorage<4, 4, float> mMaxScalar;
79 // NOLINTEND
80
81public:
82 // prevent constructor by default
83 FontAlias();
84
85public:
86 // virtual functions
87 // NOLINTBEGIN
88 virtual ~FontAlias() /*override*/ = default;
89
90 virtual float _getCharWidth(int uniChar, bool forceUnicode) /*override*/;
91
92 virtual bool supportsChar(int const& character) /*override*/;
93
94 virtual float getWrapHeight() const /*override*/;
95
96 virtual float getScaleFactor() const /*override*/;
97
98 virtual float getScaleFactor(int uniChar) const /*override*/;
99
100 virtual bool isScreenPixelAligned() const /*override*/;
101
102 virtual bool materialCanBeOverridden() const /*override*/;
103
104 virtual void setTextConstantsInScreenContext(
105 ::ScreenContext& screenContext,
106 int glyphSheet,
107 float guiScale,
108 ::mce::Color const& textColor,
109 bool hasShadow
110 ) const /*override*/;
111
112 virtual void uploadTextureToGPU() /*override*/;
113
114 virtual ::ResourceLocation _getFontSheetLocation(int sheet, bool forceUnicode) const /*override*/;
115
116 virtual ::mce::MaterialPtr const& getMaterial(int sheet, bool isOddGuiScale) const /*override*/;
117
118 virtual ::mce::Font::Type getType(int glyphSheet) const /*override*/;
119
120 virtual ::std::optional<::mce::Font::RenderingParameters> tryGetRenderingParameters(
121 ::ScreenContext const& screenContext,
122 int glyphSheet,
123 float guiScale,
124 ::mce::Color const& textColor,
125 bool hasShadow,
126 uint textureWidth,
127 uint textureHeight
128 ) const /*override*/;
129
130 virtual void loadFontData(bool uploadTextureImmediately) /*override*/;
131
132 virtual bool _supportsShadowInSingleDraw() /*override*/;
133
134 virtual void onLanguageChanged(::std::string_view languageCode) /*override*/;
135
136 virtual void _scanUnicodeCharacterSize(int character, int sheet, bool forceUnicode) /*override*/;
137
138 virtual float buildChar(
139 ::std::vector<::Font::GlyphQuad>& quads,
140 int i,
141 ::mce::Color const& color,
142 bool italic,
143 float x,
144 float y,
145 bool unicode
146 ) /*override*/;
147
148 virtual ::std::string _remapString(::std::string_view str) const /*override*/;
149
150 virtual void switchFontsource(::Core::Path const& asciiName, ::Core::Path const& unicodeName) /*override*/;
151
152 virtual ::std::pair<::Core::PathBuffer<::std::string> const&, ::Core::PathBuffer<::std::string> const&>
153 getFontSources() const /*override*/;
154 // NOLINTEND
155
156public:
157 // member functions
158 // NOLINTBEGIN
159 MCAPI FontAlias(
160 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
161 ::std::vector<::FontAlias::ReferenceData>&& fontReferences,
162 float scaleFactor
163 );
164
165 MCAPI ::Bedrock::NotNullNonOwnerPtr<::FontHandle const> getFontReferenceForSheet(int const& sheet) const;
166
167 MCAPI ::Bedrock::NotNullNonOwnerPtr<::FontHandle const> getFontReferenceForUnicode(int const& character) const;
168 // NOLINTEND
169
170public:
171 // constructor thunks
172 // NOLINTBEGIN
173 MCAPI void* $ctor(
174 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
175 ::std::vector<::FontAlias::ReferenceData>&& fontReferences,
176 float scaleFactor
177 );
178 // NOLINTEND
179
180public:
181 // virtual function thunks
182 // NOLINTBEGIN
183 MCAPI float $_getCharWidth(int uniChar, bool forceUnicode);
184
185 MCAPI bool $supportsChar(int const& character);
186
187 MCAPI float $getWrapHeight() const;
188
189 MCAPI float $getScaleFactor() const;
190
191 MCAPI float $getScaleFactor(int uniChar) const;
192
193 MCAPI bool $isScreenPixelAligned() const;
194
195 MCAPI bool $materialCanBeOverridden() const;
196
197 MCAPI void $setTextConstantsInScreenContext(
198 ::ScreenContext& screenContext,
199 int glyphSheet,
200 float guiScale,
201 ::mce::Color const& textColor,
202 bool hasShadow
203 ) const;
204
205 MCFOLD void $uploadTextureToGPU();
206
207 MCAPI ::ResourceLocation $_getFontSheetLocation(int sheet, bool forceUnicode) const;
208
209 MCAPI ::mce::MaterialPtr const& $getMaterial(int sheet, bool isOddGuiScale) const;
210
211 MCAPI ::mce::Font::Type $getType(int glyphSheet) const;
212
213 MCAPI ::std::optional<::mce::Font::RenderingParameters> $tryGetRenderingParameters(
214 ::ScreenContext const& screenContext,
215 int glyphSheet,
216 float guiScale,
217 ::mce::Color const& textColor,
218 bool hasShadow,
219 uint textureWidth,
220 uint textureHeight
221 ) const;
222
223 MCFOLD void $loadFontData(bool uploadTextureImmediately);
224
225 MCAPI bool $_supportsShadowInSingleDraw();
226
227 MCAPI void $onLanguageChanged(::std::string_view languageCode);
228
229 MCAPI void $_scanUnicodeCharacterSize(int character, int sheet, bool forceUnicode);
230
231 MCAPI float $buildChar(
232 ::std::vector<::Font::GlyphQuad>& quads,
233 int i,
234 ::mce::Color const& color,
235 bool italic,
236 float x,
237 float y,
238 bool unicode
239 );
240
241 MCAPI ::std::string $_remapString(::std::string_view str) const;
242
243 MCAPI void $switchFontsource(::Core::Path const& asciiName, ::Core::Path const& unicodeName);
244
245 MCAPI ::std::pair<::Core::PathBuffer<::std::string> const&, ::Core::PathBuffer<::std::string> const&>
246 $getFontSources() const;
247 // NOLINTEND
248
249public:
250 // vftables
251 // NOLINTBEGIN
252 MCNAPI static void** $vftable();
253 // NOLINTEND
254};
Definition Path.h:17
Definition FontAlias.h:5
static MCAPI void ** $vftable()
Definition Font.h:5
Definition ResourceLocation.h:15
Definition ScreenContext.h:5
Definition Color.h:13
Definition MaterialPtr.h:15
Definition TextureGroup.h:7
Definition FontAlias.h:13
Definition Font.h:14
Definition RenderingParameters.h:7