3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/gameplay/api/gameplayui/DataDrivenScreenInfo.h"
7#include "mc/deps/core/utility/pub_sub/Publisher.h"
8#include "mc/ui/DataDrivenScreenClosedReason.h"
22 using ShowDataDrivenScreenCallbackSignature =
23 void(::std::optional<::std::string>
const, ::std::optional<uint>
const);
25 using ShowDataDrivenScreenCallback = ::std::function<void(::std::optional<::std::string>, ::std::optional<uint>)>;
27 using ScreenClosedCallbackSignature = void(uint, ::DataDrivenScreenClosedReason);
29 using ScreenClosedCallback = ::std::function<void(uint, ::DataDrivenScreenClosedReason)>;
31 using ClientSideCloseCallbackSignature = void();
33 using ClientSideCloseCallback = ::std::function<void()>;
41 ::Bedrock::PubSub::Publisher<
42 void(::std::optional<::std::string>, ::std::optional<uint>),
43 ::Bedrock::PubSub::ThreadModel::SingleThreaded,
45 mShowDataDrivenScreenPublisher;
46 ::ll::TypedStorage<8, 48, ::Bedrock::PubSub::Publisher<void(), ::Bedrock::PubSub::ThreadModel::SingleThreaded, 0>>
47 mClientSideClosePublisher;
48 ::ll::TypedStorage<8, 56, ::std::optional<::GameplayUI::DataDrivenScreenInfo>> mCurrentScreen;
49 ::ll::TypedStorage<8, 8, ::PacketSender&> mPacketSender;
54 DataDrivenScreenAPI& operator=(DataDrivenScreenAPI
const&);
55 DataDrivenScreenAPI(DataDrivenScreenAPI
const&);
56 DataDrivenScreenAPI();
61 MCAPI
explicit DataDrivenScreenAPI(::PacketSender& packetSender);
63 MCAPI
void clientSideCloseDataDrivenScreens();
65 MCAPI
void closeAllDataDrivenScreens();
67 MCAPI
void closeDataDrivenScreen(uint formId);
69 MCAPI
void showDataDrivenScreen(::std::string
const& screenId, uint formId, ::std::optional<uint> dataInstanceId);
71 MCAPI ::Bedrock::PubSub::Subscription
72 subscribeToOnClientSideClose(::std::function<
void()>&& onClientSideCloseCallback);
74 MCAPI ::Bedrock::PubSub::Subscription subscribeToOnServerShowDataDrivenScreen(
75 ::std::function<
void(::std::optional<::std::string>, ::std::optional<uint>)>&&
76 onServerShowDataDrivenScreenCallback
83 MCAPI
void* $ctor(::PacketSender& packetSender);
Definition Subscription.h:10
Definition DataDrivenScreenAPI.h:7
Definition PacketSender.h:17
Definition SingleThreaded.h:7