namespace Sandbox;
///
/// Holds metadata and raw data relating to a Saved Game.
///
public static class LoadingScreen
{
private static bool _loading;
public static bool IsVisible
{
get => _loading;
set
{
if ( _loading == value )
return;
//Log.Info( $"Loading: {value}\n{new StackTrace( true ).ToString()}" );
_loading = value;
}
}
///
/// A title to show
///
public static string Title { get; set; } = "Loading..";
///
/// A subtitle to show
///
public static string Subtitle { get; set; } = "";
///
/// A URL or filepath to show as the background image.
///
public static string Media { get; set; }
///
/// A list of tasks that are currently being awaited during loading.
///
public static List Tasks { get; } = [];
///
/// Called by the scene system to tell us about the loading tasks
///
internal static void UpdateLoadingTasks( List incoming )
{
Tasks.Clear();
if ( incoming.Count > 0 )
{
Tasks.AddRange( incoming );
}
}
}