LeviLamina
Loading...
Searching...
No Matches
ScreenController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/GameEventNotification.h"
8#include "mc/client/gui/SceneType.h"
9#include "mc/client/gui/ViewRequest.h"
10#include "mc/client/gui/screens/ScreenViewCommand.h"
11#include "mc/client/gui/screens/interfaces/IScreenController.h"
12#include "mc/deps/input/enums/ButtonState.h"
13#include "mc/platform/brstd/move_only_function.h"
14
15// auto generated forward declare list
16// clang-format off
17class BlockPos;
19class StringHash;
20class TaskGroup;
21class TaskResult;
22class UIPropertyBag;
23struct ActorUniqueID;
26struct ItemRendererData;
29struct ScreenEvent;
34namespace Json { class Value; }
35namespace mce { class Color; }
36// clang-format on
37
39public:
40 // ScreenController inner types declare
41 // clang-format off
43 // clang-format on
44
45 // ScreenController inner types define
46 enum class PreviousButtonStateRequirement : int {
47 Any = 0,
48 Down = 1,
49 Up = 2,
50 NotDown = 3,
51 NotUp = 4,
52 };
53
54 enum class SliderChangeType : int {
55 AnyChange = 0,
56 NotFinalized = 1,
57 Finalized = 2,
58 };
59
61
62 using FocusMoveEventHandlerCallback =
63 ::brstd::move_only_function<::ui::ViewRequest(::FocusMoveScreenEventData&) const>;
64
65 using InputModeChangedEventHandlerCallback =
66 ::brstd::move_only_function<::ui::ViewRequest(::InputModeChangeScreenEventData&) const>;
67
68 using PointerHeldEventHandlerCallback =
69 ::brstd::move_only_function<::ui::ViewRequest(::PointerHeldScreenEventData&) const>;
70
71 using ButtonEventHandlerCallback = ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>;
72
73 using TextEventHandlerCallback =
74 ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const>;
75
76 using ToggleChangeEventHandlerCallback =
77 ::brstd::move_only_function<::ui::ViewRequest(::ToggleChangeEventData&) const>;
78
79 using TextEditSelectedStateChangeEventHandlerCallback =
80 ::brstd::move_only_function<::ui::ViewRequest(::TextEditSelectedStateChangeEventData&) const>;
81
82 using SliderChangeEventHandlerCallback = ::brstd::move_only_function<::ui::ViewRequest(int, float) const>;
83
84 using AnimationEventHandlerCallback = ::brstd::move_only_function<::ui::ViewRequest() const>;
85
86 using RawInputEventHandlerCallback =
87 ::brstd::move_only_function<::ui::ViewRequest(::RawInputScreenEventData&) const>;
88
89 using ClippedCollectionEventHandlerCallback =
90 ::brstd::move_only_function<::ui::ViewRequest(int, int, ::UIPropertyBag&) const>;
91
92 using ClipStateChangeEventHandlerCallback =
93 ::brstd::move_only_function<::ui::ViewRequest(bool, ::UIPropertyBag&) const>;
94
95 using CustomRendererEventHandlerCallback = ::brstd::move_only_function<::ui::ViewRequest() const>;
96
97 using BindPredicate = ::brstd::move_only_function<bool() const>;
98
99 using BindStringCallback = ::brstd::move_only_function<::std::string() const>;
100
101 using BindBoolCallback = ::brstd::move_only_function<bool() const>;
102
103 using BindIntCallback = ::brstd::move_only_function<int() const>;
104
105 using BindFloatCallback = ::brstd::move_only_function<float() const>;
106
107 using BindGridSizeCallback = ::brstd::move_only_function<::glm::ivec2() const>;
108
109 using BindGlobalGridSizeCallback = ::brstd::move_only_function<void(::std::string const&, ::UIPropertyBag&) const>;
110
111 using BindColorCallback = ::brstd::move_only_function<::mce::Color() const>;
112
113 using BindColorWithBagCallback = ::brstd::move_only_function<::mce::Color(::UIPropertyBag&) const>;
114
115 using BindCollectionPredicate = ::brstd::move_only_function<bool(int) const>;
116
117 using BindStringForCollectionCallback = ::brstd::move_only_function<::std::string(int) const>;
118
119 using BindBoolForCollectionCallback = ::brstd::move_only_function<bool(int) const>;
120
121 using BindFloatForCollectionCallback = ::brstd::move_only_function<float(int) const>;
122
123 using BindIntForCollectionCallback = ::brstd::move_only_function<int(int) const>;
124
125 using BindColorForCollectionCallback = ::brstd::move_only_function<::mce::Color(int) const>;
126
127 using BindAnyCollectionPredicate = ::brstd::move_only_function<bool(::std::string const&, int) const>;
128
129 using BindItemDataForAnyCollectionCallback =
130 ::brstd::move_only_function<::ItemRendererData(::std::string const&, int) const>;
131
132 using BindStringForAnyCollectionCallback =
133 ::brstd::move_only_function<::std::string(::std::string const&, int) const>;
134
135 using BindBoolForAnyCollectionCallback = ::brstd::move_only_function<bool(::std::string const&, int) const>;
136
137 using BindIntForAnyCollectionCallback = ::brstd::move_only_function<int(::std::string const&, int) const>;
138
139 using BindFloatForAnyCollectionCallback = ::brstd::move_only_function<float(::std::string const&, int) const>;
140
141 using BindDoubleForAnyCollectionCallback = ::brstd::move_only_function<double(::std::string const&, int) const>;
142
143 using BindForAnyCollectionCallback =
144 ::brstd::move_only_function<void(int, ::std::string const&, ::UIPropertyBag&) const>;
145
146 using BindForCollectionCallback =
147 ::brstd::move_only_function<void(::std::string const&, int, ::std::string const&, ::UIPropertyBag&) const>;
148
149 using BindForGlobalCallback = ::brstd::move_only_function<void(::std::string const&, ::UIPropertyBag&) const>;
150
151 using ButtonEventCallbackKey = ::std::tuple<uint, ::ButtonState>;
152
153 using ButtonEventCallbackInfo = ::std::tuple<
154 ::ScreenController::PreviousButtonStateRequirement,
155 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>;
156
157 using ButtonEventCallbackInfoVector = ::std::vector<::std::tuple<
158 ::ScreenController::PreviousButtonStateRequirement,
159 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>>;
160
161 using ButtonEventCallbackMap = ::std::unordered_map<
162 ::std::tuple<uint, ::ButtonState>,
163 ::std::vector<::std::tuple<
164 ::ScreenController::PreviousButtonStateRequirement,
165 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>>,
166 ::ScreenController::ButtonEventCallbackKeyHasher,
167 ::std::equal_to<::std::tuple<uint, ::ButtonState>>>;
168
169 using ButtonInteractedEventCallbackVector =
170 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>;
171
172 using ButtonInteractedEventCallbackMap = ::std::
173 unordered_map<uint, ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>>;
174
175 using ToggleChangeEventCallbackVector =
176 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::ToggleChangeEventData&) const>>;
177
178 using ToggleChangeEventCallbackMap = ::std::unordered_map<
179 uint,
180 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::ToggleChangeEventData&) const>>>;
181
182 using TextEditSelectedStateChangeEventCallbackVector =
183 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::TextEditSelectedStateChangeEventData&) const>>;
184
185 using TextEditSelectedStateChangeEventCallbackMap = ::std::unordered_map<
186 uint,
187 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::TextEditSelectedStateChangeEventData&) const>>>;
188
189 using SliderChangeEventHandlerCallbackInfo = ::std::
190 tuple<::ScreenController::SliderChangeType, ::brstd::move_only_function<::ui::ViewRequest(int, float) const>>;
191
192 using SliderChangeEventCallbackVector = ::std::vector<::std::tuple<
193 ::ScreenController::SliderChangeType,
194 ::brstd::move_only_function<::ui::ViewRequest(int, float) const>>>;
195
196 using SliderChangeEventCallbackMap = ::std::unordered_map<
197 uint,
198 ::std::vector<::std::tuple<
199 ::ScreenController::SliderChangeType,
200 ::brstd::move_only_function<::ui::ViewRequest(int, float) const>>>>;
201
202 using TextEventHandlerCallbackInfo =
203 ::std::tuple<bool, ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const>>;
204
205 using TextEventHandlerCallbackVector = ::std::vector<
206 ::std::tuple<bool, ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const>>>;
207
208 using TextEventHandlerCallbackMap = ::std::unordered_map<
209 uint,
210 ::std::vector<
211 ::std::tuple<bool, ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const>>>>;
212
213 using AnimationEventHandlerCallbackVector = ::std::vector<::brstd::move_only_function<::ui::ViewRequest() const>>;
214
215 using AnimationEventHandlerCallbackMap =
216 ::std::unordered_map<uint, ::std::vector<::brstd::move_only_function<::ui::ViewRequest() const>>>;
217
218 using ClippedCollectionEventHandlerCallbackVector =
219 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(int, int, ::UIPropertyBag&) const>>;
220
221 using ClippedCollectionEventHandlerCallbackMap = ::std::unordered_map<
222 uint,
223 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(int, int, ::UIPropertyBag&) const>>>;
224
225 using ClipStateChangeHandlerCallbackVector =
226 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(bool, ::UIPropertyBag&) const>>;
227
228 using ClipStateChangeEventHandlerCallbackMap = ::std::unordered_map<
229 uint,
230 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(bool, ::UIPropertyBag&) const>>>;
231
232 using CustomRendererEventHandlerCallbackVector =
233 ::std::vector<::brstd::move_only_function<::ui::ViewRequest() const>>;
234
235 using CustomRendererEventHandlerCallbackMap =
236 ::std::unordered_map<uint, ::std::vector<::brstd::move_only_function<::ui::ViewRequest() const>>>;
237
238public:
239 // member variables
240 // NOLINTBEGIN
241 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string const&, ::UIPropertyBag const&)>>
242 mControlCreateCallback;
243 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string const&, ::std::string const&)>>
244 mControlDestroyCallback;
245 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string const&)>> mControlDestroyAllCallback;
246 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string const&)>> mScreenViewSendManualInputEventCallback;
247 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ScreenControllerProxy>> mProxy;
248 ::ll::TypedStorage<1, 1, bool> mCreateInitialized;
249 ::ll::TypedStorage<1, 1, bool> mInitialized;
250 ::ll::TypedStorage<1, 1, bool> mUsesErrorInfo;
251 ::ll::TypedStorage<8, 1472, ::ScreenViewCommand> mScreenViewCommand;
252 ::ll::TypedStorage<1, 1, bool> mIsScrollingLocked;
253 ::ll::TypedStorage<
254 8,
255 64,
256 ::std::unordered_map<
257 ::std::tuple<uint, ::ButtonState>,
258 ::std::vector<::std::tuple<
259 ::ScreenController::PreviousButtonStateRequirement,
260 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>>,
261 ::ScreenController::ButtonEventCallbackKeyHasher,
262 ::std::equal_to<::std::tuple<uint, ::ButtonState>>>>
263 mButtonEventCallbackMap;
264 ::ll::TypedStorage<
265 8,
266 64,
267 ::std::
268 unordered_map<uint, ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>>>
269 mButtonInteractedEventCallbackMap;
270 ::ll::TypedStorage<8, 64, ::brstd::move_only_function<::ui::ViewRequest(::RawInputScreenEventData&) const>>
271 mRawInputEventHandlerCallback;
272 ::ll::TypedStorage<
273 8,
274 24,
275 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::FocusMoveScreenEventData&) const>>>
276 mFocusMoveEventCallbacks;
277 ::ll::TypedStorage<
278 8,
279 24,
280 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::InputModeChangeScreenEventData&) const>>>
281 mInputModeChangedEventCallbacks;
282 ::ll::TypedStorage<
283 8,
284 24,
285 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::PointerHeldScreenEventData&) const>>>
286 mPointerHeldEventCallbacks;
287 ::ll::TypedStorage<
288 8,
289 64,
290 ::std::unordered_map<
291 uint,
292 ::std::vector<::std::tuple<
293 bool,
294 ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const>>>>>
295 mTextEditEventCallbackMap;
296 ::ll::TypedStorage<
297 8,
298 64,
299 ::std::unordered_map<
300 uint,
301 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::ToggleChangeEventData&) const>>>>
302 mToggleChangeEventCallbackMap;
303 ::ll::TypedStorage<
304 8,
305 64,
306 ::std::unordered_map<
307 uint,
308 ::std::vector<
309 ::brstd::move_only_function<::ui::ViewRequest(::TextEditSelectedStateChangeEventData&) const>>>>
310 mTextEditSelectedStateChangeEventCallbackMap;
311 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::ScreenController>>> mSubControllers;
312 ::ll::TypedStorage<
313 8,
314 64,
315 ::std::unordered_map<
316 uint,
317 ::std::vector<::std::tuple<
318 ::ScreenController::SliderChangeType,
319 ::brstd::move_only_function<::ui::ViewRequest(int, float) const>>>>>
320 mSliderChangeEventCallbackMap;
321 ::ll::TypedStorage<
322 8,
323 64,
324 ::std::unordered_map<uint, ::std::vector<::brstd::move_only_function<::ui::ViewRequest() const>>>>
325 mAnimationEventCallbackMap;
326 ::ll::TypedStorage<
327 8,
328 64,
329 ::std::unordered_map<
330 uint,
331 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(int, int, ::UIPropertyBag&) const>>>>
332 mClippedCollectionEventCallbackMap;
333 ::ll::TypedStorage<
334 8,
335 64,
336 ::std::unordered_map<
337 uint,
338 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(bool, ::UIPropertyBag&) const>>>>
339 mClipStateChangeEventCallbackMap;
340 ::ll::TypedStorage<
341 8,
342 64,
343 ::std::unordered_map<uint, ::std::vector<::brstd::move_only_function<::ui::ViewRequest() const>>>>
344 mCustomRendererEventHandlerCallbackMap;
345 ::ll::TypedStorage<
346 8,
347 64,
348 ::std::unordered_map<uint, ::brstd::move_only_function<void(::std::string const&, ::UIPropertyBag&)>>>
349 mBindCallbacks;
350 ::ll::TypedStorage<
351 8,
352 64,
353 ::std::unordered_map<uint, ::brstd::move_only_function<void(int, ::std::string const&, ::UIPropertyBag&)>>>
354 mCollectionBindCallbacks;
355 ::ll::TypedStorage<
356 8,
357 64,
358 ::std::unordered_map<
359 uint,
360 ::brstd::move_only_function<void(::std::string const&, int, ::std::string const&, ::UIPropertyBag&)>>>
361 mAnyCollectionBindCallbacks;
362 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mTaskGroup;
363 // NOLINTEND
364
365public:
366 // prevent constructor by default
367 ScreenController();
368
369public:
370 // virtual functions
371 // NOLINTBEGIN
372 virtual ~ScreenController() /*override*/;
373
374 virtual ::ui::DirtyFlag tick() /*override*/;
375
376 virtual void preFrameTick() /*override*/;
377
378 virtual ::ui::ViewRequest handleEvent(::ScreenEvent& screenEvent) /*override*/;
379
380 virtual ::std::optional<::std::string> getRoute() const /*override*/;
381
382 virtual void setScreenState(::std::vector<::std::pair<::std::string_view, ::std::string_view>> const&) /*override*/;
383
384 virtual void onOpen();
385
386 virtual void queueTitleNarration();
387
388 virtual void onTerminate();
389
390 virtual void onInit();
391
392 virtual void onDelete();
393
394 virtual bool canExit();
395
396 virtual ::ui::ViewRequest tryExit();
397
398 virtual void onCreation();
399
400 virtual void onReload();
401
402 virtual void onLeave();
403
404 virtual void leaveScreen(::std::string const& expectedScreenName);
405
406 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification);
407
408 virtual bool bind(
409 ::std::string const& collectionName,
410 uint collectionNameHash,
411 int collectionIndex,
412 ::std::string const& bindingName,
413 uint bindingNameHash,
414 ::std::string const& bindingNameOverride,
415 ::UIPropertyBag& bag
416 );
417
418 virtual bool bind(
419 ::std::string const& bindingName,
420 uint bindingNameHash,
421 ::std::string const& bindingNameOverride,
422 ::UIPropertyBag& bag
423 );
424
425 virtual void handleLicenseChanged();
426
427 virtual void setAssociatedBlockPos(::BlockPos const& pos);
428
429 virtual void setAssociatedEntityUniqueID(::ActorUniqueID const unqiueID);
430
431 virtual void setSuspendInput(bool suspendInput);
432
433 virtual void setSuspendDirectionalInput(bool suspendDirectionalInput);
434
435 virtual void setViewCommand(::ScreenViewCommand const& callback);
436
437 virtual void addStaticScreenVars(::Json::Value& globalVars);
438
439 virtual ::std::string getAdditionalScreenInfo() const;
440
441 virtual ::std::string getTelemetryOverride() const;
442
443 virtual void addEventProperties(::std::unordered_map<::std::string, ::std::string>& eventProperties) const;
444
445 virtual ::ui::SceneType getSceneType() const;
446
447 virtual int getScreenVersion() const;
448
449 virtual uint getSceneId() const;
450
451 virtual ::ScreenControllerProxy* getProxy();
452
453 virtual void onEntered();
454
455 virtual void onScreenPushedAbove();
456
457 virtual void onEntering();
458
459 virtual bool _doesScreenHaveExitBehavior() const;
460
461 virtual bool _isContainerScreen() const;
462 // NOLINTEND
463
464public:
465 // member functions
466 // NOLINTBEGIN
467 MCAPI explicit ScreenController(bool useTaskGroup);
468
469 MCFOLD uint _getNameId(::std::string const& name) const;
470
471 MCAPI ::ui::ViewRequest _handleButtonEvent(::ScreenEvent& screenEvent);
472
473 MCAPI ::ui::ViewRequest _handleEvent(::ScreenEvent& screenEvent);
474
475 MCAPI ::ui::ViewRequest _handleSliderChangeEvent(::SliderChangeEventData& sliderChangeEvent);
476
477 MCAPI void _registerSubController(::std::shared_ptr<::ScreenController> controller);
478
479 MCAPI void bindBool(
480 ::StringHash const& bindingName,
481 ::brstd::move_only_function<bool() const> callback,
482 ::brstd::move_only_function<bool() const> condition
483 );
484
485 MCAPI void bindBoolForAnyCollection(
486 ::StringHash const& bindingName,
487 ::brstd::move_only_function<bool(::std::string const&, int) const> callback,
488 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
489 );
490
491 MCAPI void bindBoolForCollection(
492 ::StringHash const& collectionName,
493 ::StringHash const& bindingName,
494 ::brstd::move_only_function<bool(int) const> callback,
495 ::brstd::move_only_function<bool(int) const> condition
496 );
497
498 MCAPI void bindColor(
499 ::StringHash const& bindingName,
500 ::brstd::move_only_function<::mce::Color() const> callback,
501 ::brstd::move_only_function<bool() const> condition
502 );
503
504 MCAPI void bindColorForCollection(
505 ::StringHash const& collectionName,
506 ::StringHash const& bindingName,
507 ::brstd::move_only_function<::mce::Color(int) const> callback,
508 ::brstd::move_only_function<bool(int) const> condition
509 );
510
511 MCAPI void bindColorWithPropertyBag(
512 ::StringHash const& bindingName,
513 ::brstd::move_only_function<::mce::Color(::UIPropertyBag&) const> callback,
514 ::brstd::move_only_function<bool() const> condition
515 );
516
517 MCAPI void bindDoubleForAnyCollection(
518 ::StringHash const& bindingName,
519 ::brstd::move_only_function<double(::std::string const&, int) const> callback,
520 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
521 );
522
523 MCAPI void bindFloat(
524 ::StringHash const& bindingName,
525 ::brstd::move_only_function<float() const> callback,
526 ::brstd::move_only_function<bool() const> condition
527 );
528
529 MCAPI void bindFloatForAnyCollection(
530 ::StringHash const& bindingName,
531 ::brstd::move_only_function<float(::std::string const&, int) const> callback,
532 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
533 );
534
535 MCAPI void bindFloatForCollection(
536 ::StringHash const& collectionName,
537 ::StringHash const& bindingName,
538 ::brstd::move_only_function<float(int) const> callback,
539 ::brstd::move_only_function<bool(int) const> condition
540 );
541
542 MCAPI void bindForAnyCollection(
543 ::StringHash const& bindingName,
544 ::brstd::move_only_function<void(int, ::std::string const&, ::UIPropertyBag&) const> callback,
545 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
546 );
547
548 MCAPI void bindForAnyCollection(
549 ::StringHash const& bindingName,
550 ::brstd::move_only_function<void(::std::string const&, int, ::std::string const&, ::UIPropertyBag&) const>
551 callback,
552 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
553 );
554
555 MCAPI void bindForCollection(
556 ::StringHash const& collectionName,
557 ::StringHash const& bindingName,
558 ::brstd::move_only_function<void(int, ::std::string const&, ::UIPropertyBag&) const> func
559 );
560
561 MCAPI void bindForGlobal(
562 ::StringHash const& bindingName,
563 ::brstd::move_only_function<void(::std::string const&, ::UIPropertyBag&) const> func
564 );
565
566 MCAPI void bindForGlobalGridSize(
567 ::StringHash const& bindingName,
568 ::brstd::move_only_function<void(::std::string const&, ::UIPropertyBag&) const> callback,
569 ::brstd::move_only_function<bool() const> condition
570 );
571
572 MCAPI void bindGridSize(
573 ::StringHash const& bindingName,
574 ::brstd::move_only_function<::glm::ivec2() const> callback,
575 ::brstd::move_only_function<bool() const> condition
576 );
577
578 MCAPI void bindInt(
579 ::StringHash const& bindingName,
580 ::brstd::move_only_function<int() const> callback,
581 ::brstd::move_only_function<bool() const> condition
582 );
583
584 MCAPI void bindIntForAnyCollection(
585 ::StringHash const& bindingName,
586 ::brstd::move_only_function<int(::std::string const&, int) const> callback,
587 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
588 );
589
590 MCAPI void bindIntForCollection(
591 ::StringHash const& collectionName,
592 ::StringHash const& bindingName,
593 ::brstd::move_only_function<int(int) const> callback,
594 ::brstd::move_only_function<bool(int) const> condition
595 );
596
597 MCAPI void bindItemDataForAnyCollection(
598 ::StringHash const& bindingName,
599 ::brstd::move_only_function<::ItemRendererData(::std::string const&, int) const> callback,
600 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
601 );
602
603 MCAPI void bindString(
604 ::StringHash const& bindingName,
605 ::brstd::move_only_function<::std::string() const> callback,
606 ::brstd::move_only_function<bool() const> condition
607 );
608
609 MCAPI void bindStringForAnyCollection(
610 ::StringHash const& bindingName,
611 ::brstd::move_only_function<::std::string(::std::string const&, int) const> callback,
612 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
613 );
614
615 MCAPI void bindStringForCollection(
616 ::StringHash const& collectionName,
617 ::StringHash const& bindingName,
618 ::brstd::move_only_function<::std::string(int) const> callback,
619 ::brstd::move_only_function<bool(int) const> condition
620 );
621
622 MCAPI void focusControl(::std::string const& controlName, bool delayed);
623
624 MCAPI void
625 focusControl(::std::string const& focusId, ::std::string const& collectionIndexName, int collectionIndex);
626
627 MCFOLD uint getNameId(::std::string const& name) const;
628
629 MCAPI bool hasFinishedAsyncTasks() const;
630
631 MCAPI void prepareFocusForModalPopup();
632
633 MCAPI void queueAsyncTask(::brstd::move_only_function<::TaskResult()>&& task, ::std::function<void()>&& callback);
634
635 MCAPI void
636 registerAnimationEventHandler(uint eventId, ::brstd::move_only_function<::ui::ViewRequest() const> callback);
637
638 MCAPI void registerButtonEventHandler(
639 uint buttonId,
640 ::ButtonState currentState,
641 ::ButtonState previousState,
642 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const> callback
643 );
644
645 MCAPI void registerButtonEventHandler(
646 uint buttonId,
647 ::ButtonState currentState,
648 ::ScreenController::PreviousButtonStateRequirement previousStateRequirement,
649 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const> callback
650 );
651
652 MCAPI void registerButtonInteractedHandler(
653 uint buttonId,
654 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const> callback
655 );
656
657 MCAPI void registerButtonPressedHandler(
658 uint buttonId,
659 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const> callback
660 );
661
662 MCAPI void registerButtonReleasedHandler(
663 uint buttonId,
664 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const> callback
665 );
666
667 MCAPI void registerClipStateChangeEventHandler(
668 uint eventId,
669 ::brstd::move_only_function<::ui::ViewRequest(bool, ::UIPropertyBag&) const> callback
670 );
671
672 MCAPI void registerClippedCollectionEventHandler(
673 ::StringHash const& collectionName,
674 ::brstd::move_only_function<::ui::ViewRequest(int, int, ::UIPropertyBag&) const> callback
675 );
676
677 MCAPI void
678 registerCustomRendererEventHandler(uint eventId, ::brstd::move_only_function<::ui::ViewRequest() const> callback);
679
680 MCAPI void registerFocusMovedEventHandler(
681 ::brstd::move_only_function<::ui::ViewRequest(::FocusMoveScreenEventData&) const> callback
682 );
683
684 MCAPI void registerInputModechangedEventHandler(
685 ::brstd::move_only_function<::ui::ViewRequest(::InputModeChangeScreenEventData&) const> callback
686 );
687
688 MCAPI void registerPointerHeldEventHandler(
689 ::brstd::move_only_function<::ui::ViewRequest(::PointerHeldScreenEventData&) const> callback
690 );
691
692 MCAPI void registerRawInputEventHandler(
693 ::brstd::move_only_function<::ui::ViewRequest(::RawInputScreenEventData&) const> callback
694 );
695
696 MCAPI void registerSliderChangedEventHandler(
697 uint buttonId,
698 ::brstd::move_only_function<::ui::ViewRequest(int, float) const> callback
699 );
700
701 MCAPI void registerSliderFinishedEventHandler(
702 uint buttonId,
703 ::brstd::move_only_function<::ui::ViewRequest(int, float) const> callback
704 );
705
706 MCAPI void registerSliderNotFinishedEventHandler(
707 uint buttonId,
708 ::brstd::move_only_function<::ui::ViewRequest(int, float) const> callback
709 );
710
711 MCAPI void registerTextEditChangedEventHandler(
712 uint buttonId,
713 ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const> callback
714 );
715
716 MCAPI void registerTextEditFinishedEventHandler(
717 uint buttonId,
718 ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const> callback
719 );
720
721 MCAPI void registerTextEditSelectedStateChangeEventHandler(
722 uint buttonId,
723 ::brstd::move_only_function<::ui::ViewRequest(::TextEditSelectedStateChangeEventData&) const> callback
724 );
725
726 MCAPI void registerTextEventHandler(
727 ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const> callback
728 );
729
730 MCAPI void registerToggleChangeEventHandler(
731 uint buttonId,
732 ::brstd::move_only_function<::ui::ViewRequest(::ToggleChangeEventData&) const> callback
733 );
734 // NOLINTEND
735
736public:
737 // constructor thunks
738 // NOLINTBEGIN
739 MCAPI void* $ctor(bool useTaskGroup);
740 // NOLINTEND
741
742public:
743 // destructor thunk
744 // NOLINTBEGIN
745 MCAPI void $dtor();
746 // NOLINTEND
747
748public:
749 // virtual function thunks
750 // NOLINTBEGIN
751 MCAPI ::ui::DirtyFlag $tick();
752
753 MCFOLD void $preFrameTick();
754
755 MCAPI ::ui::ViewRequest $handleEvent(::ScreenEvent& screenEvent);
756
757 MCFOLD ::std::optional<::std::string> $getRoute() const;
758
759 MCFOLD void $setScreenState(::std::vector<::std::pair<::std::string_view, ::std::string_view>> const&);
760
761 MCAPI void $onOpen();
762
763 MCAPI void $queueTitleNarration();
764
765 MCAPI void $onTerminate();
766
767 MCAPI void $onInit();
768
769 MCFOLD void $onDelete();
770
771 MCAPI bool $canExit();
772
773 MCFOLD ::ui::ViewRequest $tryExit();
774
775 MCAPI void $onCreation();
776
777 MCFOLD void $onReload();
778
779 MCAPI void $onLeave();
780
781 MCFOLD void $leaveScreen(::std::string const& expectedScreenName);
782
783 MCAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
784
785 MCAPI bool $bind(
786 ::std::string const& collectionName,
787 uint collectionNameHash,
788 int collectionIndex,
789 ::std::string const& bindingName,
790 uint bindingNameHash,
791 ::std::string const& bindingNameOverride,
792 ::UIPropertyBag& bag
793 );
794
795 MCAPI bool $bind(
796 ::std::string const& bindingName,
797 uint bindingNameHash,
798 ::std::string const& bindingNameOverride,
799 ::UIPropertyBag& bag
800 );
801
802 MCFOLD void $handleLicenseChanged();
803
804 MCFOLD void $setAssociatedBlockPos(::BlockPos const& pos);
805
806 MCFOLD void $setAssociatedEntityUniqueID(::ActorUniqueID const unqiueID);
807
808 MCFOLD void $setSuspendInput(bool suspendInput);
809
810 MCFOLD void $setSuspendDirectionalInput(bool suspendDirectionalInput);
811
812 MCAPI void $setViewCommand(::ScreenViewCommand const& callback);
813
814 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
815
816 MCFOLD ::std::string $getAdditionalScreenInfo() const;
817
818 MCFOLD ::std::string $getTelemetryOverride() const;
819
820 MCFOLD void $addEventProperties(::std::unordered_map<::std::string, ::std::string>& eventProperties) const;
821
822 MCFOLD ::ui::SceneType $getSceneType() const;
823
824 MCFOLD int $getScreenVersion() const;
825
826 MCFOLD uint $getSceneId() const;
827
828 MCFOLD ::ScreenControllerProxy* $getProxy();
829
830 MCFOLD void $onEntered();
831
832 MCFOLD void $onScreenPushedAbove();
833
834 MCFOLD void $onEntering();
835
836 MCFOLD bool $_doesScreenHaveExitBehavior() const;
837
838 MCFOLD bool $_isContainerScreen() const;
839 // NOLINTEND
840
841public:
842 // vftables
843 // NOLINTBEGIN
844 MCNAPI static void** $vftable();
845 // NOLINTEND
846};
Definition BlockPos.h:21
Definition IScreenController.h:5
Definition Value.h:16
Definition ScreenControllerProxy.h:5
Definition ScreenController.h:5
static MCAPI void ** $vftable()
Definition StringHash.h:5
Definition TaskGroup.h:55
Definition TaskResult.h:5
Definition UIPropertyBag.h:5
Definition Color.h:13
Definition ActorUniqueID.h:10
Definition FocusMoveScreenEventData.h:5
Definition InputModeChangeScreenEventData.h:5
Definition ItemRendererData.h:5
Definition PointerHeldScreenEventData.h:5
Definition RawInputScreenEventData.h:5
Definition ScreenController.h:17
Definition ScreenEvent.h:5
Definition SliderChangeEventData.h:5
Definition TextEditScreenEventData.h:5
Definition TextEditSelectedStateChangeEventData.h:5
Definition ToggleChangeEventData.h:5