mirror of
https://github.com/ppy/osu.git
synced 2026-05-16 10:22:53 +08:00
14d8cf7275
- depends on https://github.com/ppy/osu-framework/pull/6700 - closes https://github.com/ppy/osu/issues/36340 - supersedes and closes https://github.com/ppy/osu/pull/36352 <img width="676" height="451" alt="image" src="https://github.com/user-attachments/assets/4f11c761-175b-495a-8b24-16fb6c481a15" /> --------- Co-authored-by: Dean Herbert <pe@ppy.sh>
39 lines
1.3 KiB
C#
39 lines
1.3 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 System.IO;
|
|
using osu.Framework.Allocation;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Sprites;
|
|
using osu.Framework.Graphics.UserInterface;
|
|
using osu.Framework.Localisation;
|
|
using osu.Game.Graphics.Sprites;
|
|
|
|
namespace osu.Game.Graphics.UserInterfaceV2.FileSelection
|
|
{
|
|
internal partial class OsuDirectorySelectorDirectory : DirectorySelectorDirectory
|
|
{
|
|
public OsuDirectorySelectorDirectory(DirectoryInfo directory, LocalisableString? displayName = null)
|
|
: base(directory, displayName)
|
|
{
|
|
}
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load(OsuColour colours)
|
|
{
|
|
Flow.AutoSizeAxes = Axes.X;
|
|
Flow.Height = OsuDirectorySelector.ITEM_HEIGHT;
|
|
|
|
AddInternal(new BackgroundLayer());
|
|
|
|
Colour = colours.Orange1;
|
|
}
|
|
|
|
protected override SpriteText CreateSpriteText() => new OsuSpriteText().With(t => t.Font = OsuFont.Default.With(weight: FontWeight.Bold));
|
|
|
|
protected override IconUsage? Icon => Directory.Name.Contains(Path.DirectorySeparatorChar)
|
|
? FontAwesome.Solid.Database
|
|
: FontAwesome.Regular.Folder;
|
|
}
|
|
}
|