mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Merge pull request #4179 from peppy/reg-screen-focus-fix
Allow deselection of textboxes on registration screen on mobile devices
This commit is contained in:
@ -10,6 +10,7 @@ using osu.Framework.Extensions.IEnumerableExtensions;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
|
using osu.Framework.Platform;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
@ -38,11 +39,13 @@ namespace osu.Game.Overlays.AccountCreation
|
|||||||
|
|
||||||
private OsuTextBox[] textboxes;
|
private OsuTextBox[] textboxes;
|
||||||
private ProcessingOverlay processingOverlay;
|
private ProcessingOverlay processingOverlay;
|
||||||
|
private GameHost host;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours, APIAccess api)
|
private void load(OsuColour colours, APIAccess api, GameHost host)
|
||||||
{
|
{
|
||||||
this.api = api;
|
this.api = api;
|
||||||
|
this.host = host;
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -139,7 +142,7 @@ namespace osu.Game.Overlays.AccountCreation
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
if (!textboxes.Any(t => t.HasFocus))
|
if (host?.OnScreenKeyboardOverlapsGameWindow != true && !textboxes.Any(t => t.HasFocus))
|
||||||
focusNextTextbox();
|
focusNextTextbox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user