1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:47:28 +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
@ -10,18 +13,26 @@ namespace osu.Game.Overlays.Options.Audio
public class OffsetAdjustmentOptions : OptionsSubsection
{
protected override string Header => "Offset Adjustment";
public OffsetAdjustmentOptions()
{
Children = new Drawable[]
{
new SpriteText { Text = "Universal Offset: TODO slider" },
new OsuButton
{
RelativeSizeAxes = Axes.X,
Text = "Offset wizard"
}
};
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
Children = new Drawable[]
{
// TODO: bindable int crap
/*
new OptionsSlider
{
Label = "Universal Offset",
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.Offset)
},
*/
new OsuButton
{
RelativeSizeAxes = Axes.X,
Text = "Offset wizard"
}
};
}
}
}
}

View File

@ -1,49 +1,61 @@
//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;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Gameplay
{
public class GeneralGameplayOptions : OptionsSubsection
{
protected override string Header => "General";
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
Children = new Drawable[]
{
new SpriteText { Text = "Background dim: TODO slider" },
new SpriteText { Text = "Progress display: TODO dropdown" },
new SpriteText { Text = "Score meter type: TODO dropdown" },
new SpriteText { Text = "Score meter size: TODO slider" },
new CheckBoxOption
{
LabelText = "Always show key overlay",
Bindable = config.GetBindable<bool>(OsuConfig.KeyOverlay)
},
new CheckBoxOption
{
LabelText = "Show approach circle on first \"Hidden\" object",
Bindable = config.GetBindable<bool>(OsuConfig.HiddenShowFirstApproach)
},
new CheckBoxOption
{
LabelText = "Scale osu!mania scroll speed with BPM",
Bindable = config.GetBindable<bool>(OsuConfig.ManiaSpeedBPMScale)
},
new CheckBoxOption
{
LabelText = "Remember osu!mania scroll speed per beatmap",
Bindable = config.GetBindable<bool>(OsuConfig.UsePerBeatmapManiaSpeed)
},
};
}
}
}
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;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Gameplay
{
public class GeneralGameplayOptions : OptionsSubsection
{
protected override string Header => "General";
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
Children = new Drawable[]
{
// 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 OptionsSlider
{
Label = "Score meter size",
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.ScoreMeterScale)
},
new CheckBoxOption
{
LabelText = "Always show key overlay",
Bindable = config.GetBindable<bool>(OsuConfig.KeyOverlay)
},
new CheckBoxOption
{
LabelText = "Show approach circle on first \"Hidden\" object",
Bindable = config.GetBindable<bool>(OsuConfig.HiddenShowFirstApproach)
},
new CheckBoxOption
{
LabelText = "Scale osu!mania scroll speed with BPM",
Bindable = config.GetBindable<bool>(OsuConfig.ManiaSpeedBPMScale)
},
new CheckBoxOption
{
LabelText = "Remember osu!mania scroll speed per beatmap",
Bindable = config.GetBindable<bool>(OsuConfig.UsePerBeatmapManiaSpeed)
},
};
}
}
}

View File

@ -1,23 +1,53 @@
//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
{
public class SongSelectGameplayOptions : OptionsSubsection
{
protected override string Header => "Song Select";
public SongSelectGameplayOptions()
{
Children = new Drawable[]
{
new SpriteText { Text = "Display beatmaps from: TODO slider" },
new SpriteText { Text = "up to: TODO slider" },
};
}
protected override string Header => "Song Select";
//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 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 },