1
0
Fork 0
mirror of https://github.com/ppy/osu-tools.git synced 2025-06-08 15:27:01 +09:00
osu-tools/PerformanceCalculatorGUI/Components/ScreenSelectionButton.cs
2022-07-21 03:36:54 +03:00

34 lines
1.1 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.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Beatmaps.Drawables.Cards;
using osu.Game.Input.Bindings;
using osu.Game.Overlays.Toolbar;
using osuTK;
namespace PerformanceCalculatorGUI.Components
{
public class ScreenSelectionButtonIcon : IconPill
{
public ScreenSelectionButtonIcon(IconUsage? icon = null)
: base(icon ?? FontAwesome.Solid.List)
{
}
public override LocalisableString TooltipText { get; }
}
internal class ScreenSelectionButton : ToolbarButton
{
public ScreenSelectionButton(string title, IconUsage? icon = null, GlobalAction? hotkey = null)
{
Width = PerformanceCalculatorSceneManager.CONTROL_AREA_HEIGHT;
Hotkey = hotkey;
TooltipMain = title;
SetIcon(new ScreenSelectionButtonIcon(icon) { IconSize = new Vector2(25) });
}
}
}