mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Limit safe area bottom override to iOS only
This commit is contained in:
parent
6457cf8d9b
commit
915d63f6de
@ -89,6 +89,12 @@ namespace osu.Game
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Edges"/> that the game should be drawn over at a top level.
|
||||
/// Defaults to <see cref="Edges.None"/>.
|
||||
/// </summary>
|
||||
public virtual Edges SafeAreaOverrideEdges { get; set; }
|
||||
|
||||
protected OsuConfigManager LocalConfig { get; private set; }
|
||||
|
||||
protected SessionStatics SessionStatics { get; private set; }
|
||||
@ -301,7 +307,7 @@ namespace osu.Game
|
||||
|
||||
base.Content.Add(new SafeAreaContainer
|
||||
{
|
||||
SafeAreaOverrideEdges = Edges.Bottom,
|
||||
SafeAreaOverrideEdges = SafeAreaOverrideEdges,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Child = CreateScalingContainer().WithChildren(new Drawable[]
|
||||
{
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using Foundation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game;
|
||||
using osu.Game.Updater;
|
||||
using osu.Game.Utils;
|
||||
@ -18,6 +19,11 @@ namespace osu.iOS
|
||||
|
||||
protected override BatteryInfo CreateBatteryInfo() => new IOSBatteryInfo();
|
||||
|
||||
public override Edges SafeAreaOverrideEdges =>
|
||||
// iOS shows a home indicator at the bottom, and adds a safe area to account for this.
|
||||
// Because we have the home indicator (mostly) hidden we don't really care about drawing in this region.
|
||||
Edges.Bottom;
|
||||
|
||||
private class IOSBatteryInfo : BatteryInfo
|
||||
{
|
||||
public override double ChargeLevel => Battery.ChargeLevel;
|
||||
|
Loading…
Reference in New Issue
Block a user