osu/osu.Game/Overlays/Options/EditorSection.cs

48 lines
2.0 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:43:05 +00:00
using osu.Framework.Graphics;
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:43:05 +00:00
namespace osu.Game.Overlays.Options
{
2016-11-08 02:24:41 +00:00
public class EditorSection : OptionsSection
2016-11-03 04:43:05 +00:00
{
2016-11-09 04:16:04 +00:00
public override string Header => "Editor";
2016-11-09 03:38:40 +00:00
public override FontAwesome Icon => FontAwesome.fa_pencil;
private CheckBoxOption backgroundVideo, defaultSkin, snakingSliders, hitAnimations, followPoints, stacking;
2016-11-08 02:24:41 +00:00
public EditorSection()
2016-11-03 04:43:05 +00:00
{
content.Spacing = new Vector2(0, 5);
2016-11-03 04:43:05 +00:00
Children = new Drawable[]
{
2016-11-09 03:38:40 +00:00
backgroundVideo = new CheckBoxOption { LabelText = "Background video" },
defaultSkin = new CheckBoxOption { LabelText = "Always use default skin" },
snakingSliders = new CheckBoxOption { LabelText = "Snaking sliders" },
hitAnimations = new CheckBoxOption { LabelText = "Hit animations" },
followPoints = new CheckBoxOption { LabelText = "Follow points" },
stacking = new CheckBoxOption { LabelText = "Stacking" },
2016-11-03 04:43:05 +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)
{
backgroundVideo.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.VideoEditor);
defaultSkin.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorDefaultSkin);
snakingSliders.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorSnakingSliders);
hitAnimations.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorHitAnimations);
followPoints.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorFollowPoints);
stacking.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.EditorStacking);
}
2016-11-03 04:43:05 +00:00
}
}
}