mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Add battery info for desktop platforms
This commit is contained in:
@ -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; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user