-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Allow customisation of osu!mania mobile play behaviour #32314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow customisation of osu!mania mobile play behaviour #32314
Conversation
protected override void LoadComplete() | ||
{ | ||
base.LoadComplete(); | ||
updateMobileSizing(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure you'll want this to be called on invalidation (drawsize or similar). Mobile devices don't guarantee that the window size will never change, and currently there doesn't seem to be a flow to recalculate things when/if it does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public override bool RequiresPortraitOrientation => Beatmap.Stages.Count == 1; | ||
private bool playsWithTouchableColumns => Config.Get<ManiaMobilePlayStyle>(ManiaRulesetSetting.MobilePlayStyle) == ManiaMobilePlayStyle.TouchableColumns; | ||
|
||
public override bool RequiresPortraitOrientation => Beatmap.Stages.Count == 1 && playsWithTouchableColumns; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only queried on UserPlayingState
and Screen
changes. I guess we're relying on the former because the user has to play to get to settings? Not too keen on this..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main way in how this works is that RequiresPortraitOrientation
is queried when the current screen is changed to Player
, which queries this property which returns true or false based on the setting. I don't quite follow the concern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The concern is that you can open settings from the player screen and change the setting, which would not update this mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This requires restructuring around the RequiresPortraitOrientation
property to respond to changes from within the screen (i.e. make it a bindable). The following is a rough diff of the necessary changes to achieve this but I'm slightly hesitant to push it here as I feel it's adding too much content to review in this PR, should I proceed or would it be better to move it to a follow-up PR?
diff --git a/osu.Android/OsuGameAndroid.cs b/osu.Android/OsuGameAndroid.cs
index 932fc8454e..841049a2fd 100644
--- a/osu.Android/OsuGameAndroid.cs
+++ b/osu.Android/OsuGameAndroid.cs
@@ -6,6 +6,7 @@
using Android.Content.PM;
using Microsoft.Maui.Devices;
using osu.Framework.Allocation;
+using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Platform;
using osu.Game;
@@ -23,6 +24,8 @@ public partial class OsuGameAndroid : OsuGame
public override Vector2 ScalingContainerTargetDrawSize => new Vector2(1024, 1024 * DrawHeight / DrawWidth);
+ private readonly IBindable<bool> requiresPortraitOrientation = new BindableBool();
+
public OsuGameAndroid(OsuGameActivity activity)
: base(null)
{
@@ -77,19 +80,23 @@ protected override void LoadComplete()
{
base.LoadComplete();
UserPlayingState.BindValueChanged(_ => updateOrientation());
+ requiresPortraitOrientation.BindValueChanged(_ => updateOrientation());
}
protected override void ScreenChanged(IOsuScreen? current, IOsuScreen? newScreen)
{
base.ScreenChanged(current, newScreen);
+ if (current != null)
+ requiresPortraitOrientation.UnbindFrom(current.RequiresPortraitOrientation);
+
if (newScreen != null)
- updateOrientation();
+ requiresPortraitOrientation.BindTo(newScreen.RequiresPortraitOrientation);
}
private void updateOrientation()
{
- var orientation = MobileUtils.GetOrientation(this, (IOsuScreen)ScreenStack.CurrentScreen, gameActivity.IsTablet);
+ var orientation = MobileUtils.GetOrientation(this, requiresPortraitOrientation.Value, gameActivity.IsTablet);
switch (orientation)
{
diff --git a/osu.Game.Rulesets.Mania/UI/ColumnFlow.cs b/osu.Game.Rulesets.Mania/UI/ColumnFlow.cs
index 46a7a70f27..9bac8090fe 100644
--- a/osu.Game.Rulesets.Mania/UI/ColumnFlow.cs
+++ b/osu.Game.Rulesets.Mania/UI/ColumnFlow.cs
@@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using System;
-using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
diff --git a/osu.Game.Rulesets.Mania/UI/DrawableManiaRuleset.cs b/osu.Game.Rulesets.Mania/UI/DrawableManiaRuleset.cs
index 2dcbcacf93..daaae3015b 100644
--- a/osu.Game.Rulesets.Mania/UI/DrawableManiaRuleset.cs
+++ b/osu.Game.Rulesets.Mania/UI/DrawableManiaRuleset.cs
@@ -50,16 +50,13 @@ public partial class DrawableManiaRuleset : DrawableScrollingRuleset<ManiaHitObj
public IEnumerable<BarLine> BarLines;
- private bool playsWithTouchableColumns => Config.Get<ManiaMobilePlayStyle>(ManiaRulesetSetting.MobilePlayStyle) == ManiaMobilePlayStyle.TouchableColumns;
-
- public override bool RequiresPortraitOrientation => Beatmap.Stages.Count == 1 && playsWithTouchableColumns;
-
protected override bool RelativeScaleBeatLengths => true;
protected new ManiaRulesetConfigManager Config => (ManiaRulesetConfigManager)base.Config;
private readonly Bindable<ManiaScrollingDirection> configDirection = new Bindable<ManiaScrollingDirection>();
private readonly BindableDouble configScrollSpeed = new BindableDouble();
+ private readonly Bindable<ManiaMobilePlayStyle> mobilePlayStyle = new Bindable<ManiaMobilePlayStyle>();
private double currentTimeRange;
protected double TargetTimeRange;
@@ -114,7 +111,27 @@ private void load(ISkinSource source)
TimeRange.Value = TargetTimeRange = currentTimeRange = ComputeScrollTime(configScrollSpeed.Value);
- KeyBindingInputManager.Add(new ManiaTouchInputArea(this));
+ Config.BindWith(ManiaRulesetSetting.MobilePlayStyle, mobilePlayStyle);
+ mobilePlayStyle.BindValueChanged(_ => updateMobilePlayStyle(), true);
+ }
+
+ private ManiaTouchInputArea? touchInputArea;
+
+ private void updateMobilePlayStyle()
+ {
+ if (touchInputArea != null)
+ KeyBindingInputManager.Remove(touchInputArea, true);
+
+ switch (mobilePlayStyle.Value)
+ {
+ case ManiaMobilePlayStyle.TouchableColumns:
+ RequiresPortraitOrientation.Value = Beatmap.Stages.Count == 1 && mobilePlayStyle.Value == ManiaMobilePlayStyle.TouchableColumns;
+ break;
+
+ case ManiaMobilePlayStyle.TouchControls:
+ KeyBindingInputManager.Add(touchInputArea = new ManiaTouchInputArea(this));
+ break;
+ }
}
protected override void AdjustScrollSpeed(int amount) => configScrollSpeed.Value += amount;
diff --git a/osu.Game.Rulesets.Mania/UI/ManiaTouchInputArea.cs b/osu.Game.Rulesets.Mania/UI/ManiaTouchInputArea.cs
index 7cb6b3b96f..2a2faf0cf7 100644
--- a/osu.Game.Rulesets.Mania/UI/ManiaTouchInputArea.cs
+++ b/osu.Game.Rulesets.Mania/UI/ManiaTouchInputArea.cs
@@ -9,7 +9,6 @@
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Game.Configuration;
-using osu.Game.Rulesets.Mania.Configuration;
using osuTK;
namespace osu.Game.Rulesets.Mania.UI
@@ -41,13 +40,8 @@ public partial class ManiaTouchInputArea : VisibilityContainer
MaxValue = 1
};
- [Resolved]
- private ManiaRulesetConfigManager rulesetConfig { get; set; } = null!;
-
private GridContainer gridContainer = null!;
- private readonly BindableBool touchControls = new BindableBool();
-
public ManiaTouchInputArea(DrawableManiaRuleset drawableRuleset)
{
this.drawableRuleset = drawableRuleset;
@@ -80,7 +74,6 @@ private void load()
receptorGridContent.Add(new ColumnInputReceptor
{
Action = { BindTarget = column.Action },
- Enabled = { BindTarget = touchControls },
});
receptorGridDimensions.Add(new Dimension());
@@ -97,15 +90,9 @@ private void load()
};
}
- private IBindable<ManiaMobilePlayStyle> mobilePlayStyle = null!;
-
protected override void LoadComplete()
{
base.LoadComplete();
-
- mobilePlayStyle = rulesetConfig.GetBindable<ManiaMobilePlayStyle>(ManiaRulesetSetting.MobilePlayStyle);
- mobilePlayStyle.BindValueChanged(p => touchControls.Value = p.NewValue == ManiaMobilePlayStyle.TouchControls, true);
-
Opacity.BindValueChanged(o => Alpha = o.NewValue, true);
}
@@ -118,13 +105,8 @@ protected override bool OnKeyDown(KeyDownEvent e)
protected override bool OnTouchDown(TouchDownEvent e)
{
- if (touchControls.Value)
- {
- Show();
- return true;
- }
-
- return false;
+ Show();
+ return true;
}
protected override void PopIn()
@@ -140,7 +122,6 @@ protected override void PopOut()
public partial class ColumnInputReceptor : CompositeDrawable
{
public readonly IBindable<ManiaAction> Action = new Bindable<ManiaAction>();
- public readonly IBindable<bool> Enabled = new BindableBool();
private readonly Box highlightOverlay;
@@ -180,13 +161,8 @@ public ColumnInputReceptor()
protected override bool OnTouchDown(TouchDownEvent e)
{
- if (Enabled.Value)
- {
- updateButton(true);
- return false; // handled by parent container to show overlay.
- }
-
- return false;
+ updateButton(true);
+ return false; // handled by parent container to show overlay.
}
protected override void OnTouchUp(TouchUpEvent e)
diff --git a/osu.Game/Rulesets/UI/DrawableRuleset.cs b/osu.Game/Rulesets/UI/DrawableRuleset.cs
index 13d4b67132..2410339022 100644
--- a/osu.Game/Rulesets/UI/DrawableRuleset.cs
+++ b/osu.Game/Rulesets/UI/DrawableRuleset.cs
@@ -580,7 +580,7 @@ public HitWindows FirstAvailableHitWindows
/// <summary>
/// On mobile devices, this specifies whether this ruleset requires the device to be in portrait orientation.
/// </summary>
- public virtual bool RequiresPortraitOrientation => false;
+ public readonly Bindable<bool> RequiresPortraitOrientation = new BindableBool();
/// <summary>
/// Sets a replay to be used, overriding local input.
diff --git a/osu.Game/Screens/IOsuScreen.cs b/osu.Game/Screens/IOsuScreen.cs
index 0dfea463ac..4d1ba0d661 100644
--- a/osu.Game/Screens/IOsuScreen.cs
+++ b/osu.Game/Screens/IOsuScreen.cs
@@ -70,7 +70,7 @@ public interface IOsuScreen : IScreen
/// Setting this to <c>true</c> will display this screen in portrait orientation instead,
/// and switch back to landscape when transitioning back to a regular non-portrait screen.
/// </remarks>
- bool RequiresPortraitOrientation { get; }
+ IBindable<bool> RequiresPortraitOrientation { get; }
/// <summary>
/// Whether overlays should be able to be opened when this screen is current.
diff --git a/osu.Game/Screens/OsuScreen.cs b/osu.Game/Screens/OsuScreen.cs
index ce04db0189..b62815398f 100644
--- a/osu.Game/Screens/OsuScreen.cs
+++ b/osu.Game/Screens/OsuScreen.cs
@@ -47,7 +47,14 @@ public abstract partial class OsuScreen : Screen, IOsuScreen, IHasDescription
public virtual bool HideMenuCursorOnNonMouseInput => false;
- public virtual bool RequiresPortraitOrientation => false;
+ /// <summary>
+ /// The initial state of whether this screen requires the device to be in portrait orientation.
+ /// </summary>
+ protected virtual bool InitialRequiresPortraitOrientation => false;
+
+ public readonly Bindable<bool> RequiresPortraitOrientation;
+
+ IBindable<bool> IOsuScreen.RequiresPortraitOrientation => RequiresPortraitOrientation;
/// <summary>
/// The initial overlay activation mode to use when this screen is entered for the first time.
@@ -166,6 +173,7 @@ protected OsuScreen()
OverlayActivationMode = new Bindable<OverlayActivation>(InitialOverlayActivationMode);
BackButtonVisibility = new Bindable<bool>(InitialBackButtonVisibility);
+ RequiresPortraitOrientation = new Bindable<bool>(InitialRequiresPortraitOrientation);
}
[BackgroundDependencyLoader(true)]
diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs
index 92c483b24a..5e603a5ee8 100644
--- a/osu.Game/Screens/Play/Player.cs
+++ b/osu.Game/Screens/Play/Player.cs
@@ -68,17 +68,6 @@ public abstract partial class Player : ScreenWithBeatmapBackground, ISamplePlayb
public override bool HideMenuCursorOnNonMouseInput => true;
- public override bool RequiresPortraitOrientation
- {
- get
- {
- if (!LoadedBeatmapSuccessfully)
- return false;
-
- return DrawableRuleset!.RequiresPortraitOrientation;
- }
- }
-
protected override OverlayActivation InitialOverlayActivationMode => OverlayActivation.UserTriggered;
// We are managing our own adjustments (see OnEntering/OnExiting).
@@ -242,6 +231,8 @@ private void load(OsuConfigManager config, OsuGameBase game, CancellationToken c
DrawableRuleset = ruleset.CreateDrawableRulesetWith(playableBeatmap, gameplayMods);
dependencies.CacheAs(DrawableRuleset);
+ RequiresPortraitOrientation.BindTo(DrawableRuleset.RequiresPortraitOrientation);
+
if (DrawableRuleset is IDrawableScrollingRuleset scrollingRuleset)
dependencies.CacheAs(scrollingRuleset.ScrollingInfo);
diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs
index bd4b62fd59..1202695260 100644
--- a/osu.Game/Screens/Play/PlayerLoader.cs
+++ b/osu.Game/Screens/Play/PlayerLoader.cs
@@ -53,9 +53,6 @@ public partial class PlayerLoader : ScreenWithBeatmapBackground
public override bool? AllowGlobalTrackControl => false;
- // this makes the game stay in portrait mode when restarting gameplay rather than switching back to landscape.
- public override bool RequiresPortraitOrientation => CurrentPlayer?.RequiresPortraitOrientation == true;
-
public override float BackgroundParallaxAmount => quickRestart ? 0 : 1;
// Here because IsHovered will not update unless we do so.
@@ -305,6 +302,8 @@ public override void OnResuming(ScreenTransitionEvent e)
highPerformanceSession?.Dispose();
highPerformanceSession = null;
+ RequiresPortraitOrientation.UnbindAll();
+
// prepare for a retry.
CurrentPlayer = null;
playerConsumed = false;
@@ -602,6 +601,10 @@ private void pushWhenLoaded()
LoadTask = null;
+ // Synchronise portrait requirement with player screen so that the game stays in portrait
+ // when resuming back to player loader due to gameplay being restarted.
+ RequiresPortraitOrientation.BindTo(consumedPlayer.RequiresPortraitOrientation);
+
// By default, we want to load the player and never be returned to.
// Note that this may change if the player we load requested a re-run.
ValidForResume = false;
diff --git a/osu.Game/Utils/MobileUtils.cs b/osu.Game/Utils/MobileUtils.cs
index 6e59efb71c..05f231f7aa 100644
--- a/osu.Game/Utils/MobileUtils.cs
+++ b/osu.Game/Utils/MobileUtils.cs
@@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osu.Game.Screens;
using osu.Game.Screens.Play;
namespace osu.Game.Utils
@@ -12,14 +11,13 @@ public static class MobileUtils
/// Determines the correct <see cref="Orientation"/> state which a mobile device should be put into for the given information.
/// </summary>
/// <param name="userPlayInfo">Information about whether the user is currently playing.</param>
- /// <param name="currentScreen">The current screen which the user is at.</param>
+ /// <param name="requiresPortraitOrientation">Whether the game currently requires portrait orientation to display active content.</param>
/// <param name="isTablet">Whether the user is playing on a mobile tablet device instead of a phone.</param>
- public static Orientation GetOrientation(ILocalUserPlayInfo userPlayInfo, IOsuScreen currentScreen, bool isTablet)
+ public static Orientation GetOrientation(ILocalUserPlayInfo userPlayInfo, bool requiresPortraitOrientation, bool isTablet)
{
bool lockCurrentOrientation = userPlayInfo.PlayingState.Value == LocalUserPlayingState.Playing;
- bool lockToPortraitOnPhone = currentScreen.RequiresPortraitOrientation;
- if (lockToPortraitOnPhone && !isTablet)
+ if (requiresPortraitOrientation && !isTablet)
return Orientation.Portrait;
if (lockCurrentOrientation)
diff --git a/osu.iOS/OsuGameIOS.cs b/osu.iOS/OsuGameIOS.cs
index 96b8fb9804..f7cf84b21e 100644
--- a/osu.iOS/OsuGameIOS.cs
+++ b/osu.iOS/OsuGameIOS.cs
@@ -4,6 +4,7 @@
using System;
using Foundation;
using Microsoft.Maui.Devices;
+using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.iOS;
using osu.Framework.Platform;
@@ -25,6 +26,8 @@ public partial class OsuGameIOS : OsuGame
public override Vector2 ScalingContainerTargetDrawSize => new Vector2(1024, 1024 * DrawHeight / DrawWidth);
+ private readonly IBindable<bool> requiresPortraitOrientation = new BindableBool();
+
public OsuGameIOS(AppDelegate appDelegate)
{
this.appDelegate = appDelegate;
@@ -34,20 +37,24 @@ protected override void LoadComplete()
{
base.LoadComplete();
UserPlayingState.BindValueChanged(_ => updateOrientation());
+ requiresPortraitOrientation.BindValueChanged(_ => updateOrientation());
}
protected override void ScreenChanged(IOsuScreen? current, IOsuScreen? newScreen)
{
base.ScreenChanged(current, newScreen);
+ if (current != null)
+ requiresPortraitOrientation.UnbindFrom(current.RequiresPortraitOrientation);
+
if (newScreen != null)
- updateOrientation();
+ requiresPortraitOrientation.BindTo(newScreen.RequiresPortraitOrientation);
}
private void updateOrientation() => UIApplication.SharedApplication.InvokeOnMainThread(() =>
{
bool iPad = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad;
- var orientation = MobileUtils.GetOrientation(this, (IOsuScreen)ScreenStack.CurrentScreen, iPad);
+ var orientation = MobileUtils.GetOrientation(this, requiresPortraitOrientation.Value, iPad);
switch (orientation)
{
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's deal with this in a follow-up effort.
@@ -101,6 +118,30 @@ public void SetContentForColumn(int column, TContent content) | |||
Content[column] = columns[column].Child = content; | |||
} | |||
|
|||
private void updateMobileSizing() | |||
{ | |||
if (!IsLoaded || !RuntimeInfo.IsMobile || mobilePlayStyle.Value != ManiaMobilePlayStyle.ExtendedColumns) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like once a non-ExtendedColumns
mode is chosen, it will never return to the expected state if returning to ExtendedColumn
, unless I'm missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't pay attention to the ability to change settings during gameplay, since it's usually hard to do so on mobile, but I can add handling if preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it needs to work.
{ | ||
public enum ManiaMobilePlayStyle | ||
{ | ||
[LocalisableDescription(typeof(RulesetSettingsStrings), nameof(RulesetSettingsStrings.TouchableColumns))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean "portrait"? If so, it should be called Portrait
/ "Portrait (expanded columns)".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's kinda weird when thinking about both phones and tablets. On phones portrait is enforced, on tablets it's just allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggested names are still better to read so I've went ahead with them, b64e69d.
[LocalisableDescription(typeof(RulesetSettingsStrings), nameof(RulesetSettingsStrings.TouchControls))] | ||
TouchControls, | ||
|
||
[LocalisableDescription(typeof(RulesetSettingsStrings), nameof(RulesetSettingsStrings.ExtendedColumns))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean "landscape with expanded columns"?
Let's call it Landscape
/ "Landscape (expanded columns)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with both this and the one below if it's fine naming the "touchable columns" option as Portrait
despite not necessarily enforcing portrait on tablets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[LocalisableDescription(typeof(RulesetSettingsStrings), nameof(RulesetSettingsStrings.TouchableColumns))] | ||
TouchableColumns, | ||
|
||
[LocalisableDescription(typeof(RulesetSettingsStrings), nameof(RulesetSettingsStrings.TouchControls))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be moved to the first or last option and called LandscapeWithOverlay
/ "Landscape (touch overlay)".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base.LoadComplete(); | ||
|
||
mobilePlayStyle = rulesetConfig.GetBindable<ManiaMobilePlayStyle>(ManiaRulesetSetting.MobilePlayStyle); | ||
mobilePlayStyle.BindValueChanged(p => touchControls.Value = p.NewValue == ManiaMobilePlayStyle.TouchControls, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the touch controls will get stuck on the screen if the user disables them halfway through a play.
Also they don't seem to show up on desktop, and I'm not sure why. As far as I'm reading they should until the first key press.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They must be hidden by default, it's because this component inherits from VisibilityContainer
which hides by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please re-read. The case I'm touching on is where the user disables them during gameplay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Responding to this:
Also they don't seem to show up on desktop, and I'm not sure why. As far as I'm reading they should until the first key press.
Your first concern is valid since there's now necessity to handle changes during gameplay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <summary> | ||
/// "Mobile play style" | ||
/// </summary> | ||
public static LocalisableString MobilePlayStyle => new TranslatableString(getKey(@"mobile_play_style"), @"Mobile play style"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Mobile layout" maybe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -44,7 +44,12 @@ private void load() | |||
Keywords = new[] { "color" }, | |||
LabelText = RulesetSettingsStrings.TimingBasedColouring, | |||
Current = config.GetBindable<bool>(ManiaRulesetSetting.TimingBasedNoteColouring), | |||
} | |||
}, | |||
new SettingsEnumDropdown<ManiaMobilePlayStyle> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should be hidden on desktop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've kept it visible for laptops with touchscreen support but maybe better hiding it altogether?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that work though? When other pieces of the functionality are behind IsMobile
checks.
If we're showing for laptops the terminology needs to change drastically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've went ahead and guarded it against mobile check for simplicity purposes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also indirectly makes the setting effective during gameplay as requested.
…ontrols Allow customisation of osu!mania mobile play behaviour
There's now a dropdown in settings you can choose from to select how you want to play osu!mania on mobile. It is set to "Touchable columns" which is how osu! behaves recently, but you can select "Touch controls" or "Extended columns" to return back to old behaviour.
For the extended columns feature, I've copied logic verbatim from #25777.