osu/osu.Game/Overlays/Options/SkinSection.cs

64 lines
2.6 KiB
C#
Raw Normal View History

2016-11-08 02:28:06 +00:00
using OpenTK;
2016-11-09 03:38:40 +00:00
using osu.Framework;
2016-11-03 04:26:49 +00:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
2016-11-09 03:38:40 +00:00
using osu.Game.Configuration;
using osu.Game.Graphics;
2016-11-03 04:26:49 +00:00
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options
{
2016-11-08 02:24:41 +00:00
public class SkinSection : OptionsSection
2016-11-03 04:26:49 +00:00
{
protected override string Header => "Skin";
2016-11-09 03:38:40 +00:00
public override FontAwesome Icon => FontAwesome.fa_paint_brush;
private CheckBoxOption ignoreSkins, useSkinSoundSamples, useTaikoSkin, useSkinCursor, autoCursorSize;
2016-11-08 02:24:41 +00:00
public SkinSection()
2016-11-03 04:26:49 +00:00
{
content.Spacing = new Vector2(0, 5);
2016-11-03 04:26:49 +00:00
Children = new Drawable[]
{
new SpriteText { Text = "TODO: Skin preview textures" },
new SpriteText { Text = "Current skin: TODO dropdown" },
new OsuButton
2016-11-03 04:26:49 +00:00
{
RelativeSizeAxes = Axes.X,
Text = "Preview gameplay",
},
new OsuButton
{
RelativeSizeAxes = Axes.X,
Text = "Open skin folder",
},
new OsuButton
{
RelativeSizeAxes = Axes.X,
Text = "Export as .osk",
},
2016-11-09 03:38:40 +00:00
ignoreSkins = new CheckBoxOption { LabelText = "Ignore all beatmap skins" },
useSkinSoundSamples = new CheckBoxOption { LabelText = "Use skin's sound samples" },
useTaikoSkin = new CheckBoxOption { LabelText = "Use Taiko skin for Taiko mode" },
useSkinCursor = new CheckBoxOption { LabelText = "Always use skin cursor" },
new SpriteText { Text = "Cursor size: TODO slider" },
2016-11-09 03:38:40 +00:00
autoCursorSize = new CheckBoxOption { LabelText = "Automatic cursor size" },
2016-11-03 04:26:49 +00:00
};
2016-11-09 03:38:40 +00:00
}
protected override void Load(BaseGame game)
{
base.Load(game);
var osuGame = game as OsuGameBase;
if (osuGame != null)
{
ignoreSkins.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.IgnoreBeatmapSkins);
useSkinSoundSamples.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.SkinSamples);
useTaikoSkin.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.UseTaikoSkin);
useSkinCursor.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.UseSkinCursor);
autoCursorSize.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.AutomaticCursorSizing);
}
2016-11-03 04:26:49 +00:00
}
}
}