1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-10 02:53:39 +08:00
Files
osu-lazer/osu.Game/Screens/OnlinePlay/Matchmaking/Match/ScreenMatchmaking.HistoryFooterButton.cs
T
2025-11-05 16:42:32 +09:00

41 lines
1.2 KiB
C#

// 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.
using osu.Framework.Allocation;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.Footer;
namespace osu.Game.Screens.OnlinePlay.Matchmaking.Match
{
public partial class ScreenMatchmaking
{
private partial class HistoryFooterButton : ScreenFooterButton
{
[Resolved]
private OsuGame? game { get; set; }
private readonly MultiplayerRoom room;
public HistoryFooterButton(MultiplayerRoom room)
{
this.room = room;
Action = openRoomHistory;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
Text = "History";
Icon = FontAwesome.Solid.Globe;
AccentColour = colours.Lime1;
}
private void openRoomHistory()
=> game?.OpenUrlExternally($@"/multiplayer/rooms/{room.RoomID}/events");
}
}
}