Add iOS mouse settings

Functionality is currently limited to some OsuSettings, but will expand in
the future when high precision mouse is added.
This commit is contained in:
Susko3
2022-01-15 14:48:41 +01:00
parent 037e56f13e
commit d4af8498af
3 changed files with 52 additions and 0 deletions

View File

@ -3,7 +3,10 @@
using System;
using Foundation;
using osu.Framework.Input.Handlers;
using osu.Framework.iOS.Input;
using osu.Game;
using osu.Game.Overlays.Settings;
using osu.Game.Updater;
using osu.Game.Utils;
using Xamarin.Essentials;
@ -18,6 +21,18 @@ namespace osu.iOS
protected override BatteryInfo CreateBatteryInfo() => new IOSBatteryInfo();
public override SettingsSubsection CreateSettingsSubsectionFor(InputHandler handler)
{
switch (handler)
{
case IOSMouseHandler _:
return new IOSMouseSettings();
default:
return base.CreateSettingsSubsectionFor(handler);
}
}
private class IOSBatteryInfo : BatteryInfo
{
public override double ChargeLevel => Battery.ChargeLevel;