3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/GameEventNotification.h"
7#include "mc/client/gui/SceneType.h"
8#include "mc/client/gui/oreui/routing/RouteAction.h"
9#include "mc/client/gui/screens/interfaces/ISceneStack.h"
10#include "mc/deps/core/utility/NonOwnerPointer.h"
11#include "mc/deps/core/utility/pub_sub/Publisher.h"
12#include "mc/deps/core/utility/pub_sub/Subscription.h"
13#include "mc/platform/brstd/function_ref.h"
25namespace Bedrock::PubSub::ThreadModel {
struct MultiThreaded; }
44 enum class EventType :
int {
55 ::ll::TypedStorage<4, 4, ::SceneStack::SceneStackEvent::EventType> mType;
61 virtual ~SceneStackEvent() =
default;
69 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::AbstractScene>> mScene;
70 ::ll::TypedStorage<8, 48, ::std::optional<::OreUI::RouteAction>> mRouteAction;
80 virtual ~PushScreenEvent() =
default;
87 PushScreenEvent(::std::shared_ptr<::AbstractScene> scene, ::std::optional<::OreUI::RouteAction> routeAction);
93 MCAPI
void* $ctor(::std::shared_ptr<::AbstractScene> scene, ::std::optional<::OreUI::RouteAction> routeAction);
107 ::ll::TypedStorage<4, 4, int> mPopCount;
108 ::ll::TypedStorage<8, 48, ::std::optional<::OreUI::RouteAction>> mRouteAction;
109 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mExpectedScreenNames;
127 ::std::optional<::OreUI::RouteAction> routeAction,
128 ::std::vector<::std::string>
const& expectedScreenNames
137 ::std::optional<::OreUI::RouteAction> routeAction,
138 ::std::vector<::std::string>
const& expectedScreenNames
153 ::ll::TypedStorage<4, 4, ::ui::SceneType> mSceneType;
154 ::ll::TypedStorage<4, 4, ::ui::SceneType> mSceneTypeExclusions;
155 ::ll::TypedStorage<4, 4, int> mPopCount;
175 ::ll::TypedStorage<1, 1, bool> mIgnoreNotFlushableFlag;
176 ::ll::TypedStorage<1, 1, bool> mIgnoreTransitions;
177 ::ll::TypedStorage<8, 64, ::std::function<void()>> mPostFlushCallback;
210 ::ll::TypedStorage<8, 24, ::std::vector<::ISceneStack::SceneElement>> mScreenStack;
211 ::ll::TypedStorage<8, 8, ::CachedScenes&> mCachedScreens;
212 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::SceneStack::SceneStackEvent>>> mStackEvents;
213 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::SceneStack::SceneStackEvent>>> mQueuedStackEvents;
214 ::ll::TypedStorage<8, 24, ::std::vector<::ScreenThreshold>> mScreenThresholds;
215 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mDestroyScreenTaskGroup;
216 ::ll::TypedStorage<4, 4, int> mActiveStackSize;
217 ::ll::TypedStorage<4, 4, int> mScheduledScreenPushCount;
218 ::ll::TypedStorage<4, 4, int> mScheduledScreenPopCount;
219 ::ll::TypedStorage<1, 1, bool> mScreenNeedsEntrance;
220 ::ll::TypedStorage<8, 32, ::std::string> mLastPoppedScreenName;
221 ::ll::TypedStorage<1, 1, bool> mChangedThisFrame;
222 ::ll::TypedStorage<1, 1, bool> mScreenIsTicking;
223 ::ll::TypedStorage<1, 1, bool> mReloadScenesOnNextPop;
224 ::ll::TypedStorage<1, 1, bool> mDeferUpdatesUntilNextTick;
225 ::ll::TypedStorage<1, 1, bool> mBufferTextCharEvents;
226 ::ll::TypedStorage<8, 24, ::std::vector<::TextCharEventData>> mBufferedTextCharEventData;
227 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::OptionRegistry>> mOptions;
228 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mAsyncLoadOptionSubscription;
229 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mScreenAnimationsSubscription;
231 mSceneStackDestroyedPublisher;
232 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<
void*, ::std::function<void(
::AbstractScene&)>>>>
233 mSceneChangeCallbacks;
234 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<
void*, ::std::function<void(
::AbstractScene&)>>>>
235 mPrePushSceneCallbacks;
239 ::std::vector<::std::pair<
241 ::std::function<void(::std::shared_ptr<::AbstractScene>, ::std::optional<::OreUI::RouteAction>)>>>>
243 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<
void*, ::std::function<void(
::AbstractScene*)>>>>
244 mPrePopSceneCallbacks;
248 ::std::vector<::std::pair<
250 ::std::function<void(::std::shared_ptr<::AbstractScene>,
bool, ::std::optional<::OreUI::RouteAction>)>>>>
252 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SceneStackProxy>> mProxy;
253 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::UIEventCoordinator>> mUIEventCoordinator;
254 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mGetSuspended;
259 SceneStack& operator=(SceneStack
const&);
260 SceneStack(SceneStack
const&);
266 virtual ~SceneStack() ;
268 virtual void reload() ;
270 virtual void setOptions(::std::weak_ptr<::OptionRegistry> options) ;
273 registerSceneChangeCallback(
void* token, ::std::function<
void(
::AbstractScene&)> sceneChangeCallback) ;
275 virtual void unregisterSceneChangeCallback(
void* token) ;
277 virtual void registerPrePushSceneCallback(
282 virtual void unregisterPrePushSceneCallback(
void* token) ;
284 virtual void registerPushSceneCallback(
286 ::std::function<
void(::std::shared_ptr<::AbstractScene>, ::std::optional<::OreUI::RouteAction>)>
290 virtual void unregisterPushSceneCallback(
void* token) ;
293 registerPrePopSceneCallback(
void* token, ::std::function<
void(
::AbstractScene*)> prePopSceneCallback) ;
295 virtual void unregisterPrePopSceneCallback(
void* token) ;
297 virtual void registerPopSceneCallback(
299 ::std::function<
void(::std::shared_ptr<::AbstractScene>,
bool, ::std::optional<::OreUI::RouteAction>)>
303 virtual void unregisterPopSceneCallback(
void* token) ;
305 virtual void forEachVisibleScreen(
307 bool tickedLastFrame,
308 bool splitscreenRenderBypassThisFrame
316 virtual void forEachAlwaysAcceptInputScreen(
324 virtual void pushScreenWithRouteAction(
325 ::std::shared_ptr<::AbstractScene> newScreen,
331 virtual void pushScreen(::std::shared_ptr<::AbstractScene> newScreen,
bool flush) ;
333 virtual void schedulePopScreen(
int totalPopNumber) ;
336 schedulePopScreenWithExpectedNames(::std::vector<::std::string>
const& expectedScreenNames) ;
338 virtual void flushStack(
340 bool ignoreNotFlushableFlag,
341 bool ignoreTransitions,
342 ::std::function<
void()> postFlushCallback
345 virtual void deferUpdatesUntilNextTick() ;
347 virtual ::std::optional<uint64> getFirstSceneIndexOfSceneType(::ui::SceneType sceneType)
const ;
349 virtual bool popScreensBackTo(::ui::SceneType
const sceneType) ;
351 virtual bool popScreensBackToFirstInstanceOf(::ui::SceneType
const sceneType) ;
353 virtual bool popTopScreensOfType(::ui::SceneType
const sceneType) ;
355 virtual bool update() ;
357 virtual void resetScreenChangeDirtyFlag() ;
359 virtual bool hasChangedThisFrame() const ;
361 virtual
bool isEmpty() const ;
363 virtual uint64 getSize() const ;
365 virtual
void setScreenTickingFlag(
bool screenIsTicking) ;
367 virtual
bool getScreenTickingFlag() const ;
369 virtual ::ui::SceneType getNonTerminatingSceneType() const ;
371 virtual ::
std::vector<::
std::
string> getScreenNames() const ;
373 virtual ::
std::vector<::
std::
string> getScreenTelemetryNames() const ;
375 virtual ::
std::
string getScreenName() const ;
377 virtual ::
std::
string getScreenTelemetry() const ;
379 virtual ::
std::
string const& getLastPoppedScreenName() const ;
381 virtual
void handleLicenseChanged() ;
383 virtual
void onGameEventNotification(::ui::GameEventNotification notification) ;
395 virtual ::
std::shared_ptr<::
AbstractScene> getSharedNonTerminatingActiveScene() ;
397 virtual ::
std::shared_ptr<::
AbstractScene const> const getSharedNonTerminatingActiveScene() const ;
401 virtual
int getScheduledPopCount() const ;
403 virtual
bool isScreenReplaceable() const ;
405 virtual
void handleTextChar(::
std::
string const& inputUtf8) ;
407 virtual
void setBufferTextCharEvents(
bool pushTextCharEvents) ;
409 virtual
bool isBufferingTextCharEvents() const ;
411 virtual
bool isOnSceneStack(::ui::SceneType sceneType) const ;
413 virtual
bool isOnSceneStack(::
std::
string const& screenName) const ;
417 virtual
bool hasScheduledScreens() const ;
419 virtual
bool hasScheduledEvents() const ;
421 virtual
void setScreenThreshold(::
ScreenThreshold const& screenThreshold) ;
423 virtual ::Bedrock::PubSub::Subscription
424 registerSceneStackDestroyedListener(::
std::function<
void()> callback) ;
433 ::
std::function<
bool()> const& getSuspended
436 MCAPI
bool _animationsEnabled() const;
438 MCAPI
bool _handleFlushEvent(::SceneStack::
FlushScreenEvent const& flushEvent);
444 MCAPI
bool _popScreens(
446 bool ignoreTransitions,
447 ::
std::optional<::OreUI::RouteAction> routeAction,
448 ::
std::vector<::
std::
string> const& expectedScreenNames
451 MCAPI
bool _scenesAllIgnoreAsTop(
int count) const;
453 MCAPI
void _schedulePopScreen(
455 ::
std::optional<::OreUI::RouteAction> routeAction,
456 ::
std::vector<::
std::
string> const& expectedScreenNames
459 MCAPI
void _schedulePushScreen(
462 ::
std::optional<::OreUI::RouteAction> routeAction
469 MCAPI static
void _forEachVisibleScreen(
472 bool splitscreenRenderBypassThisFrame,
476 uint64 renderDrawLastScreens,
480 MCAPI static
void forEachVisibleScreen(
483 bool tickedLastFrame,
484 bool splitscreenRenderBypassThisFrame,
495 ::
std::function<
bool()> const& getSuspended
508 MCAPI
void $reload();
512 MCAPI
void $registerSceneChangeCallback(
void* token, ::
std::function<
void(::
AbstractScene&)> sceneChangeCallback);
514 MCAPI
void $unregisterSceneChangeCallback(
void* token);
516 MCAPI
void $registerPrePushSceneCallback(
void* token, ::
std::function<
void(::
AbstractScene&)> prePushSceneCallback);
518 MCAPI
void $unregisterPrePushSceneCallback(
void* token);
520 MCAPI
void $registerPushSceneCallback(
526 MCAPI
void $unregisterPushSceneCallback(
void* token);
528 MCAPI
void $registerPrePopSceneCallback(
void* token, ::
std::function<
void(::
AbstractScene*)> prePopSceneCallback);
530 MCAPI
void $unregisterPrePopSceneCallback(
void* token);
532 MCAPI
void $registerPopSceneCallback(
538 MCAPI
void $unregisterPopSceneCallback(
void* token);
540 MCAPI
void $forEachVisibleScreen(
542 bool tickedLastFrame,
543 bool splitscreenRenderBypassThisFrame
546 MCFOLD
void $forEachScreen(::brstd::function_ref<
bool(::
AbstractScene&)> callback,
bool topDown);
548 MCFOLD
void $forEachScreenConst(::brstd::function_ref<
bool(::
AbstractScene const&)> callback,
bool topDown) const;
550 MCAPI
void $forEachAlwaysAcceptInputScreen(
555 MCAPI
void $forEachAlwaysAcceptInputScreenWithTop(::brstd::function_ref<
void(::
AbstractScene&)> callback);
558 $pushScreenWithRouteAction(::
std::shared_ptr<::
AbstractScene> newScreen, ::OreUI::RouteAction const& routeAction);
560 MCAPI
void $popScreenWithRouteAction(::OreUI::RouteAction const& routeAction);
562 MCAPI
void $pushScreen(::
std::shared_ptr<::
AbstractScene> newScreen,
bool flush);
564 MCAPI
void $schedulePopScreen(
int totalPopNumber);
566 MCAPI
void $schedulePopScreenWithExpectedNames(::
std::vector<::
std::
string> const& expectedScreenNames);
568 MCAPI
void $flushStack(
570 bool ignoreNotFlushableFlag,
571 bool ignoreTransitions,
572 ::
std::function<
void()> postFlushCallback
575 MCAPI
void $deferUpdatesUntilNextTick();
577 MCAPI ::
std::optional<uint64> $getFirstSceneIndexOfSceneType(::ui::SceneType sceneType) const;
579 MCAPI
bool $popScreensBackTo(::ui::SceneType const sceneType);
581 MCAPI
bool $popScreensBackToFirstInstanceOf(::ui::SceneType const sceneType);
583 MCAPI
bool $popTopScreensOfType(::ui::SceneType const sceneType);
585 MCAPI
bool $update();
587 MCAPI
void $resetScreenChangeDirtyFlag();
589 MCFOLD
bool $hasChangedThisFrame() const;
591 MCFOLD
bool $isEmpty() const;
593 MCAPI uint64 $getSize() const;
595 MCAPI
void $setScreenTickingFlag(
bool screenIsTicking);
597 MCFOLD
bool $getScreenTickingFlag() const;
599 MCAPI ::ui::SceneType $getNonTerminatingSceneType() const;
601 MCAPI ::
std::vector<::
std::
string> $getScreenNames() const;
603 MCAPI ::
std::vector<::
std::
string> $getScreenTelemetryNames() const;
605 MCAPI ::
std::
string $getScreenName() const;
607 MCAPI ::
std::
string $getScreenTelemetry() const;
609 MCFOLD ::
std::
string const& $getLastPoppedScreenName() const;
611 MCAPI
void $handleLicenseChanged();
613 MCAPI
void $onGameEventNotification(::ui::GameEventNotification notification);
625 MCFOLD ::
std::shared_ptr<::
AbstractScene> $getSharedNonTerminatingActiveScene();
627 MCFOLD ::
std::shared_ptr<::
AbstractScene const> const $getSharedNonTerminatingActiveScene() const;
631 MCFOLD
int $getScheduledPopCount() const;
633 MCAPI
bool $isScreenReplaceable() const;
635 MCAPI
void $handleTextChar(::
std::
string const& inputUtf8);
637 MCFOLD
void $setBufferTextCharEvents(
bool pushTextCharEvents);
639 MCFOLD
bool $isBufferingTextCharEvents() const;
641 MCAPI
bool $isOnSceneStack(::ui::SceneType sceneType) const;
643 MCAPI
bool $isOnSceneStack(::
std::
string const& screenName) const;
647 MCAPI
bool $hasScheduledScreens() const;
649 MCAPI
bool $hasScheduledEvents() const;
651 MCAPI
void $setScreenThreshold(::
ScreenThreshold const& screenThreshold);
653 MCFOLD ::Bedrock::PubSub::Subscription $registerSceneStackDestroyedListener(::
std::function<
void()> callback);
Definition AbstractScene.h:5
Definition CachedScenes.h:5
Definition ISceneStack.h:5
Definition OptionRegistry.h:5
Definition SceneStackProxy.h:5
Definition SceneStack.h:30
static MCAPI void ** $vftable()
Definition SceneStack.h:28
static MCAPI void ** $vftable()
Definition SceneStack.h:26
static MCAPI void ** $vftable()
Definition SceneStack.h:24
static MCAPI void ** $vftable()
Definition SceneStack.h:32
static MCAPI void ** $vftable()
Definition SceneStack.h:18
Definition SceneStack.h:5
static MCAPI void ** $vftable()
Definition TaskGroup.h:55
Definition UIEventCoordinator.h:5
Definition function_ref.h:60
Definition MultiThreaded.h:7
Definition ISceneStack.h:13
Definition RouteAction.h:7
Definition ScreenThreshold.h:5
Definition TextCharEventData.h:5