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 IOptionRegistry;
19class ISceneStack;
20class LocalPlayer;
21struct ActorUniqueID;
24namespace GameplayUI { struct GameplayUIContext; }
25namespace OreUI { class Router; }
26// clang-format on
27
28namespace GameplayUI {
29
30class GameplayUIClient : public ::EventListenerDispatcher<::PlayerEventListener>,
31 public ::EventListenerDispatcher<::ItemEventListener> {
32public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<8, 8, ::GameplayUI::GameplayUIContext&> mContext;
36 ::ll::TypedStorage<8, 8, ::OreUI::Router&> mRouter;
37 ::ll::TypedStorage<8, 8, ::IOptionRegistry&> mOptions;
38 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ISceneStack const>> mSceneStack;
39 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mConnectedSubscription;
40 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mClientSideCloseSubscription;
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 onPlayerCreated(
53 ::LocalPlayer& player,
54 ::persona::ProfileType personaSlot,
55 ::std::string const& classicSkinId,
56 bool usingClassicSkin,
57 ::NetworkType networkType
58 ) /*override*/;
59
60 virtual ::EventResult onEvent(::PlayerNotificationEvent const& event) /*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& uniqueID, ::LocalPlayer&, ::ActorUniqueID const&, bool) /*override*/;
70
71 virtual ::EventResult onShowDataDrivenScreen(
72 ::LocalPlayer& screenId,
73 ::std::string const& formId,
74 uint dataInstanceId,
75 ::std::optional<uint>
76 ) /*override*/;
77
78 virtual ::EventResult onCloseDataDrivenScreen(::LocalPlayer& formId, uint) /*override*/;
79
80 virtual ::EventResult onCloseAllDataDrivenScreens(::LocalPlayer&) /*override*/;
81 // NOLINTEND
82
83public:
84 // member functions
85 // NOLINTBEGIN
86 MCAPI GameplayUIClient(
87 ::GameplayUI::GameplayUIContext& context,
88 ::OreUI::Router& router,
89 ::IOptionRegistry& options,
90 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack const> sceneStack
91 );
92
93 MCAPI void onDataDrivenScreenClientSideClose();
94
95 MCAPI void onJoinWorld(::IClientInstance& client);
96
97 MCAPI void onLeaveWorld();
98
99 MCAPI void setupGameServerConnectionListener(::GameConnectionConnector const& gameConnectionConnector);
100
101 MCAPI void update();
102 // NOLINTEND
103
104public:
105 // constructor thunks
106 // NOLINTBEGIN
107 MCAPI void* $ctor(
108 ::GameplayUI::GameplayUIContext& context,
109 ::OreUI::Router& router,
110 ::IOptionRegistry& options,
111 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack const> sceneStack
112 );
113 // NOLINTEND
114
115public:
116 // virtual function thunks
117 // NOLINTBEGIN
118 MCAPI ::EventResult $onPlayerCreated(
119 ::LocalPlayer& player,
120 ::persona::ProfileType personaSlot,
121 ::std::string const& classicSkinId,
122 bool usingClassicSkin,
123 ::NetworkType networkType
124 );
125
126 MCAPI ::EventResult $onEvent(::PlayerNotificationEvent const& event);
127
128 MCAPI ::EventResult $onLocalPlayerDeath(::IClientInstance& client, ::LocalPlayer& player);
129
130 MCAPI ::EventResult $onLocalPlayerRespawn(::IClientInstance& client, ::LocalPlayer& player);
131
132 MCAPI ::EventResult $onLocalPlayerOpenInventory(::IClientInstance& localPlayer, ::LocalPlayer&);
133
134 MCAPI ::EventResult
135 $onLocalPlayerOpenTrading(::IClientInstance& uniqueID, ::LocalPlayer&, ::ActorUniqueID const&, bool);
136
137 MCAPI ::EventResult $onShowDataDrivenScreen(
138 ::LocalPlayer& screenId,
139 ::std::string const& formId,
140 uint dataInstanceId,
141 ::std::optional<uint>
142 );
143
144 MCAPI ::EventResult $onCloseDataDrivenScreen(::LocalPlayer& formId, uint);
145
146 MCAPI ::EventResult $onCloseAllDataDrivenScreens(::LocalPlayer&);
147 // NOLINTEND
148
149public:
150 // vftables
151 // NOLINTBEGIN
153
155 // NOLINTEND
156};
157
158} // namespace GameplayUI
Definition GameplayUIClient.h:7
static MCAPI void ** $vftableForEventListenerDispatcherPlayerEventListener()
static MCAPI void ** $vftableForEventListenerDispatcherItemEventListener()
Definition IClientInstance.h:5
Definition IOptionRegistry.h:5
Definition ISceneStack.h:5
Definition LocalPlayer.h:5
Definition Router.h:7
Definition ActorUniqueID.h:10
Definition GameConnectionConnector.h:5
Definition GameplayUIContext.h:7
Definition PlayerNotificationEvent.h:136