LeviLamina
Loading...
Searching...
No Matches
GameplayUIClient.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/deps/core/utility/pub_sub/Subscription.h"
8#include "mc/events/NetworkType.h"
9#include "mc/world/actor/player/persona/ProfileType.h"
10#include "mc/world/events/EventListenerDispatcher.h"
11#include "mc/world/events/EventResult.h"
12#include "mc/world/events/ItemEventListener.h"
13#include "mc/world/events/PlayerEventListener.h"
14
15// auto generated forward declare list
16// clang-format off
17class IClientInstance;
18class IOptions;
19class ISceneStack;
20class ItemStackBase;
21class LocalPlayer;
22struct ActorUniqueID;
25namespace GameplayUI { struct GameplayUIContext; }
26namespace OreUI { class Router; }
27// clang-format on
28
29namespace GameplayUI {
30
31class GameplayUIClient : public ::EventListenerDispatcher<::PlayerEventListener>,
32 public ::EventListenerDispatcher<::ItemEventListener> {
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 8, ::GameplayUI::GameplayUIContext&> mContext;
37 ::ll::TypedStorage<8, 8, ::OreUI::Router&> mRouter;
38 ::ll::TypedStorage<8, 8, ::IOptions&> mOptions;
39 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ISceneStack const>> mSceneStack;
40 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mConnectedSubscription;
41 // NOLINTEND
42
43public:
44 // prevent constructor by default
45 GameplayUIClient& operator=(GameplayUIClient const&);
46 GameplayUIClient(GameplayUIClient const&);
47 GameplayUIClient();
48
49public:
50 // virtual functions
51 // NOLINTBEGIN
52 virtual ::EventResult onEvent(::PlayerNotificationEvent const& event) /*override*/;
53
54 virtual ::EventResult onPlayerCreated(
55 ::LocalPlayer& player,
56 ::persona::ProfileType personaSlot,
57 ::std::string const& classicSkinId,
58 bool usingClassicSkin,
59 ::NetworkType networkType
60 ) /*override*/;
61
62 virtual ::EventResult onLocalPlayerDeath(::IClientInstance& client, ::LocalPlayer& player) /*override*/;
63
64 virtual ::EventResult onLocalPlayerRespawn(::IClientInstance& client, ::LocalPlayer& player) /*override*/;
65
66 virtual ::EventResult onLocalPlayerOpenInventory(::IClientInstance&, ::LocalPlayer& localPlayer) /*override*/;
67
68 virtual ::EventResult
69 onLocalPlayerOpenTrading(::IClientInstance&, ::LocalPlayer&, ::ActorUniqueID const& uniqueID, bool) /*override*/;
70
71 virtual ::EventResult
72 onPreviewItemPopulatedInContainer(::ItemStackBase const& item, ::std::string const& dstContainerName) /*override*/;
73
74 virtual ::EventResult onShowDataDrivenScreen(
75 ::LocalPlayer&,
76 ::std::string const& screenId,
77 uint formId,
78 ::std::optional<uint> dataInstanceId
79 ) /*override*/;
80
81 virtual ::EventResult onCloseDataDrivenScreen(::LocalPlayer&, uint formId) /*override*/;
82
83 virtual ::EventResult onCloseAllDataDrivenScreens(::LocalPlayer&) /*override*/;
84
85 virtual ~GameplayUIClient() /*override*/ = default;
86 // NOLINTEND
87
88public:
89 // member functions
90 // NOLINTBEGIN
91 MCAPI void onLeaveWorld();
92
93 MCAPI void setupGameServerConnectionListener(::GameConnectionConnector const& gameConnectionConnector);
94
95 MCAPI void update();
96 // NOLINTEND
97
98public:
99 // virtual function thunks
100 // NOLINTBEGIN
101 MCAPI ::EventResult $onEvent(::PlayerNotificationEvent const& event);
102
103 MCAPI ::EventResult $onPlayerCreated(
104 ::LocalPlayer& player,
105 ::persona::ProfileType personaSlot,
106 ::std::string const& classicSkinId,
107 bool usingClassicSkin,
108 ::NetworkType networkType
109 );
110
111 MCAPI ::EventResult $onLocalPlayerDeath(::IClientInstance& client, ::LocalPlayer& player);
112
113 MCAPI ::EventResult $onLocalPlayerRespawn(::IClientInstance& client, ::LocalPlayer& player);
114
115 MCAPI ::EventResult $onLocalPlayerOpenInventory(::IClientInstance&, ::LocalPlayer& localPlayer);
116
117 MCAPI ::EventResult
118 $onLocalPlayerOpenTrading(::IClientInstance&, ::LocalPlayer&, ::ActorUniqueID const& uniqueID, bool);
119
120 MCAPI ::EventResult
121 $onPreviewItemPopulatedInContainer(::ItemStackBase const& item, ::std::string const& dstContainerName);
122
123 MCAPI ::EventResult $onShowDataDrivenScreen(
124 ::LocalPlayer&,
125 ::std::string const& screenId,
126 uint formId,
127 ::std::optional<uint> dataInstanceId
128 );
129
130 MCAPI ::EventResult $onCloseDataDrivenScreen(::LocalPlayer&, uint formId);
131
132 MCAPI ::EventResult $onCloseAllDataDrivenScreens(::LocalPlayer&);
133 // NOLINTEND
134
135public:
136 // vftables
137 // NOLINTBEGIN
139
141 // NOLINTEND
142};
143
144} // namespace GameplayUI
Definition GameplayUIClient.h:7
static MCAPI void ** $vftableForEventListenerDispatcherPlayerEventListener()
static MCAPI void ** $vftableForEventListenerDispatcherItemEventListener()
Definition IClientInstance.h:5
Definition IOptions.h:5
Definition ISceneStack.h:5
Definition ItemStackBase.h:44
Definition LocalPlayer.h:5
Definition Router.h:7
Definition ActorUniqueID.h:5
Definition GameConnectionConnector.h:5
Definition GameplayUIContext.h:7
Definition PlayerNotificationEvent.h:130