Add battery info for desktop platforms

This commit is contained in:
Susko3
2022-07-30 14:26:19 +02:00
parent 43e612f6d4
commit 38a8b9cf0a
6 changed files with 51 additions and 20 deletions

View File

@ -9,10 +9,16 @@ namespace osu.Game.Utils
public abstract class BatteryInfo
{
/// <summary>
/// The charge level of the battery, from 0 to 1.
/// The charge level of the battery, from <c>0</c> to <c>1</c>, or <c>null</c> if a battery isn't present.
/// </summary>
public abstract double ChargeLevel { get; }
public abstract double? ChargeLevel { get; }
public abstract bool IsCharging { get; }
/// <summary>
/// Whether the current power source is the battery.
/// </summary>
/// <remarks>
/// This is <c>false</c> when the device is charging or doesn't have a battery.
/// </remarks>
public abstract bool OnBattery { get; }
}
}