Files
sbox-public/engine/Sandbox.Engine/Game/GameMenu/LoadingProgress.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

32 lines
706 B
C#

namespace Sandbox.Menu;
public partial struct LoadingProgress
{
public string Title { get; set; }
/// <summary>
/// A value between 0 and 1, to show a progress bar
/// </summary>
public double Fraction { get; set; }
/// <summary>
/// The current transfer rate in Megabits per second. 0 is none.
/// </summary>
public double Mbps { get; set; }
/// <summary>
/// Delta multipled by 100
/// </summary>
public readonly double Percent => Fraction * 100.0f;
/// <summary>
/// The total size of what we're trying to download
/// </summary>
public double TotalSize { get; set; }
internal static LoadingProgress Create( string title )
{
return new LoadingProgress { Title = title };
}
}