1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Wire up remaining sliders, except for ints

This commit is contained in:
Drew DeVault 2016-11-30 10:32:07 -05:00
parent a350e95e40
commit 3aefa4d6a5
6 changed files with 143 additions and 75 deletions

View File

@ -96,6 +96,7 @@ namespace osu.Game.Configuration
Set(OsuConfig.MouseDisableWheel, false);
Set(OsuConfig.MouseSpeed, 1, 0.4, 6);
Set(OsuConfig.Offset, 0, -300, 300);
Set(OsuConfig.ScoreMeterScale, 1, 0.5, 2);
//Set(OsuConfig.ScoreMeterScale, 1, 0.5, OsuGame.Tournament ? 10 : 2);
Set(OsuConfig.DistanceSpacing, 0.8, 0.1, 6);
Set(OsuConfig.EditorBeatDivisor, 1, 1, 16);

View File

@ -1,8 +1,11 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options.Audio
@ -11,11 +14,19 @@ namespace osu.Game.Overlays.Options.Audio
{
protected override string Header => "Offset Adjustment";
public OffsetAdjustmentOptions()
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
Children = new Drawable[]
{
new SpriteText { Text = "Universal Offset: TODO slider" },
// TODO: bindable int crap
/*
new OptionsSlider
{
Label = "Universal Offset",
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.Offset)
},
*/
new OsuButton
{
RelativeSizeAxes = Axes.X,

View File

@ -3,6 +3,7 @@
using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
@ -19,10 +20,21 @@ namespace osu.Game.Overlays.Options.Gameplay
{
Children = new Drawable[]
{
new SpriteText { Text = "Background dim: TODO slider" },
// TODO: bindable int stuff
/*
new OptionsSlider
{
Label = "Background dim",
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.DimLevel)
},
*/
new SpriteText { Text = "Progress display: TODO dropdown" },
new SpriteText { Text = "Score meter type: TODO dropdown" },
new SpriteText { Text = "Score meter size: TODO slider" },
new OptionsSlider
{
Label = "Score meter size",
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.ScoreMeterScale)
},
new CheckBoxOption
{
LabelText = "Always show key overlay",

View File

@ -1,8 +1,13 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options.Gameplay
{
@ -10,13 +15,38 @@ namespace osu.Game.Overlays.Options.Gameplay
{
protected override string Header => "Song Select";
public SongSelectGameplayOptions()
//private BindableInt starMinimum, starMaximum;
//private StarCounter counterMin, counterMax;
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
// TODO: Deal with bindable ints
/*
starMinimum = config.GetBindable<int>(OsuConfig.DisplayStarsMinimum);
starMaximum = config.GetBindable<int>(OsuConfig.DisplayStarsMaximum);
Children = new Drawable[]
{
new SpriteText { Text = "Display beatmaps from: TODO slider" },
new SpriteText { Text = "up to: TODO slider" },
new OptionsSlider { Label = "Display beatmaps from", Bindable = starMinimum },
counterMin = new StarCounter { Count = starMinimum.Value },
new OptionsSlider { Label = "up to", Bindable = starMaximum },
counterMax = new StarCounter { Count = starMaximum.Value },
};
starMinimum.ValueChanged += starValueChanged;
starMaximum.ValueChanged += starValueChanged;*/
}
private void starValueChanged(object sender, EventArgs e)
{
//counterMin.Count = starMinimum.Value;
//counterMax.Count = starMaximum.Value;
}
protected override void Dispose(bool isDisposing)
{
//starMinimum.ValueChanged -= starValueChanged;
//starMaximum.ValueChanged -= starValueChanged;
base.Dispose(isDisposing);
}
}
}

View File

@ -3,6 +3,7 @@
using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
@ -30,10 +31,19 @@ namespace osu.Game.Overlays.Options.Graphics
LabelText = "Letterboxing",
Bindable = config.GetBindable<bool>(OsuConfig.Letterboxing),
},
new SpriteText { Text = "Horizontal position" },
new SpriteText { Text = "TODO: slider" },
new SpriteText { Text = "Vertical position" },
new SpriteText { Text = "TODO: slider" },
// TODO: deal with bindable ints
/*
new OptionsSlider
{
Label = "Horizontal position",
Bindable = config.GetBindable<int>(OsuConfig.LetterboxPositionX)
},
new OptionsSlider
{
Label = "Vertical position",
Bindable = config.GetBindable<int>(OsuConfig.LetterboxPositionY)
},
*/
};
}
}

View File

@ -17,7 +17,11 @@ namespace osu.Game.Overlays.Options
public string Label
{
get { return text.Text; }
set { text.Text = value; }
set
{
text.Text = value;
text.Alpha = string.IsNullOrEmpty(value) ? 0 : 1;
}
}
public BindableDouble Bindable
@ -33,7 +37,7 @@ namespace osu.Game.Overlays.Options
AutoSizeAxes = Axes.Y;
Children = new Drawable[]
{
text = new SpriteText(),
text = new SpriteText { Alpha = 0 },
slider = new SliderBar
{
Margin = new MarginPadding { Top = 5 },