2022-07-22 04:01:03 +08: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.
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Bindables;
|
2022-07-22 04:34:54 +08:00
|
|
|
using osu.Framework.Graphics.Cursor;
|
2022-07-22 04:01:03 +08:00
|
|
|
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-22 04:01:03 +08:00
|
|
|
{
|
2022-07-22 04:34:54 +08:00
|
|
|
public readonly ModPreset Preset;
|
|
|
|
|
2022-07-22 04:01:03 +08:00
|
|
|
public override BindableBool Active { get; } = new BindableBool();
|
|
|
|
|
|
|
|
public ModPresetPanel(ModPreset preset)
|
|
|
|
{
|
2022-07-22 04:34:54 +08:00
|
|
|
Preset = preset;
|
|
|
|
|
2022-07-22 04:01:03 +08:00
|
|
|
Title = preset.Name;
|
|
|
|
Description = preset.Description;
|
|
|
|
}
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
{
|
|
|
|
AccentColour = colours.Orange1;
|
|
|
|
}
|
2022-07-22 04:34:54 +08:00
|
|
|
|
|
|
|
public ModPreset TooltipContent => Preset;
|
|
|
|
public ITooltip<ModPreset> GetCustomTooltip() => new ModPresetTooltip(ColourProvider);
|
2022-07-22 04:01:03 +08:00
|
|
|
}
|
|
|
|
}
|