mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:18:22 +08:00
Fixed code style
This commit is contained in:
parent
6bccb3aab6
commit
493c095535
@ -21,7 +21,7 @@ namespace osu.Android
|
||||
: base(null)
|
||||
{
|
||||
gameActivity = activity;
|
||||
powerStatus = new AndroidPowerStatus();
|
||||
PowerStatus = new AndroidPowerStatus();
|
||||
}
|
||||
|
||||
public override Version AssemblyVersion
|
||||
|
@ -22,7 +22,6 @@ using osu.Desktop.Windows;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.IO;
|
||||
using osu.Game.Utils;
|
||||
using osu.Framework.Allocation;
|
||||
|
||||
namespace osu.Desktop
|
||||
{
|
||||
@ -35,7 +34,7 @@ namespace osu.Desktop
|
||||
: base(args)
|
||||
{
|
||||
noVersionOverlay = args?.Any(a => a == "--no-version-overlay") ?? false;
|
||||
powerStatus = new DefaultPowerStatus();
|
||||
PowerStatus = new DefaultPowerStatus();
|
||||
}
|
||||
|
||||
public override StableStorage GetStorageForStableInstall()
|
||||
|
@ -300,7 +300,11 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
AddStep("reset notification lock", () => sessionStatics.GetBindable<bool>(Static.BatteryLowNotificationShownOnce).Value = false);
|
||||
|
||||
// set charge status and level
|
||||
AddStep("load player", () => resetPlayer(false, () => { powerStatus.IsCharging = isCharging; powerStatus.ChargeLevel = chargeLevel; }));
|
||||
AddStep("load player", () => resetPlayer(false, () =>
|
||||
{
|
||||
powerStatus.IsCharging = isCharging;
|
||||
powerStatus.ChargeLevel = chargeLevel;
|
||||
}));
|
||||
AddUntilStep("wait for player", () => player?.LoadState == LoadState.Ready);
|
||||
int notificationCount = !isCharging && chargeLevel <= powerStatus.BatteryCutoff ? 1 : 0;
|
||||
AddAssert("check for notification", () => notificationOverlay.UnreadCount.Value == notificationCount);
|
||||
|
@ -96,7 +96,7 @@ namespace osu.Game
|
||||
|
||||
protected Storage Storage { get; set; }
|
||||
|
||||
protected PowerStatus powerStatus;
|
||||
protected PowerStatus PowerStatus;
|
||||
|
||||
[Cached]
|
||||
[Cached(typeof(IBindable<RulesetInfo>))]
|
||||
@ -333,7 +333,7 @@ namespace osu.Game
|
||||
|
||||
Ruleset.BindValueChanged(onRulesetChanged);
|
||||
|
||||
dependencies.CacheAs(powerStatus);
|
||||
dependencies.CacheAs(PowerStatus);
|
||||
}
|
||||
|
||||
private void onRulesetChanged(ValueChangedEvent<RulesetInfo> r)
|
||||
|
@ -477,6 +477,7 @@ namespace osu.Game.Screens.Play
|
||||
#endregion
|
||||
|
||||
#region Low battery warning
|
||||
|
||||
private Bindable<bool> batteryWarningShownOnce;
|
||||
|
||||
private void showBatteryWarningIfNeeded()
|
||||
|
@ -15,8 +15,9 @@ namespace osu.Game.Tests
|
||||
{
|
||||
public OsuTestBrowser()
|
||||
{
|
||||
powerStatus = new DefaultPowerStatus();
|
||||
PowerStatus = new DefaultPowerStatus();
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
@ -10,6 +10,7 @@ namespace osu.Game.Utils
|
||||
/// is sent.
|
||||
/// </summary>
|
||||
public virtual double BatteryCutoff { get; } = 0.2;
|
||||
|
||||
public virtual double ChargeLevel { get; set; }
|
||||
public virtual bool IsCharging { get; set; }
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ namespace osu.iOS
|
||||
public OsuGameIOS()
|
||||
: base(null)
|
||||
{
|
||||
powerStatus = new IOSPowerStatus();
|
||||
PowerStatus = new IOSPowerStatus();
|
||||
}
|
||||
public override Version AssemblyVersion => new Version(NSBundle.MainBundle.InfoDictionary["CFBundleVersion"].ToString());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user