1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 02:11:05 +08:00
osu-lazer/osu.Game/Graphics/UserInterfaceV2/FileSelection/HiddenFilesToggleCheckbox.cs

42 lines
1.4 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.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays;
2022-07-12 04:39:53 +08:00
using osuTK;
using osuTK.Graphics;
2024-09-27 12:57:05 +08:00
namespace osu.Game.Graphics.UserInterfaceV2.FileSelection
{
2024-09-27 12:57:05 +08:00
internal partial class HiddenFilesToggleCheckbox : OsuCheckbox
{
2024-09-27 12:57:05 +08:00
public HiddenFilesToggleCheckbox()
{
RelativeSizeAxes = Axes.None;
2022-07-12 04:39:53 +08:00
AutoSizeAxes = Axes.None;
2024-09-26 18:42:20 +08:00
Size = new Vector2(140, OsuDirectorySelectorBreadcrumbDisplay.HEIGHT);
Margin = new MarginPadding { Right = OsuDirectorySelectorBreadcrumbDisplay.HORIZONTAL_PADDING, };
Anchor = Anchor.CentreLeft;
Origin = Anchor.CentreLeft;
2022-07-12 05:12:41 +08:00
LabelTextFlowContainer.Anchor = Anchor.CentreLeft;
LabelTextFlowContainer.Origin = Anchor.CentreLeft;
2022-07-12 05:12:14 +08:00
LabelText = @"Show hidden";
2024-09-26 18:42:20 +08:00
Scale = new Vector2(0.8f);
}
[BackgroundDependencyLoader(true)]
private void load(OverlayColourProvider? overlayColourProvider, OsuColour colours)
{
if (overlayColourProvider != null)
return;
Nub.AccentColour = colours.GreySeaFoamLighter;
Nub.GlowingAccentColour = Color4.White;
Nub.GlowColour = Color4.White;
}
}
}