mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-13 08:48:39 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
32 lines
706 B
C#
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 };
|
|
}
|
|
}
|