-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Hide HoldForMenuButton
on non-touch devices
#26128
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -158,7 +158,7 @@ public HUDOverlay([CanBeNull] DrawableRuleset drawableRuleset, IReadOnlyList<Mod | |||||||||||||
Direction = FillDirection.Vertical, | ||||||||||||||
Children = new Drawable[] | ||||||||||||||
{ | ||||||||||||||
HoldToQuit = CreateHoldForMenuButton(), | ||||||||||||||
HoldToQuit = CreateHoldForMenuButton(touchDevice: mods.Any(m => m is ModTouchDevice)), | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than doing this, use osu/osu.Game/Screens/Play/PlayerTouchInputDetector.cs Lines 24 to 29 in 63a0ea5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't self resolve issues. This isn't even fixed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I misunderstood it as "dont pass anything to |
||||||||||||||
} | ||||||||||||||
}, | ||||||||||||||
LeaderboardFlow = new FillFlowContainer | ||||||||||||||
|
@@ -354,10 +354,11 @@ protected virtual void BindDrawableRuleset(DrawableRuleset drawableRuleset) | |||||||||||||
ShowHealth = { BindTarget = ShowHealthBar } | ||||||||||||||
}; | ||||||||||||||
|
||||||||||||||
protected HoldForMenuButton CreateHoldForMenuButton() => new HoldForMenuButton | ||||||||||||||
protected HoldForMenuButton CreateHoldForMenuButton(bool touchDevice) => new HoldForMenuButton | ||||||||||||||
{ | ||||||||||||||
Anchor = Anchor.BottomRight, | ||||||||||||||
Origin = Anchor.BottomRight, | ||||||||||||||
AutoHide = { Value = !touchDevice }, | ||||||||||||||
}; | ||||||||||||||
|
||||||||||||||
protected ModDisplay CreateModsContainer() => new ModDisplay | ||||||||||||||
|
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 tried allowing the alpha to clamp to 0, (and enabling
AlwaysPresent
on the container), however ran into issues with testing as the interpolation below seemed to never reach a fixed value.