mirror of
https://github.com/ppy/osu.git
synced 2024-09-23 08:47:24 +08:00
71 lines
2.3 KiB
C#
71 lines
2.3 KiB
C#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using osu.Framework.Allocation;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Containers;
|
|
using osu.Framework.Graphics.Primitives;
|
|
using osu.Game.Graphics;
|
|
using osu.Game.Graphics.Sprites;
|
|
using osu.Game.Modes;
|
|
using OpenTK;
|
|
using OpenTK.Graphics;
|
|
|
|
namespace osu.Game.Overlays.Options
|
|
{
|
|
public class OptionsFooter : FillFlowContainer
|
|
{
|
|
[BackgroundDependencyLoader]
|
|
private void load(OsuGameBase game, OsuColour colours)
|
|
{
|
|
RelativeSizeAxes = Axes.X;
|
|
AutoSizeAxes = Axes.Y;
|
|
Direction = FillDirection.Vertical;
|
|
Padding = new MarginPadding { Top = 20, Bottom = 30 };
|
|
|
|
var modes = new List<Drawable>();
|
|
|
|
foreach (var ruleset in RulesetCollection.AllRulesets)
|
|
{
|
|
modes.Add(new TextAwesome
|
|
{
|
|
Icon = ruleset.Icon,
|
|
Colour = Color4.Gray,
|
|
TextSize = 20
|
|
});
|
|
}
|
|
|
|
Children = new Drawable[]
|
|
{
|
|
new FillFlowContainer
|
|
{
|
|
Anchor = Anchor.TopCentre,
|
|
Origin = Anchor.TopCentre,
|
|
Direction = FillDirection.Full,
|
|
AutoSizeAxes = Axes.Both,
|
|
Children = modes,
|
|
Spacing = new Vector2(5),
|
|
Padding = new MarginPadding { Bottom = 10 },
|
|
},
|
|
new OsuSpriteText
|
|
{
|
|
Anchor = Anchor.TopCentre,
|
|
Origin = Anchor.TopCentre,
|
|
Text = game.Name,
|
|
TextSize = 18,
|
|
Font = @"Exo2.0-Bold",
|
|
},
|
|
new OsuSpriteText
|
|
{
|
|
Anchor = Anchor.TopCentre,
|
|
Origin = Anchor.TopCentre,
|
|
TextSize = 14,
|
|
Text = game.Version,
|
|
Colour = game.IsDebug ? colours.Red : Color4.White,
|
|
},
|
|
};
|
|
}
|
|
}
|
|
} |