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;
23class RectangleArea;
24class ScreenContext;
25class TaskGroup;
29struct ScreenSizeData;
32namespace OreUI { struct ViewDebugSettings; }
33namespace OreUI::Debug { class ISceneDataProvider; }
34// clang-format on
35
36class BaseScreen : public ::AbstractScene {
37public:
38 // member variables
39 // NOLINTBEGIN
40 ::ll::TypedStorage<4, 4, int> mWidth;
41 ::ll::TypedStorage<4, 4, int> mHeight;
42 ::ll::TypedStorage<1, 1, bool> mShouldSendEvents;
43 ::ll::TypedStorage<1, 1, bool> mWantsTextOnly;
44 ::ll::TypedStorage<1, 1, bool> mIsPopped;
45 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::AbstractScreenSetupCleanupStrategy>> mScreenSetupCleanup;
46 // NOLINTEND
47
48public:
49 // virtual functions
50 // NOLINTBEGIN
51 virtual ~BaseScreen() /*override*/;
52
53 virtual void setupForRendering(::ScreenContext& screenContext);
54
55 virtual void cleanupForRendering(::ScreenContext& screenContext);
56
57 virtual void setScreenSetupCleanup(::std::unique_ptr<::AbstractScreenSetupCleanupStrategy> screenSetupCleanup);
58
59 virtual void init(::ScreenSizeData const& screenSizeData) /*override*/;
60
61 virtual void setSize(::ScreenSizeData const& screenSizeData) /*override*/;
62
63 virtual void onSetKeyboardHeight(float keyboardHeight) /*override*/;
64
65 virtual void onInternetUpdate() /*override*/;
66
67 virtual void onFocusGained() /*override*/;
68
69 virtual void onFocusLost() /*override*/;
70
71 virtual void terminate() /*override*/;
72
73 virtual void onCreation() /*override*/;
74
75 virtual void onLeave() /*override*/;
76
77 virtual void onGameEventNotification(::ui::GameEventNotification notification) /*override*/;
78
79 virtual void leaveScreen() /*override*/;
80
81 virtual void preFrameTick() /*override*/;
82
83 virtual void tick(int nTick, int maxTick) /*override*/;
84
85 virtual void frameUpdate(::MinecraftUIFrameUpdateContext& frameUpdateContext) /*override*/;
86
87 virtual void applyInput(float a) /*override*/;
88
89 virtual void preRenderUpdate(::ScreenContext& screenContext) /*override*/;
90
91 virtual void prepareFrame(::ScreenContext& screenContext) /*override*/;
92
93 virtual void render(::ScreenContext&, ::FrameRenderObject const&) = 0;
94
95 virtual void postRenderUpdate(::ScreenContext& screenContext) /*override*/;
96
97 virtual void handleInputModeChanged(::InputMode) /*override*/;
98
99 virtual void handleButtonPress(uint buttonId, ::FocusImpact focusImpact) /*override*/;
100
101 virtual void handleButtonRelease(uint buttonId, ::FocusImpact focusImpact) /*override*/;
102
103 virtual void handleRawInputEvent(int, ::RawInputType, ::ButtonState, bool) /*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) /*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>&) const /*override*/;
178
179 virtual int getScreenVersion() const /*override*/;
180
181 virtual void processBufferedTextCharEvents(::std::vector<::TextCharEventData> const& bufferedEvents) /*override*/;
182
183 virtual bool getShouldSendEvents() /*override*/;
184
185 virtual void setShouldSendEvents(bool sendEvents) /*override*/;
186
187 virtual bool getWantsTextOnly() /*override*/;
188
189 virtual void setWantsTextOnly(bool textOnly) /*override*/;
190
191 virtual void onDelete(::CachedScenes& cache, ::TaskGroup& taskGroup) /*override*/;
192
193 virtual bool isGamepadCursorEnabled() const /*override*/;
194
195 virtual bool isGamepadDeflectionModeEnabled() const /*override*/;
196
197 virtual ::glm::vec2 const& getGamepadCursorPosition() const /*override*/;
198
199 virtual void cleanInputComponents() /*override*/;
200
201 virtual ::std::weak_ptr<::AbstractSceneProxy> getProxy() /*override*/;
202
203 virtual bool canBePushed() const /*override*/;
204
205 virtual bool canBePopped() const /*override*/;
206
207 virtual bool canBeTransitioned() const /*override*/;
208
209 virtual void
210 onScreenExit(bool isPopping, bool doScreenTransitions, ::std::shared_ptr<::AbstractScene> pushedScene) /*override*/;
211
212 virtual void onScreenEntrance(bool isRevisiting, bool doScreenTransitions) /*override*/;
213
214 virtual bool isEntering() const /*override*/;
215
216 virtual bool isExiting() const /*override*/;
217
218 virtual void schedulePop() /*override*/;
219
220 virtual bool isTerminating() const /*override*/;
221
222 virtual bool loadScreenImmediately() const /*override*/;
223
224 virtual bool forceUpdateActiveSceneStackWhenPushed() const /*override*/;
225
226 virtual bool hasFinishedLoading() const /*override*/;
227
228 virtual void sendScreenEvent(::std::string const&, ::std::string const&) /*override*/;
229
230 virtual void setDebugSettings(::OreUI::ViewDebugSettings const&) const /*override*/;
231
232 virtual void setScreenState(::std::vector<::std::pair<::std::string_view, ::std::string_view>> const&) /*override*/;
233
234 virtual ::Bedrock::NonOwnerPointer<::OreUI::Debug::ISceneDataProvider const> getDebugDataProvider() const
235 /*override*/;
236 // NOLINTEND
237
238public:
239 // static functions
240 // NOLINTBEGIN
241 MCAPI static void drawRectangleArea(
242 ::ScreenContext& screenContext,
243 ::RectangleArea const& a,
244 int ux,
245 int vy,
246 float uvWidth,
247 float uvHeight,
248 float us,
249 float vs,
250 float px,
251 float py
252 );
253 // NOLINTEND
254
255public:
256 // destructor thunk
257 // NOLINTBEGIN
258 MCAPI void $dtor();
259 // NOLINTEND
260
261public:
262 // virtual function thunks
263 // NOLINTBEGIN
264 MCAPI void $setupForRendering(::ScreenContext& screenContext);
265
266 MCAPI void $cleanupForRendering(::ScreenContext& screenContext);
267
268 MCAPI void $setScreenSetupCleanup(::std::unique_ptr<::AbstractScreenSetupCleanupStrategy> screenSetupCleanup);
269
270 MCFOLD void $init(::ScreenSizeData const& screenSizeData);
271
272 MCAPI void $setSize(::ScreenSizeData const& screenSizeData);
273
274 MCFOLD void $onSetKeyboardHeight(float keyboardHeight);
275
276 MCFOLD void $onInternetUpdate();
277
278 MCFOLD void $onFocusGained();
279
280 MCFOLD void $onFocusLost();
281
282 MCFOLD void $terminate();
283
284 MCFOLD void $onCreation();
285
286 MCFOLD void $onLeave();
287
288 MCFOLD void $onGameEventNotification(::ui::GameEventNotification notification);
289
290 MCFOLD void $leaveScreen();
291
292 MCFOLD void $preFrameTick();
293
294 MCFOLD void $tick(int nTick, int maxTick);
295
296 MCFOLD void $frameUpdate(::MinecraftUIFrameUpdateContext& frameUpdateContext);
297
298 MCFOLD void $applyInput(float a);
299
300 MCFOLD void $preRenderUpdate(::ScreenContext& screenContext);
301
302 MCFOLD void $prepareFrame(::ScreenContext& screenContext);
303
304 MCFOLD void $postRenderUpdate(::ScreenContext& screenContext);
305
306 MCFOLD void $handleButtonPress(uint buttonId, ::FocusImpact focusImpact);
307
308 MCFOLD void $handleButtonRelease(uint buttonId, ::FocusImpact focusImpact);
309
310 MCFOLD bool
311 $handlePointerLocation(::PointerLocationEventData const& pointerLocationData, ::FocusImpact focusImpact);
312
313 MCFOLD void $handlePointerPressed(bool pressed);
314
315 MCFOLD void $handleDirection(::DirectionId directionId, float x, float y, ::FocusImpact focusImpact);
316
317 MCFOLD void $handleTextChar(::std::string const& inputUtf8, ::FocusImpact focusImpact);
318
319 MCFOLD void $handleCaretLocation(int caretLocation, ::FocusImpact focusImpact);
320
321 MCFOLD void $handleTouchPadTouch(::TouchPadTouchEventData const& touchEventData, ::FocusImpact focusImpact);
322
323 MCFOLD void $setTextboxText(::std::string const& text, ::TextboxTextUpdateReason);
324
325 MCFOLD void $onKeyboardDismissed();
326
327 MCFOLD void $handleLicenseChanged();
328
329 MCFOLD bool $renderGameBehind() const;
330
331 MCFOLD bool $absorbsInput() const;
332
333 MCFOLD bool $closeOnPlayerHurt() const;
334
335 MCFOLD bool $useCustomPocketToast() const;
336
337 MCFOLD bool $isModal() const;
338
339 MCFOLD bool $isEditorMode() const;
340
341 MCFOLD bool $isShowingMenu() const;
342
343 MCFOLD bool $shouldStealMouse() const;
344
345 MCFOLD bool $screenIsNotFlushable() const;
346
347 MCFOLD bool $alwaysAcceptsInput() const;
348
349 MCFOLD bool $screenDrawsLast() const;
350
351 MCFOLD bool $isPlayScreen() const;
352
353 MCFOLD bool $renderOnlyWhenTopMost() const;
354
355 MCFOLD bool $lowFreqRendering() const;
356
357 MCFOLD bool $ignoreAsTop() const;
358
359 MCFOLD bool $shouldBeSkippedInAutomation() const;
360
361 MCFOLD ::std::vector<::RectangleArea> $getInputAreas() const;
362
363 MCFOLD int $getWidth();
364
365 MCFOLD int $getHeight();
366
367 MCFOLD void $reload();
368
369 MCAPI ::EyeRenderingModeBit $getEyeRenderingMode() const;
370
371 MCFOLD ::ui::SceneType $getSceneType() const;
372
373 MCFOLD ::std::string $getRawScreenName() const;
374
375 MCAPI ::std::string $getRoute() const;
376
377 MCFOLD ::std::string $getScreenTelemetryName() const;
378
379 MCFOLD void $addEventProperties(::std::unordered_map<::std::string, ::std::string>&) const;
380
381 MCFOLD int $getScreenVersion() const;
382
383 MCFOLD void $processBufferedTextCharEvents(::std::vector<::TextCharEventData> const& bufferedEvents);
384
385 MCFOLD bool $getShouldSendEvents();
386
387 MCFOLD void $setShouldSendEvents(bool sendEvents);
388
389 MCFOLD bool $getWantsTextOnly();
390
391 MCAPI void $setWantsTextOnly(bool textOnly);
392
393 MCFOLD void $onDelete(::CachedScenes& cache, ::TaskGroup& taskGroup);
394
395 MCFOLD bool $isGamepadCursorEnabled() const;
396
397 MCFOLD bool $isGamepadDeflectionModeEnabled() const;
398
399 MCAPI ::glm::vec2 const& $getGamepadCursorPosition() const;
400
401 MCFOLD void $cleanInputComponents();
402
403 MCFOLD ::std::weak_ptr<::AbstractSceneProxy> $getProxy();
404
405 MCFOLD bool $canBePushed() const;
406
407 MCFOLD bool $canBePopped() const;
408
409 MCFOLD bool $canBeTransitioned() const;
410
411 MCAPI void $onScreenExit(bool isPopping, bool doScreenTransitions, ::std::shared_ptr<::AbstractScene> pushedScene);
412
413 MCFOLD void $onScreenEntrance(bool isRevisiting, bool doScreenTransitions);
414
415 MCFOLD bool $isEntering() const;
416
417 MCFOLD bool $isExiting() const;
418
419 MCAPI void $schedulePop();
420
421 MCFOLD bool $isTerminating() const;
422
423 MCFOLD bool $loadScreenImmediately() const;
424
425 MCFOLD bool $forceUpdateActiveSceneStackWhenPushed() const;
426
427 MCFOLD bool $hasFinishedLoading() const;
428
429 MCFOLD void $sendScreenEvent(::std::string const&, ::std::string const&);
430
431 MCFOLD void $setDebugSettings(::OreUI::ViewDebugSettings const&) const;
432
433 MCFOLD void $setScreenState(::std::vector<::std::pair<::std::string_view, ::std::string_view>> const&);
434
435 MCFOLD ::Bedrock::NonOwnerPointer<::OreUI::Debug::ISceneDataProvider const> $getDebugDataProvider() const;
436 // NOLINTEND
437
438public:
439 // vftables
440 // NOLINTBEGIN
441 MCNAPI static void** $vftable();
442 // NOLINTEND
443};
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 ISceneDataProvider.h:7
Definition RectangleArea.h:5
Definition ScreenContext.h:5
Definition TaskGroup.h:53
Definition FrameRenderObject.h:5
Definition MinecraftUIFrameUpdateContext.h:5
Definition ViewDebugSettings.h:7
Definition PointerLocationEventData.h:8
Definition ScreenSizeData.h:5
Definition TextCharEventData.h:5
Definition TouchPadTouchEventData.h:5