LeviLamina
Loading...
Searching...
No Matches
DataDrivenScreenAPI.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
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"
9
10// auto generated forward declare list
11// clang-format off
12class PacketSender;
13namespace Bedrock::PubSub { class Subscription; }
14namespace Bedrock::PubSub::ThreadModel { struct SingleThreaded; }
15// clang-format on
16
17namespace GameplayUI {
18
20public:
21 // DataDrivenScreenAPI inner types define
22 using ShowDataDrivenScreenCallbackSignature =
23 void(::std::optional<::std::string> const, ::std::optional<uint> const);
24
25 using ShowDataDrivenScreenCallback = ::std::function<void(::std::optional<::std::string>, ::std::optional<uint>)>;
26
27 using ScreenClosedCallbackSignature = void(uint, ::DataDrivenScreenClosedReason);
28
29 using ScreenClosedCallback = ::std::function<void(uint, ::DataDrivenScreenClosedReason)>;
30
31 using ClientSideCloseCallbackSignature = void();
32
33 using ClientSideCloseCallback = ::std::function<void()>;
34
35public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<
39 8,
40 48,
41 ::Bedrock::PubSub::Publisher<
42 void(::std::optional<::std::string>, ::std::optional<uint>),
43 ::Bedrock::PubSub::ThreadModel::SingleThreaded,
44 0>>
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;
50 // NOLINTEND
51
52public:
53 // prevent constructor by default
54 DataDrivenScreenAPI& operator=(DataDrivenScreenAPI const&);
55 DataDrivenScreenAPI(DataDrivenScreenAPI const&);
56 DataDrivenScreenAPI();
57
58public:
59 // member functions
60 // NOLINTBEGIN
61 MCAPI explicit DataDrivenScreenAPI(::PacketSender& packetSender);
62
63 MCAPI void clientSideCloseDataDrivenScreens();
64
65 MCAPI void closeAllDataDrivenScreens();
66
67 MCAPI void closeDataDrivenScreen(uint formId);
68
69 MCAPI void showDataDrivenScreen(::std::string const& screenId, uint formId, ::std::optional<uint> dataInstanceId);
70
71 MCAPI ::Bedrock::PubSub::Subscription
72 subscribeToOnClientSideClose(::std::function<void()>&& onClientSideCloseCallback);
73
74 MCAPI ::Bedrock::PubSub::Subscription subscribeToOnServerShowDataDrivenScreen(
75 ::std::function<void(::std::optional<::std::string>, ::std::optional<uint>)>&&
76 onServerShowDataDrivenScreenCallback
77 );
78 // NOLINTEND
79
80public:
81 // constructor thunks
82 // NOLINTBEGIN
83 MCAPI void* $ctor(::PacketSender& packetSender);
84 // NOLINTEND
85};
86
87} // namespace GameplayUI
Definition Subscription.h:10
Definition DataDrivenScreenAPI.h:7
Definition PacketSender.h:17