Skip to content
LeviMC
English
AutoLightDark
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,
55 ::std::string const&,
56 bool,
57 ::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&, ::LocalPlayer&, ::ActorUniqueID const& uniqueID, bool) /*override*/;
70
71 virtual ::EventResult onShowDataDrivenScreen(
72 ::LocalPlayer&,
73 ::std::string const& screenId,
74 uint formId,
75 ::std::optional<uint> dataInstanceId
76 ) /*override*/;
77
78 virtual ::EventResult onCloseDataDrivenScreen(::LocalPlayer&, uint formId) /*override*/;
79
80 virtual ::EventResult onCloseAllDataDrivenScreens(::LocalPlayer&) /*override*/;
81 // NOLINTEND
82
83public:
84 // member functions
85 // NOLINTBEGIN
86 MCNAPI void onJoinWorld(::IClientInstance& client);
87
88 MCNAPI void onLeaveWorld();
89
90 MCNAPI void setupGameServerConnectionListener(::GameConnectionConnector const& gameConnectionConnector);
91
92 MCNAPI void update();
93 // NOLINTEND
94
95public:
96 // virtual function thunks
97 // NOLINTBEGIN
98 MCNAPI ::EventResult
99 $onPlayerCreated(::LocalPlayer& player, ::persona::ProfileType, ::std::string const&, bool, ::NetworkType);
100
101 MCNAPI ::EventResult $onEvent(::PlayerNotificationEvent const& event);
102
103 MCNAPI ::EventResult $onLocalPlayerDeath(::IClientInstance& client, ::LocalPlayer& player);
104
105 MCNAPI ::EventResult $onLocalPlayerRespawn(::IClientInstance& client, ::LocalPlayer& player);
106
107 MCNAPI ::EventResult $onLocalPlayerOpenInventory(::IClientInstance&, ::LocalPlayer& localPlayer);
108
109 MCNAPI ::EventResult
111
112 MCNAPI ::EventResult $onShowDataDrivenScreen(
114 ::std::string const& screenId,
115 uint formId,
116 ::std::optional<uint> dataInstanceId
117 );
118
119 MCNAPI ::EventResult $onCloseDataDrivenScreen(::LocalPlayer&, uint formId);
120
122 // NOLINTEND
123
124public:
125 // vftables
126 // NOLINTBEGIN
128
130 // NOLINTEND
131};
132
133} // namespace GameplayUI
Definition GameplayUIClient.h:7
MCAPI::EventResult $onCloseAllDataDrivenScreens(::LocalPlayer &)
MCAPI::EventResult $onLocalPlayerOpenInventory(::IClientInstance &, ::LocalPlayer &localPlayer)
static MCAPI void ** $vftableForEventListenerDispatcherPlayerEventListener()
MCAPI::EventResult $onCloseDataDrivenScreen(::LocalPlayer &, uint formId)
MCAPI::EventResult $onLocalPlayerRespawn(::IClientInstance &client, ::LocalPlayer &player)
MCAPI void onJoinWorld(::IClientInstance &client)
MCAPI::EventResult $onLocalPlayerOpenTrading(::IClientInstance &, ::LocalPlayer &, ::ActorUniqueID const &uniqueID, bool)
MCAPI::EventResult $onShowDataDrivenScreen(::LocalPlayer &, ::std::string const &screenId, uint formId, ::std::optional< uint > dataInstanceId)
MCAPI::EventResult $onPlayerCreated(::LocalPlayer &player, ::persona::ProfileType, ::std::string const &, bool, ::NetworkType)
MCAPI void setupGameServerConnectionListener(::GameConnectionConnector const &gameConnectionConnector)
MCAPI::EventResult $onEvent(::PlayerNotificationEvent const &event)
MCAPI::EventResult $onLocalPlayerDeath(::IClientInstance &client, ::LocalPlayer &player)
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:5
Definition GameConnectionConnector.h:5
Definition GameplayUIContext.h:7
Definition PlayerNotificationEvent.h:163