1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 15:22:55 +08:00

Always show drag bar on mobile

This commit is contained in:
Dean Herbert 2023-11-24 17:46:02 +09:00
parent 7600595e5d
commit 3b41480bef
No known key found for this signature in database

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Framework;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
@ -67,7 +68,7 @@ namespace osu.Game.Overlays.Chat
}, },
DragBar = new DragArea DragBar = new DragArea
{ {
Alpha = 0, Alpha = RuntimeInfo.IsMobile ? 1 : 0,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Colour = colourProvider.Background4, Colour = colourProvider.Background4,
@ -77,13 +78,15 @@ namespace osu.Game.Overlays.Chat
protected override bool OnHover(HoverEvent e) protected override bool OnHover(HoverEvent e)
{ {
DragBar.FadeIn(100); if (!RuntimeInfo.IsMobile)
DragBar.FadeIn(100);
return base.OnHover(e); return base.OnHover(e);
} }
protected override void OnHoverLost(HoverLostEvent e) protected override void OnHoverLost(HoverLostEvent e)
{ {
DragBar.FadeOut(100); if (!RuntimeInfo.IsMobile)
DragBar.FadeOut(100);
base.OnHoverLost(e); base.OnHoverLost(e);
} }