mirror of
https://github.com/ppy/osu
synced 2025-02-21 04:57:11 +00:00
Merge pull request #2023 from peppy/fix-skip-button
Fix skip button not receiving screen-wide input
This commit is contained in:
commit
fdcab55c51
@ -32,6 +32,8 @@ namespace osu.Game.Screens.Play
|
||||
private FadeContainer fadeContainer;
|
||||
private double displayTime;
|
||||
|
||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true;
|
||||
|
||||
public SkipButton(double startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
@ -153,16 +155,11 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public Visibility State
|
||||
{
|
||||
get
|
||||
{
|
||||
return state;
|
||||
}
|
||||
get { return state; }
|
||||
set
|
||||
{
|
||||
if (state == value)
|
||||
return;
|
||||
bool stateChanged = value != state;
|
||||
|
||||
var lastState = state;
|
||||
state = value;
|
||||
|
||||
scheduledHide?.Cancel();
|
||||
@ -170,7 +167,8 @@ namespace osu.Game.Screens.Play
|
||||
switch (state)
|
||||
{
|
||||
case Visibility.Visible:
|
||||
if (lastState == Visibility.Hidden)
|
||||
// we may be triggered to become visible mnultiple times but we only want to transform once.
|
||||
if (stateChanged)
|
||||
this.FadeIn(500, Easing.OutExpo);
|
||||
|
||||
if (!IsHovered)
|
||||
|
Loading…
Reference in New Issue
Block a user