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