mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:43:20 +08:00
Merge branch 'master' into master
This commit is contained in:
commit
79755e1826
@ -7,12 +7,11 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
{
|
{
|
||||||
public class ChangelogUpdateStreamControl : OverlayStreamControl<APIUpdateStream>
|
public class ChangelogUpdateStreamControl : OverlayStreamControl<APIUpdateStream>
|
||||||
{
|
{
|
||||||
protected override OverlayStreamItem<APIUpdateStream> CreateStreamItem(APIUpdateStream value) => new ChangelogUpdateStreamItem(value);
|
public ChangelogUpdateStreamControl()
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
{
|
||||||
// suppress base logic of immediately selecting first item if one exists
|
SelectFirstTabByDefault = false;
|
||||||
// (we always want to start with no stream selected).
|
}
|
||||||
}
|
|
||||||
|
protected override OverlayStreamItem<APIUpdateStream> CreateStreamItem(APIUpdateStream value) => new ChangelogUpdateStreamItem(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,15 +73,19 @@ namespace osu.Game
|
|||||||
// find closest valid target
|
// find closest valid target
|
||||||
IScreen current = getCurrentScreen();
|
IScreen current = getCurrentScreen();
|
||||||
|
|
||||||
|
if (current == null)
|
||||||
|
return;
|
||||||
|
|
||||||
// a dialog may be blocking the execution for now.
|
// a dialog may be blocking the execution for now.
|
||||||
if (checkForDialog(current)) return;
|
if (checkForDialog(current)) return;
|
||||||
|
|
||||||
game?.CloseAllOverlays(false);
|
game?.CloseAllOverlays(false);
|
||||||
|
|
||||||
// we may already be at the target screen type.
|
// we may already be at the target screen type.
|
||||||
if (validScreens.Contains(getCurrentScreen().GetType()) && !beatmap.Disabled)
|
if (validScreens.Contains(current.GetType()) && !beatmap.Disabled)
|
||||||
{
|
{
|
||||||
complete();
|
finalAction(current);
|
||||||
|
Cancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,11 +139,5 @@ namespace osu.Game
|
|||||||
lastEncounteredDialogScreen = current;
|
lastEncounteredDialogScreen = current;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void complete()
|
|
||||||
{
|
|
||||||
finalAction(getCurrentScreen());
|
|
||||||
Cancel();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user