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*/;
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 handleCaretLocation(int caretLocation, ::FocusImpact focusImpact) /*override*/;
117
118 virtual void
119 handleTouchPadTouch(::TouchPadTouchEventData const& touchEventData, ::FocusImpact focusImpact) /*override*/;
120
121 virtual void setTextboxText(::std::string const& text, ::TextboxTextUpdateReason reason) /*override*/;
122
123 virtual void onKeyboardDismissed() /*override*/;
124
125 virtual void handleLicenseChanged() /*override*/;
126
127 virtual bool renderGameBehind() const /*override*/;
128
129 virtual bool absorbsInput() const /*override*/;
130
131 virtual bool closeOnPlayerHurt() const /*override*/;
132
133 virtual bool useCustomPocketToast() const /*override*/;
134
135 virtual bool isModal() const /*override*/;
136
137 virtual bool isEditorMode() const /*override*/;
138
139 virtual bool isShowingMenu() const /*override*/;
140
141 virtual bool shouldStealMouse() const /*override*/;
142
143 virtual bool screenIsNotFlushable() const /*override*/;
144
145 virtual bool alwaysAcceptsInput() const /*override*/;
146
147 virtual bool screenDrawsLast() const /*override*/;
148
149 virtual bool isPlayScreen() const /*override*/;
150
151 virtual bool renderOnlyWhenTopMost() const /*override*/;
152
153 virtual bool lowFreqRendering() const /*override*/;
154
155 virtual bool ignoreAsTop() const /*override*/;
156
157 virtual bool shouldBeSkippedInAutomation() const /*override*/;
158
159 virtual ::std::vector<::RectangleArea> getInputAreas() const /*override*/;
160
161 virtual int getWidth() /*override*/;
162
163 virtual int getHeight() /*override*/;
164
165 virtual void reload() /*override*/;
166
167 virtual ::EyeRenderingModeBit getEyeRenderingMode() const /*override*/;
168
169 virtual ::ui::SceneType getSceneType() const /*override*/;
170
171 virtual ::std::string getRawScreenName() const /*override*/;
172
173 virtual ::std::string getRoute() const /*override*/;
174
175 virtual ::std::string getScreenTelemetryName() const /*override*/;
176
177 virtual void addEventProperties(::std::unordered_map<::std::string, ::std::string>& eventProperties) const
178 /*override*/;
179
180 virtual int getScreenVersion() const /*override*/;
181
182 virtual void processBufferedTextCharEvents(::std::vector<::TextCharEventData> const& bufferedEvents) /*override*/;
183
184 virtual bool getShouldSendEvents() /*override*/;
185
186 virtual void setShouldSendEvents(bool sendEvents) /*override*/;
187
188 virtual bool getWantsTextOnly() /*override*/;
189
190 virtual void setWantsTextOnly(bool textOnly) /*override*/;
191
192 virtual void onDelete(::CachedScenes& cache, ::TaskGroup& taskGroup) /*override*/;
193
194 virtual bool isGamepadCursorEnabled() const /*override*/;
195
196 virtual bool isGamepadDeflectionModeEnabled() const /*override*/;
197
198 virtual ::glm::vec2 const& getGamepadCursorPosition() const /*override*/;
199
200 virtual void cleanInputComponents() /*override*/;
201
202 virtual ::std::weak_ptr<::AbstractSceneProxy> getProxy() /*override*/;
203
204 virtual bool canBePushed() const /*override*/;
205
206 virtual bool canBePopped() const /*override*/;
207
208 virtual bool canBeTransitioned() const /*override*/;
209
210 virtual void
211 onScreenExit(bool isPopping, bool doScreenTransitions, ::std::shared_ptr<::AbstractScene> pushedScene) /*override*/;
212
213 virtual void onScreenEntrance(bool isRevisiting, bool doScreenTransitions) /*override*/;
214
215 virtual bool isEntering() const /*override*/;
216
217 virtual bool isExiting() const /*override*/;
218
219 virtual void schedulePop() /*override*/;
220
221 virtual bool isTerminating() const /*override*/;
222
223 virtual bool loadScreenImmediately() const /*override*/;
224
225 virtual bool forceUpdateActiveSceneStackWhenPushed() const /*override*/;
226
227 virtual bool hasFinishedLoading() const /*override*/;
228
229 virtual void sendScreenEvent(::std::string const&, ::std::string const&) /*override*/;
230
231 virtual void setScreenState(
232 ::std::vector<::std::pair<::std::string_view, ::std::string_view>> const& routeQueryParameters
233 ) /*override*/;
234
235 virtual ::Bedrock::NonOwnerPointer<::OreUI::Debug::ISceneDataProvider const> getDebugDataProvider() const
236 /*override*/;
237 // NOLINTEND
238
239public:
240 // static functions
241 // NOLINTBEGIN
242 MCAPI static void drawRectangleArea(
243 ::ScreenContext& screenContext,
244 ::RectangleArea const& a,
245 int ux,
246 int vy,
247 float uvWidth,
248 float uvHeight,
249 float us,
250 float vs,
251 float px,
252 float py
253 );
254 // NOLINTEND
255
256public:
257 // destructor thunk
258 // NOLINTBEGIN
259 MCAPI void $dtor();
260 // NOLINTEND
261
262public:
263 // virtual function thunks
264 // NOLINTBEGIN
265 MCAPI void $setupForRendering(::ScreenContext& screenContext);
266
267 MCAPI void $cleanupForRendering(::ScreenContext& screenContext);
268
269 MCAPI void $setScreenSetupCleanup(::std::unique_ptr<::AbstractScreenSetupCleanupStrategy> screenSetupCleanup);
270
271 MCFOLD void $init(::ScreenSizeData const& screenSizeData);
272
273 MCAPI void $setSize(::ScreenSizeData const& screenSizeData);
274
275 MCFOLD void $onSetKeyboardHeight(float keyboardHeight);
276
277 MCFOLD void $onInternetUpdate();
278
279 MCFOLD void $onFocusGained();
280
281 MCFOLD void $onFocusLost();
282
283 MCFOLD void $terminate();
284
285 MCFOLD void $onCreation();
286
287 MCFOLD void $onLeave();
288
289 MCFOLD void $onGameEventNotification(::ui::GameEventNotification notification);
290
291 MCFOLD void $leaveScreen();
292
293 MCFOLD void $preFrameTick();
294
295 MCFOLD void $tick(int nTick, int maxTick);
296
297 MCFOLD void $frameUpdate(::MinecraftUIFrameUpdateContext& frameUpdateContext);
298
299 MCFOLD void $applyInput(float a);
300
301 MCFOLD void $preRenderUpdate(::ScreenContext& screenContext);
302
303 MCFOLD void $prepareFrame(::ScreenContext& screenContext);
304
305 MCFOLD void $postRenderUpdate(::ScreenContext& screenContext);
306
307 MCFOLD void $handleInputModeChanged(::InputMode inputMode);
308
309 MCFOLD void $handleButtonPress(uint buttonId, ::FocusImpact focusImpact);
310
311 MCFOLD void $handleButtonRelease(uint buttonId, ::FocusImpact focusImpact);
312
313 MCFOLD void $handleRawInputEvent(int id, ::RawInputType keyType, ::ButtonState state, bool allowRemapping);
314
315 MCFOLD bool
316 $handlePointerLocation(::PointerLocationEventData const& pointerLocationData, ::FocusImpact focusImpact);
317
318 MCFOLD void $handlePointerPressed(bool pressed);
319
320 MCFOLD void $handleDirection(::DirectionId directionId, float x, float y, ::FocusImpact focusImpact);
321
322 MCFOLD void $handleTextChar(::std::string const& inputUtf8, ::FocusImpact focusImpact);
323
324 MCFOLD void $handleCaretLocation(int caretLocation, ::FocusImpact focusImpact);
325
326 MCFOLD void $handleTouchPadTouch(::TouchPadTouchEventData const& touchEventData, ::FocusImpact focusImpact);
327
328 MCFOLD void $setTextboxText(::std::string const& text, ::TextboxTextUpdateReason reason);
329
330 MCFOLD void $onKeyboardDismissed();
331
332 MCFOLD void $handleLicenseChanged();
333
334 MCFOLD bool $renderGameBehind() const;
335
336 MCFOLD bool $absorbsInput() const;
337
338 MCFOLD bool $closeOnPlayerHurt() const;
339
340 MCFOLD bool $useCustomPocketToast() const;
341
342 MCFOLD bool $isModal() const;
343
344 MCFOLD bool $isEditorMode() const;
345
346 MCFOLD bool $isShowingMenu() const;
347
348 MCFOLD bool $shouldStealMouse() const;
349
350 MCFOLD bool $screenIsNotFlushable() const;
351
352 MCFOLD bool $alwaysAcceptsInput() const;
353
354 MCFOLD bool $screenDrawsLast() const;
355
356 MCFOLD bool $isPlayScreen() const;
357
358 MCFOLD bool $renderOnlyWhenTopMost() const;
359
360 MCFOLD bool $lowFreqRendering() const;
361
362 MCFOLD bool $ignoreAsTop() const;
363
364 MCFOLD bool $shouldBeSkippedInAutomation() const;
365
366 MCFOLD ::std::vector<::RectangleArea> $getInputAreas() const;
367
368 MCFOLD int $getWidth();
369
370 MCFOLD int $getHeight();
371
372 MCFOLD void $reload();
373
374 MCAPI ::EyeRenderingModeBit $getEyeRenderingMode() const;
375
376 MCFOLD ::ui::SceneType $getSceneType() const;
377
378 MCFOLD ::std::string $getRawScreenName() const;
379
380 MCAPI ::std::string $getRoute() const;
381
382 MCFOLD ::std::string $getScreenTelemetryName() const;
383
384 MCFOLD void $addEventProperties(::std::unordered_map<::std::string, ::std::string>& eventProperties) const;
385
386 MCFOLD int $getScreenVersion() const;
387
388 MCFOLD void $processBufferedTextCharEvents(::std::vector<::TextCharEventData> const& bufferedEvents);
389
390 MCFOLD bool $getShouldSendEvents();
391
392 MCFOLD void $setShouldSendEvents(bool sendEvents);
393
394 MCFOLD bool $getWantsTextOnly();
395
396 MCAPI void $setWantsTextOnly(bool textOnly);
397
398 MCFOLD void $onDelete(::CachedScenes& cache, ::TaskGroup& taskGroup);
399
400 MCFOLD bool $isGamepadCursorEnabled() const;
401
402 MCFOLD bool $isGamepadDeflectionModeEnabled() const;
403
404 MCAPI ::glm::vec2 const& $getGamepadCursorPosition() const;
405
406 MCFOLD void $cleanInputComponents();
407
408 MCFOLD ::std::weak_ptr<::AbstractSceneProxy> $getProxy();
409
410 MCFOLD bool $canBePushed() const;
411
412 MCFOLD bool $canBePopped() const;
413
414 MCFOLD bool $canBeTransitioned() const;
415
416 MCAPI void $onScreenExit(bool isPopping, bool doScreenTransitions, ::std::shared_ptr<::AbstractScene> pushedScene);
417
418 MCFOLD void $onScreenEntrance(bool isRevisiting, bool doScreenTransitions);
419
420 MCFOLD bool $isEntering() const;
421
422 MCFOLD bool $isExiting() const;
423
424 MCAPI void $schedulePop();
425
426 MCFOLD bool $isTerminating() const;
427
428 MCFOLD bool $loadScreenImmediately() const;
429
430 MCFOLD bool $forceUpdateActiveSceneStackWhenPushed() const;
431
432 MCFOLD bool $hasFinishedLoading() const;
433
434 MCFOLD void $sendScreenEvent(::std::string const&, ::std::string const&);
435
436 MCFOLD void
437 $setScreenState(::std::vector<::std::pair<::std::string_view, ::std::string_view>> const& routeQueryParameters);
438
439 MCFOLD ::Bedrock::NonOwnerPointer<::OreUI::Debug::ISceneDataProvider const> $getDebugDataProvider() const;
440 // NOLINTEND
441
442public:
443 // vftables
444 // NOLINTBEGIN
445 MCNAPI static void** $vftable();
446 // NOLINTEND
447};
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:57
Definition FrameRenderObject.h:5
Definition PointerLocationEventData.h:8
Definition ScreenSizeData.h:5
Definition TextCharEventData.h:5
Definition TouchPadTouchEventData.h:5