3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/oreui/resources/TemporaryTextureHolder.h"
7#include "mc/client/gui/oreui/routing/RouterConfiguration.h"
8#include "mc/common/SubClientId.h"
9#include "mc/deps/core/file/Path.h"
10#include "mc/deps/core/utility/NonOwnerPointer.h"
11#include "mc/deps/core/utility/pub_sub/Subscription.h"
12#include "mc/platform/brstd/move_only_function.h"
31namespace OreUI {
class Library; }
33namespace OreUI {
class Router; }
62 using ResourceHandlerBrokerFactory = ::brstd::move_only_function<::std::unique_ptr<
63 ::Gameface::ResourceHandlerBroker>(::OreUI::RegisterResourceHandlersArguments
const&)
const>;
65 using LibraryFactory =
66 ::brstd::move_only_function<::std::unique_ptr<::OreUI::Library>(::OreUI::LibraryFactoryArguments&&) const>;
68 using ShowDebugToast = ::std::function<
void(::std::
string const&)>;
70 using SceneProviderFactory = ::brstd::move_only_function<::std::unique_ptr<::OreUI::SceneProvider>(
71 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const&,
72 ::std::unique_ptr<::OreUI::FacetRegistryFactory>,
73 ::std::unique_ptr<::OreUI::Detail::ViewContextFactory>,
83 ::brstd::move_only_function<::std::unique_ptr<
84 ::Gameface::ResourceHandlerBroker>(::OreUI::RegisterResourceHandlersArguments const&) const>>
85 mCreateResourceHandlerBroker;
89 ::brstd::move_only_function<::std::unique_ptr<::OreUI::Library>(::OreUI::LibraryFactoryArguments&&) const>>
94 ::brstd::move_only_function<::std::unique_ptr<::OreUI::SceneProvider>(
95 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const&,
96 ::std::unique_ptr<::OreUI::FacetRegistryFactory>,
97 ::std::unique_ptr<::OreUI::Detail::ViewContextFactory>,
100 mSceneProviderFactory;
101 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::DebugData>> mDebugData;
102 ::ll::TypedStorage<8, 216, ::OreUI::RouterConfiguration> mRouterConfiguration;
103 ::ll::TypedStorage<8, 64, ::std::function<
void(::std::
string const&)>> mShowDebugToast;
104 ::ll::TypedStorage<8, 32, ::Core::Path> mPackagePath;
105 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::ResourceAllowList>> mAllowList;
111 MCAPI ~OreUISystemDependencies();
117 MCAPI static ::brstd::move_only_function<::std::unique_ptr<::OreUI::Library>(::OreUI::LibraryFactoryArguments&&)
119 createLibraryFactory(
120 ::Bedrock::NotNullNonOwnerPtr<::Core::FileSystem> fileSystem,
121 ::Bedrock::NotNullNonOwnerPtr<::IFileAccess> appPackageFileAccess
124 MCAPI static ::brstd::move_only_function<::std::unique_ptr<
125 ::Gameface::ResourceHandlerBroker>(::OreUI::RegisterResourceHandlersArguments const&) const>
126 createResourceHandlerBrokerFactory(::OreUI::ResourceHandlerFactoryArguments const& args);
128 MCAPI static ::OreUI::ResourceHandlerFactory
129 createResourceHandlerFactory(::OreUI::ResourceHandlerFactoryArguments const& args);
131 MCAPI static ::brstd::move_only_function<::std::unique_ptr<::OreUI::SceneProvider>(
132 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const&,
133 ::std::unique_ptr<::OreUI::FacetRegistryFactory>,
134 ::std::unique_ptr<::OreUI::Detail::ViewContextFactory>,
137 createSceneProviderFactory(::ui::ScreenTechStackSelector& screenTechStackSelector);
151 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::OreUI::DebugData>>> mDebugData;
152 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::OreUI::ResourceAllowList>>> mResourceAllowList;
153 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string
const&)>> mShowDebugToast;
157 ::brstd::move_only_function<::std::unique_ptr<::OreUI::SceneProvider>(
158 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>
const&,
159 ::std::unique_ptr<::OreUI::FacetRegistryFactory>,
160 ::std::unique_ptr<::OreUI::Detail::ViewContextFactory>,
163 mCreateSceneProvider;
164 ::ll::TypedStorage<8, 216, ::OreUI::RouterConfiguration> mRouterConfiguration;
165 ::ll::TypedStorage<8, 104, ::Gameface::TemporaryTextureHolder> mTemporaryTextureHolder;
175 MCAPI
explicit Impl(::OreUI::OreUISystem::OreUISystemDependencies& deps);
181 MCAPI
void* $ctor(::OreUI::OreUISystem::OreUISystemDependencies& deps);
185 struct CallbackEntry {
189 ::ll::TypedStorage<8, 8, void*> token;
190 ::ll::TypedStorage<8, 64, ::std::function<void()>> callback;
197 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::OreUI::OreUISystem::Impl>>> mImpl;
198 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::Library>> mLibrary;
199 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::DevServerListener>> mDevServerListener;
200 ::ll::TypedStorage<1, 1, bool> mAppWillRestart;
201 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::OreUISystem::CallbackEntry>> mRouteConfigurationChangeCallbacks;
202 ::ll::TypedStorage<8, 24, ::std::vector<::Bedrock::PubSub::Subscription>> mOptionSubscriptions;
203 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesTrialMode;
204 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesFriendsDrawerOnMultipleScreens;
205 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesSettingsScreen;
206 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesAccessibilitySettingsScreen;
207 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesGameSettingsScreen;
208 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesLanguageSettingsScreen;
209 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesGeneralSettingsScreen;
210 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesAudioSettingsScreen;
211 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesAccountSettingsScreen;
212 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesVideoSettingsScreen;
213 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesKeyboardAndMouseSettingsScreen;
214 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesMultiplayerScreen;
215 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesPreviewSettingsScreen;
216 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesStorageSettingsScreen;
217 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesTouchSettingsScreen;
218 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesCreatorSettingsScreen;
219 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesNewSettingsInGame;
220 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesNewSettingsOnThirdPartyServers;
221 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mFlightingTogglesControllerScreen;
231 MCAPI
explicit OreUISystem(::OreUI::OreUISystem::OreUISystemDependencies&& deps);
233 MCAPI
void _registerToggleObservers();
235 MCAPI
bool assetsInitialized()
const;
237 MCAPI
void clearUnusedCachedViews(::SubClientId subClientId);
239 MCAPI ::std::unique_ptr<::OreUI::IRouteMatcher> createInGameRouteMatcher(
240 ::SceneFactory& sceneFactory,
241 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack>
const& sceneStack
244 MCAPI ::std::unique_ptr<::OreUI::Router> createInGameRouter(
245 ::std::unique_ptr<::OreUI::IRoutePrerequisiteHandler> prerequisiteHandler,
246 ::std::unique_ptr<::OreUI::RouterEventing> routerEventing,
247 ::SceneFactory& sceneFactory,
248 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack>
const& sceneStack
251 MCAPI ::std::unique_ptr<::OreUI::IRouteMatcher> createOutOfGameRouteMatcher(
252 ::SceneFactory& sceneFactory,
253 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack>
const& sceneStack
256 MCAPI ::std::unique_ptr<::OreUI::Router> createOutOfGameRouter(
257 ::std::unique_ptr<::OreUI::IRoutePrerequisiteHandler> prerequisiteHandler,
258 ::std::unique_ptr<::OreUI::RouterEventing> routerEventing,
259 ::SceneFactory& sceneFactory,
260 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack>
const& sceneStack
263 MCAPI ::std::unique_ptr<::OreUI::SceneProvider> createSceneProvider(
264 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>
const& clientInstance,
265 ::std::unique_ptr<::OreUI::FacetRegistryFactory> facetRegistryFactory,
266 ::std::unique_ptr<::OreUI::Detail::ViewContextFactory> contextFactory
269 MCAPI ::Bedrock::NotNullNonOwnerPtr<::OreUI::IResourceAllowList> getResourceAllowList();
271 MCAPI ::std::unique_ptr<::IGamefaceTextInputProxy> getTextInputProxy();
273 MCAPI
void initializeAssetsAsynchronously(::TaskGroup& taskGroup, ::Core::Path
const& packagePath);
275 MCAPI
void initializeRendering(
276 ::Bedrock::NonOwnerPointer<::mce::ShaderGroup>
const& shaderGroup,
277 ::mce::RenderContext& renderContext
280 MCAPI
void initializeViewsCoordinator();
282 MCAPI
void onActiveResourcePacksChanged();
284 MCAPI
void onAppPreSuspended(::mce::RenderContext& renderContext);
286 MCAPI
void onAppResumed(::Bedrock::NonOwnerPointer<::mce::ShaderGroup>
const& shaderGroup);
288 MCFOLD
void onAppWillRestart();
290 MCAPI
void onKeyboardDismissed();
292 MCAPI
void onTrialModeChanged();
294 MCAPI
void registerOptionObservers(::IOptionRegistry& options);
296 MCAPI
void registerRouteConfigurationChangeCallback(
void* token, ::std::function<
void()>
const& callback);
298 MCAPI
void reloadAllViews();
300 MCAPI
void setTextBoxState(::TextBoxStateChange
const& stateChange);
302 MCAPI
void unregisterRouteConfigurationChangeCallback(
void* token);
304 MCAPI
void update(
double time);
306 MCAPI ~OreUISystem();
312 MCAPI
void* $ctor(::OreUI::OreUISystem::OreUISystemDependencies&& deps);
Definition FileSystem.h:28
Definition ResourceHandlerBroker.h:7
Definition IClientInstance.h:5
Definition IFileAccess.h:15
Definition IGamefaceTextInputProxy.h:5
Definition IOptionRegistry.h:5
Definition ISceneStack.h:5
Definition ViewContextFactory.h:7
Definition DevServerListener.h:7
Definition FacetRegistryFactory.h:7
Definition IResourceAllowList.h:7
Definition IRouteMatcher.h:7
Definition IRoutePrerequisiteHandler.h:7
Definition OreUISystem.h:7
Definition ResourceAllowList.h:7
Definition RouterEventing.h:7
Definition SceneProvider.h:7
Definition SceneFactory.h:5
Definition TaskGroup.h:55
Definition RenderContext.h:7
Definition ShaderGroup.h:7
Definition ScreenTechStackSelector.h:7
Definition LibraryFactoryArguments.h:7
Definition OreUISystem.h:21
Definition OreUISystem.h:19
Definition OreUISystem.h:17
Definition RegisterResourceHandlersArguments.h:7
Definition ResourceHandlerFactoryArguments.h:7
Definition ResourceHandlerFactory.h:7
Definition TextBoxStateChange.h:5