LeviLamina
Loading...
Searching...
No Matches
BaseScreen.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/GameEventNotification.h"
7#include "mc/client/gui/SceneType.h"
8#include "mc/client/gui/screens/AbstractScene.h"
9#include "mc/client/renderer/screen/EyeRenderingModeBit.h"
10#include "mc/deps/core/utility/NonOwnerPointer.h"
11#include "mc/deps/input/InputMode.h"
12#include "mc/deps/input/TextboxTextUpdateReason.h"
13#include "mc/deps/input/enums/ButtonState.h"
14#include "mc/deps/input/enums/DirectionId.h"
15#include "mc/deps/input/enums/FocusImpact.h"
16#include "mc/deps/input/enums/RawInputType.h"
17
18// auto generated forward declare list
19// clang-format off
22class CachedScenes;
24class RectangleArea;
25class ScreenContext;
26class TaskGroup;
29struct ScreenSizeData;
32namespace OreUI::Debug { class ISceneDataProvider; }
33// clang-format on
34
35class BaseScreen : public ::AbstractScene {
36public:
37 // member variables
38 // NOLINTBEGIN
39 ::ll::TypedStorage<4, 4, int> mWidth;
40 ::ll::TypedStorage<4, 4, int> mHeight;
41 ::ll::TypedStorage<1, 1, bool> mShouldSendEvents;
42 ::ll::TypedStorage<1, 1, bool> mWantsTextOnly;
43 ::ll::TypedStorage<1, 1, bool> mIsPopped;
44 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::AbstractScreenSetupCleanupStrategy>> mScreenSetupCleanup;
45 // NOLINTEND
46
47public:
48 // virtual functions
49 // NOLINTBEGIN
50 virtual ~BaseScreen() /*override*/ = default;
51
52 virtual void setupForRendering(::ScreenContext& screenContext);
53
54 virtual void cleanupForRendering(::ScreenContext& screenContext);
55
56 virtual void setScreenSetupCleanup(::std::unique_ptr<::AbstractScreenSetupCleanupStrategy> screenSetupCleanup);
57
58 virtual void init(::ScreenSizeData const& screenSizeData) /*override*/;
59
60 virtual void setSize(::ScreenSizeData const& screenSizeData) /*override*/;
61
62 virtual void onSetKeyboardHeight(float keyboardHeight) /*override*/;
63
64 virtual void onInternetUpdate() /*override*/;
65
66 virtual void onFocusGained() /*override*/;
67
68 virtual void onFocusLost() /*override*/;
69
70 virtual void terminate() /*override*/;
71
72 virtual void onCreation() /*override*/;
73
74 virtual void onLeave() /*override*/;
75
76 virtual void onGameEventNotification(::ui::GameEventNotification notification) /*override*/;
77
78 virtual void leaveScreen() /*override*/;
79
80 virtual void preFrameTick() /*override*/;
81
82 virtual void tick(int nTick, int maxTick) /*override*/;
83
84 virtual void frameUpdate(::MinecraftUIFrameUpdateContext& frameUpdateContext) /*override*/;
85
86 virtual void applyInput(float a) /*override*/;
87
88 virtual void preRenderUpdate(::ScreenContext& screenContext) /*override*/;
89
90 virtual void prepareFrame(::ScreenContext& screenContext) /*override*/;
91
92 virtual void render(::ScreenContext& screenContext, ::FrameRenderObject const& renderObj) = 0;
93
94 virtual void postRenderUpdate(::ScreenContext& screenContext) /*override*/;
95
96 virtual void handleInputModeChanged(::InputMode inputMode) /*override*/;
97
98 virtual void handleButtonPress(uint buttonId, ::FocusImpact focusImpact) /*override*/;
99
100 virtual void handleButtonRelease(uint buttonId, ::FocusImpact focusImpact) /*override*/;
101
102 virtual void
103 handleRawInputEvent(int id, ::RawInputType keyType, ::ButtonState state, bool allowRemapping) /*override*/;
104
105 virtual bool handlePointerLocation(
106 ::PointerLocationEventData const& pointerLocationData,
107 ::FocusImpact focusImpact
108 ) /*override*/;
109
110 virtual void handlePointerPressed(bool pressed) /*override*/;
111
112 virtual void handleDirection(::DirectionId directionId, float x, float y, ::FocusImpact focusImpact) /*override*/;
113
114 virtual void handleTextChar(::std::string const& inputUtf8, ::FocusImpact focusImpact) /*override*/;
115
116 virtual void
117 handleTouchPadTouch(::TouchPadTouchEventData const& touchEventData, ::FocusImpact focusImpact) /*override*/;
118
119 virtual void setTextboxText(::std::string const& text, ::TextboxTextUpdateReason reason) /*override*/;
120
121 virtual void onKeyboardDismissed() /*override*/;
122
123 virtual void handleLicenseChanged() /*override*/;
124
125 virtual bool renderGameBehind() const /*override*/;
126
127 virtual bool absorbsInput() const /*override*/;
128
129 virtual bool closeOnPlayerHurt() const /*override*/;
130
131 virtual bool useCustomPocketToast() const /*override*/;
132
133 virtual bool isModal() const /*override*/;
134
135 virtual bool isEditorMode() const /*override*/;
136
137 virtual bool isShowingMenu() const /*override*/;
138
139 virtual bool shouldStealMouse() const /*override*/;
140
141 virtual bool screenIsNotFlushable() const /*override*/;
142
143 virtual bool alwaysAcceptsInput() const /*override*/;
144
145 virtual bool screenDrawsLast() const /*override*/;
146
147 virtual bool isPlayScreen() const /*override*/;
148
149 virtual bool renderOnlyWhenTopMost() const /*override*/;
150
151 virtual bool lowFreqRendering() const /*override*/;
152
153 virtual bool ignoreAsTop() const /*override*/;
154
155 virtual bool shouldBeSkippedInAutomation() const /*override*/;
156
157 virtual ::std::vector<::RectangleArea> getInputAreas() const /*override*/;
158
159 virtual int getWidth() /*override*/;
160
161 virtual int getHeight() /*override*/;
162
163 virtual void reload() /*override*/;
164
165 virtual ::EyeRenderingModeBit getEyeRenderingMode() const /*override*/;
166
167 virtual ::ui::SceneType getSceneType() const /*override*/;
168
169 virtual ::std::string getRawScreenName() const /*override*/;
170
171 virtual ::std::string getRoute() const /*override*/;
172
173 virtual ::std::string getScreenTelemetryName() const /*override*/;
174
175 virtual void addEventProperties(::std::unordered_map<::std::string, ::std::string>& eventProperties) const
176 /*override*/;
177
178 virtual int getScreenVersion() const /*override*/;
179
180 virtual void processBufferedTextCharEvents(::std::vector<::TextCharEventData> const& bufferedEvents) /*override*/;
181
182 virtual bool getShouldSendEvents() /*override*/;
183
184 virtual void setShouldSendEvents(bool sendEvents) /*override*/;
185
186 virtual bool getWantsTextOnly() /*override*/;
187
188 virtual void setWantsTextOnly(bool textOnly) /*override*/;
189
190 virtual void onDelete(::CachedScenes& cache, ::TaskGroup& taskGroup) /*override*/;
191
192 virtual bool isGamepadCursorEnabled() const /*override*/;
193
194 virtual bool isGamepadDeflectionModeEnabled() const /*override*/;
195
196 virtual ::glm::vec2 const& getGamepadCursorPosition() const /*override*/;
197
198 virtual void cleanInputComponents() /*override*/;
199
200 virtual ::std::weak_ptr<::AbstractSceneProxy> getProxy() /*override*/;
201
202 virtual bool canBePushed() const /*override*/;
203
204 virtual bool canBePopped() const /*override*/;
205
206 virtual bool canBeTransitioned() const /*override*/;
207
208 virtual void
209 onScreenExit(bool isPopping, bool doScreenTransitions, ::std::shared_ptr<::AbstractScene> pushedScene) /*override*/;
210
211 virtual void onScreenEntrance(bool isRevisiting, bool doScreenTransitions) /*override*/;
212
213 virtual bool isEntering() const /*override*/;
214
215 virtual bool isExiting() const /*override*/;
216
217 virtual void schedulePop() /*override*/;
218
219 virtual bool isTerminating() const /*override*/;
220
221 virtual bool loadScreenImmediately() const /*override*/;
222
223 virtual bool forceUpdateActiveSceneStackWhenPushed() const /*override*/;
224
225 virtual bool hasFinishedLoading() const /*override*/;
226
227 virtual void sendScreenEvent(::std::string const&, ::std::string const&) /*override*/;
228
229 virtual void setScreenState(
230 ::std::vector<::std::pair<::std::string_view, ::std::string_view>> const& routeQueryParameters
231 ) /*override*/;
232
233 virtual ::Bedrock::NonOwnerPointer<::OreUI::Debug::ISceneDataProvider const> getDebugDataProvider() const
234 /*override*/;
235 // NOLINTEND
236
237public:
238 // static functions
239 // NOLINTBEGIN
240 MCAPI static void drawRectangleArea(
241 ::ScreenContext& screenContext,
242 ::RectangleArea const& a,
243 int ux,
244 int vy,
245 float uvWidth,
246 float uvHeight,
247 float us,
248 float vs,
249 float px,
250 float py
251 );
252 // NOLINTEND
253
254public:
255 // virtual function thunks
256 // NOLINTBEGIN
257 MCAPI void $setupForRendering(::ScreenContext& screenContext);
258
259 MCAPI void $cleanupForRendering(::ScreenContext& screenContext);
260
261 MCAPI void $setScreenSetupCleanup(::std::unique_ptr<::AbstractScreenSetupCleanupStrategy> screenSetupCleanup);
262
263 MCFOLD void $init(::ScreenSizeData const& screenSizeData);
264
265 MCAPI void $setSize(::ScreenSizeData const& screenSizeData);
266
267 MCFOLD void $onSetKeyboardHeight(float keyboardHeight);
268
269 MCFOLD void $onInternetUpdate();
270
271 MCFOLD void $onFocusGained();
272
273 MCFOLD void $onFocusLost();
274
275 MCFOLD void $terminate();
276
277 MCFOLD void $onCreation();
278
279 MCFOLD void $onLeave();
280
281 MCFOLD void $onGameEventNotification(::ui::GameEventNotification notification);
282
283 MCFOLD void $leaveScreen();
284
285 MCFOLD void $preFrameTick();
286
287 MCFOLD void $tick(int nTick, int maxTick);
288
289 MCFOLD void $frameUpdate(::MinecraftUIFrameUpdateContext& frameUpdateContext);
290
291 MCFOLD void $applyInput(float a);
292
293 MCFOLD void $preRenderUpdate(::ScreenContext& screenContext);
294
295 MCFOLD void $prepareFrame(::ScreenContext& screenContext);
296
297 MCFOLD void $postRenderUpdate(::ScreenContext& screenContext);
298
299 MCFOLD void $handleInputModeChanged(::InputMode inputMode);
300
301 MCFOLD void $handleButtonPress(uint buttonId, ::FocusImpact focusImpact);
302
303 MCFOLD void $handleButtonRelease(uint buttonId, ::FocusImpact focusImpact);
304
305 MCFOLD void $handleRawInputEvent(int id, ::RawInputType keyType, ::ButtonState state, bool allowRemapping);
306
307 MCFOLD bool
308 $handlePointerLocation(::PointerLocationEventData const& pointerLocationData, ::FocusImpact focusImpact);
309
310 MCFOLD void $handlePointerPressed(bool pressed);
311
312 MCFOLD void $handleDirection(::DirectionId directionId, float x, float y, ::FocusImpact focusImpact);
313
314 MCFOLD void $handleTextChar(::std::string const& inputUtf8, ::FocusImpact focusImpact);
315
316 MCFOLD void $handleTouchPadTouch(::TouchPadTouchEventData const& touchEventData, ::FocusImpact focusImpact);
317
318 MCFOLD void $setTextboxText(::std::string const& text, ::TextboxTextUpdateReason reason);
319
320 MCFOLD void $onKeyboardDismissed();
321
322 MCFOLD void $handleLicenseChanged();
323
324 MCFOLD bool $renderGameBehind() const;
325
326 MCFOLD bool $absorbsInput() const;
327
328 MCFOLD bool $closeOnPlayerHurt() const;
329
330 MCFOLD bool $useCustomPocketToast() const;
331
332 MCFOLD bool $isModal() const;
333
334 MCFOLD bool $isEditorMode() const;
335
336 MCFOLD bool $isShowingMenu() const;
337
338 MCFOLD bool $shouldStealMouse() const;
339
340 MCFOLD bool $screenIsNotFlushable() const;
341
342 MCFOLD bool $alwaysAcceptsInput() const;
343
344 MCFOLD bool $screenDrawsLast() const;
345
346 MCFOLD bool $isPlayScreen() const;
347
348 MCFOLD bool $renderOnlyWhenTopMost() const;
349
350 MCFOLD bool $lowFreqRendering() const;
351
352 MCFOLD bool $ignoreAsTop() const;
353
354 MCFOLD bool $shouldBeSkippedInAutomation() const;
355
356 MCFOLD ::std::vector<::RectangleArea> $getInputAreas() const;
357
358 MCFOLD int $getWidth();
359
360 MCAPI int $getHeight();
361
362 MCFOLD void $reload();
363
364 MCAPI ::EyeRenderingModeBit $getEyeRenderingMode() const;
365
366 MCFOLD ::ui::SceneType $getSceneType() const;
367
368 MCFOLD ::std::string $getRawScreenName() const;
369
370 MCAPI ::std::string $getRoute() const;
371
372 MCFOLD ::std::string $getScreenTelemetryName() const;
373
374 MCFOLD void $addEventProperties(::std::unordered_map<::std::string, ::std::string>& eventProperties) const;
375
376 MCFOLD int $getScreenVersion() const;
377
378 MCFOLD void $processBufferedTextCharEvents(::std::vector<::TextCharEventData> const& bufferedEvents);
379
380 MCFOLD bool $getShouldSendEvents();
381
382 MCAPI void $setShouldSendEvents(bool sendEvents);
383
384 MCFOLD bool $getWantsTextOnly();
385
386 MCAPI void $setWantsTextOnly(bool textOnly);
387
388 MCFOLD void $onDelete(::CachedScenes& cache, ::TaskGroup& taskGroup);
389
390 MCFOLD bool $isGamepadCursorEnabled() const;
391
392 MCFOLD bool $isGamepadDeflectionModeEnabled() const;
393
394 MCAPI ::glm::vec2 const& $getGamepadCursorPosition() const;
395
396 MCFOLD void $cleanInputComponents();
397
398 MCFOLD ::std::weak_ptr<::AbstractSceneProxy> $getProxy();
399
400 MCFOLD bool $canBePushed() const;
401
402 MCFOLD bool $canBePopped() const;
403
404 MCFOLD bool $canBeTransitioned() const;
405
406 MCAPI void $onScreenExit(bool isPopping, bool doScreenTransitions, ::std::shared_ptr<::AbstractScene> pushedScene);
407
408 MCFOLD void $onScreenEntrance(bool isRevisiting, bool doScreenTransitions);
409
410 MCFOLD bool $isEntering() const;
411
412 MCFOLD bool $isExiting() const;
413
414 MCAPI void $schedulePop();
415
416 MCAPI bool $isTerminating() const;
417
418 MCFOLD bool $loadScreenImmediately() const;
419
420 MCFOLD bool $forceUpdateActiveSceneStackWhenPushed() const;
421
422 MCFOLD bool $hasFinishedLoading() const;
423
424 MCFOLD void $sendScreenEvent(::std::string const&, ::std::string const&);
425
426 MCFOLD void
427 $setScreenState(::std::vector<::std::pair<::std::string_view, ::std::string_view>> const& routeQueryParameters);
428
429 MCFOLD ::Bedrock::NonOwnerPointer<::OreUI::Debug::ISceneDataProvider const> $getDebugDataProvider() const;
430 // NOLINTEND
431
432public:
433 // vftables
434 // NOLINTBEGIN
435 MCNAPI static void** $vftable();
436 // NOLINTEND
437};
Definition AbstractSceneProxy.h:5
Definition AbstractScene.h:5
Definition AbstractScreenSetupCleanupStrategy.h:5
Definition BaseScreen.h:5
static MCAPI void ** $vftable()
Definition CachedScenes.h:5
Definition MinecraftUIFrameUpdateContext.h:5
Definition ISceneDataProvider.h:7
Definition RectangleArea.h:5
Definition ScreenContext.h:5
Definition TaskGroup.h:61
Definition FrameRenderObject.h:5
Definition PointerLocationEventData.h:5
Definition ScreenSizeData.h:5
Definition TextCharEventData.h:5
Definition TouchPadTouchEventData.h:5