1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-24 20:47:24 +08:00
osu-lazer/osu.Game/Overlays/Mods/ModPresetPanel.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.1 KiB
C#
Raw Normal View History

// 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.Bindables;
using osu.Framework.Graphics.Cursor;
2022-07-24 00:01:11 +08:00
using osu.Game.Database;
using osu.Game.Graphics;
using osu.Game.Rulesets.Mods;
namespace osu.Game.Overlays.Mods
{
2022-07-23 01:14:39 +08:00
public class ModPresetPanel : ModSelectPanel, IHasCustomTooltip<ModPreset>
{
2022-07-24 00:01:11 +08:00
public readonly Live<ModPreset> Preset;
public override BindableBool Active { get; } = new BindableBool();
2022-07-24 00:01:11 +08:00
public ModPresetPanel(Live<ModPreset> preset)
{
Preset = preset;
2022-07-24 00:01:11 +08:00
Title = preset.Value.Name;
Description = preset.Value.Description;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
AccentColour = colours.Orange1;
}
2022-07-24 00:01:11 +08:00
public ModPreset TooltipContent => Preset.Value;
public ITooltip<ModPreset> GetCustomTooltip() => new ModPresetTooltip(ColourProvider);
}
}