LeviLamina
Loading...
Searching...
No Matches
OreUISystem.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/oreui/resources/ResourceAllowList.h"
7#include "mc/client/gui/oreui/resources/TemporaryTextureHolder.h"
8#include "mc/client/gui/oreui/routing/RouterConfiguration.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/deps/core/utility/pub_sub/Subscription.h"
11
12// auto generated forward declare list
13// clang-format off
14class IFileAccess;
15class IOptions;
16class ISceneStack;
18class SceneFactory;
19namespace Core { class FileSystem; }
20namespace Core { class Path; }
21namespace OreUI { class DevServerListener; }
22namespace OreUI { class IRoutePrerequisiteHandler; }
23namespace OreUI { class Library; }
24namespace OreUI { class Router; }
25namespace OreUI { class RouterEventing; }
26namespace OreUI { struct DebugData; }
27namespace Social { class IUserManager; }
28namespace mce { class RenderContext; }
29namespace ui { class ScreenTechStackSelector; }
30// clang-format on
31
32namespace OreUI {
33
34class OreUISystem {
35public:
36 // OreUISystem inner types declare
37 // clang-format off
38 struct CallbackEntry;
39 // clang-format on
40
41 // OreUISystem inner types define
42 struct CallbackEntry {
43 public:
44 // member variables
45 // NOLINTBEGIN
46 ::ll::TypedStorage<8, 8, void*> token;
47 ::ll::TypedStorage<8, 64, ::std::function<void()>> callback;
48 // NOLINTEND
49
50 public:
51 // member functions
52 // NOLINTBEGIN
53 MCAPI ~CallbackEntry();
54 // NOLINTEND
55
56 public:
57 // destructor thunk
58 // NOLINTBEGIN
59 MCFOLD void $dtor();
60 // NOLINTEND
61 };
62
63 using ShowDebugToast = ::std::function<void(::std::string const&)>;
64
65public:
66 // member variables
67 // NOLINTBEGIN
68 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::DebugData>> mDebugData;
69 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string const&)>> mShowDebugToast;
70 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::Core::FileSystem>> mFileSystem;
71 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IFileAccess>> mAppPackageFileAccess;
72 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IFileAccess>> mRawFileAccess;
73 ::ll::TypedStorage<8, 8, ::ResourcePackManager const&> mPackManager;
74 ::ll::TypedStorage<8, 8, ::ui::ScreenTechStackSelector&> mScreenTechStackSelector;
75 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::Social::IUserManager>> mUserManager;
76 ::ll::TypedStorage<8, 216, ::OreUI::RouterConfiguration> mRouterConfiguration;
77 ::ll::TypedStorage<8, 320, ::OreUI::ResourceAllowList> mResourceAllowList;
78 ::ll::TypedStorage<8, 104, ::OreUI::TemporaryTextureHolder> mTemporaryTextureHolder;
79 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::Library>> mLibrary;
80 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::DevServerListener>> mDevServerListener;
81 ::ll::TypedStorage<1, 1, bool> mAppWillRestart;
82 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::OreUISystem::CallbackEntry>> mRouteConfigurationChangeCallbacks;
83 ::ll::TypedStorage<8, 24, ::std::vector<::Bedrock::PubSub::Subscription>> mOptionSubscriptions;
84 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesTrialMode;
85 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesFriendsDrawerOnMultipleScreens;
86 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesSettingsScreen;
87 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesAccessibilitySettingsScreen;
88 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesGameSettingsScreen;
89 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesLanguageSettingsScreen;
90 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesGeneralSettingsScreen;
91 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesAudioSettingsScreen;
92 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesAccountSettingsScreen;
93 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesVideoSettingsScreen;
94 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesKeyboardAndMouseSettingsScreen;
95 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesMultiplayerScreen;
96 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesPreviewSettingsScreen;
97 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesTouchSettingsScreen;
98 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesNewSettingsInGame;
99 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesNewSettingsOnThirdPartyServers;
100 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesControllerScreen;
101 // NOLINTEND
102
103public:
104 // prevent constructor by default
105 OreUISystem& operator=(OreUISystem const&);
106 OreUISystem(OreUISystem const&);
107 OreUISystem();
108
109public:
110 // member functions
111 // NOLINTBEGIN
112 MCAPI OreUISystem(
113 ::std::unique_ptr<::OreUI::DebugData> debugData,
114 ::OreUI::RouterConfiguration routerConfiguration,
115 ::std::function<void(::std::string const&)> showDebugToast,
116 ::Bedrock::NotNullNonOwnerPtr<::Core::FileSystem> const& fileSystem,
117 ::Bedrock::NotNullNonOwnerPtr<::IFileAccess> const& appPackageFileAccess,
118 ::Core::Path const& packagePath,
119 ::Bedrock::NotNullNonOwnerPtr<::IFileAccess> const& rawFileAccess,
120 ::ResourcePackManager const& packManager,
121 ::ui::ScreenTechStackSelector& screenTechStackSelector,
122 ::Bedrock::NotNullNonOwnerPtr<::Social::IUserManager> userManager
123 );
124
125 MCAPI void _initializeLibrary(::Core::Path const& packagePath);
126
127 MCAPI void _registerToggleObservers();
128
129 MCAPI ::std::unique_ptr<::OreUI::Router> createInGameRouter(
130 ::std::unique_ptr<::OreUI::IRoutePrerequisiteHandler> prerequisiteHandler,
131 ::std::unique_ptr<::OreUI::RouterEventing> routerEventing,
132 ::SceneFactory& sceneFactory,
133 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack> const& sceneStack
134 ) const;
135
136 MCAPI ::std::unique_ptr<::OreUI::Router> createOutOfGameRouter(
137 ::std::unique_ptr<::OreUI::IRoutePrerequisiteHandler> prerequisiteHandler,
138 ::std::unique_ptr<::OreUI::RouterEventing> routerEventing,
139 ::SceneFactory& sceneFactory,
140 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack> const& sceneStack
141 ) const;
142
143 MCAPI void onAppPreSuspended(::mce::RenderContext& renderContext);
144
145 MCAPI void registerOptionObservers(::IOptions& options);
146
147 MCAPI void registerRouteConfigurationChangeCallback(void* token, ::std::function<void()> const& callback);
148
149 MCAPI void unregisterRouteConfigurationChangeCallback(void* token);
150
151 MCAPI void update(double time);
152
153 MCAPI ~OreUISystem();
154 // NOLINTEND
155
156public:
157 // constructor thunks
158 // NOLINTBEGIN
159 MCAPI void* $ctor(
160 ::std::unique_ptr<::OreUI::DebugData> debugData,
161 ::OreUI::RouterConfiguration routerConfiguration,
162 ::std::function<void(::std::string const&)> showDebugToast,
163 ::Bedrock::NotNullNonOwnerPtr<::Core::FileSystem> const& fileSystem,
164 ::Bedrock::NotNullNonOwnerPtr<::IFileAccess> const& appPackageFileAccess,
165 ::Core::Path const& packagePath,
166 ::Bedrock::NotNullNonOwnerPtr<::IFileAccess> const& rawFileAccess,
167 ::ResourcePackManager const& packManager,
168 ::ui::ScreenTechStackSelector& screenTechStackSelector,
169 ::Bedrock::NotNullNonOwnerPtr<::Social::IUserManager> userManager
170 );
171 // NOLINTEND
172
173public:
174 // destructor thunk
175 // NOLINTBEGIN
176 MCAPI void $dtor();
177 // NOLINTEND
178};
179
180} // namespace OreUI
Definition FileSystem.h:28
Definition Path.h:17
Definition IFileAccess.h:15
Definition IOptions.h:5
Definition ISceneStack.h:5
Definition DevServerListener.h:7
Definition IRoutePrerequisiteHandler.h:7
Definition Library.h:7
Definition OreUISystem.h:7
Definition RouterEventing.h:7
Definition Router.h:7
Definition ResourcePackManager.h:30
Definition SceneFactory.h:5
Definition IUserManager.h:34
Definition RenderContext.h:7
Definition ScreenTechStackSelector.h:7
Definition DebugData.h:7
Definition OreUISystem.h:15