2020-04-16 08:01:36 +00:00
|
|
|
|
// 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.
|
|
|
|
|
|
2020-04-16 09:05:51 +00:00
|
|
|
|
using System;
|
2020-04-16 08:01:36 +00:00
|
|
|
|
using osu.Game.Overlays.Dashboard;
|
2020-04-16 09:05:51 +00:00
|
|
|
|
using osu.Game.Overlays.Dashboard.Friends;
|
2020-04-16 08:01:36 +00:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays
|
|
|
|
|
{
|
2021-01-18 18:22:50 +00:00
|
|
|
|
public partial class DashboardOverlay : TabbableOnlineOverlay<DashboardOverlayHeader, DashboardOverlayTabs>
|
2020-04-16 08:01:36 +00:00
|
|
|
|
{
|
|
|
|
|
public DashboardOverlay()
|
2021-01-18 07:48:12 +00:00
|
|
|
|
: base(OverlayColourScheme.Purple)
|
2020-04-20 06:34:48 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-18 07:48:12 +00:00
|
|
|
|
protected override DashboardOverlayHeader CreateHeader() => new DashboardOverlayHeader();
|
|
|
|
|
|
2022-05-28 10:04:25 +00:00
|
|
|
|
public override bool AcceptsFocus => false;
|
|
|
|
|
|
2021-01-18 18:22:50 +00:00
|
|
|
|
protected override void CreateDisplayToLoad(DashboardOverlayTabs tab)
|
2020-04-16 09:05:51 +00:00
|
|
|
|
{
|
2021-01-18 18:22:50 +00:00
|
|
|
|
switch (tab)
|
2020-04-16 09:05:51 +00:00
|
|
|
|
{
|
|
|
|
|
case DashboardOverlayTabs.Friends:
|
2021-01-18 18:22:50 +00:00
|
|
|
|
LoadDisplay(new FriendDisplay());
|
2020-04-16 09:05:51 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2020-10-28 08:19:14 +00:00
|
|
|
|
case DashboardOverlayTabs.CurrentlyPlaying:
|
2021-01-18 18:22:50 +00:00
|
|
|
|
LoadDisplay(new CurrentlyPlayingDisplay());
|
2020-10-28 08:19:14 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2020-04-16 09:05:51 +00:00
|
|
|
|
default:
|
2021-01-18 18:22:50 +00:00
|
|
|
|
throw new NotImplementedException($"Display for {tab} tab is not implemented");
|
2020-04-16 09:05:51 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-04-16 08:01:36 +00:00
|
|
|
|
}
|
|
|
|
|
}
|