mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 16:37:26 +08:00
Wire up remaining sliders, except for ints
This commit is contained in:
parent
a350e95e40
commit
3aefa4d6a5
@ -96,6 +96,7 @@ namespace osu.Game.Configuration
|
|||||||
Set(OsuConfig.MouseDisableWheel, false);
|
Set(OsuConfig.MouseDisableWheel, false);
|
||||||
Set(OsuConfig.MouseSpeed, 1, 0.4, 6);
|
Set(OsuConfig.MouseSpeed, 1, 0.4, 6);
|
||||||
Set(OsuConfig.Offset, 0, -300, 300);
|
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.ScoreMeterScale, 1, 0.5, OsuGame.Tournament ? 10 : 2);
|
||||||
Set(OsuConfig.DistanceSpacing, 0.8, 0.1, 6);
|
Set(OsuConfig.DistanceSpacing, 0.8, 0.1, 6);
|
||||||
Set(OsuConfig.EditorBeatDivisor, 1, 1, 16);
|
Set(OsuConfig.EditorBeatDivisor, 1, 1, 16);
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//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;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Audio
|
namespace osu.Game.Overlays.Options.Audio
|
||||||
@ -11,11 +14,19 @@ namespace osu.Game.Overlays.Options.Audio
|
|||||||
{
|
{
|
||||||
protected override string Header => "Offset Adjustment";
|
protected override string Header => "Offset Adjustment";
|
||||||
|
|
||||||
public OffsetAdjustmentOptions()
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
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
|
new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
@ -19,10 +20,21 @@ namespace osu.Game.Overlays.Options.Gameplay
|
|||||||
{
|
{
|
||||||
Children = new Drawable[]
|
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 = "Progress display: TODO dropdown" },
|
||||||
new SpriteText { Text = "Score meter type: 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
|
new CheckBoxOption
|
||||||
{
|
{
|
||||||
LabelText = "Always show key overlay",
|
LabelText = "Always show key overlay",
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//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;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Configuration;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Gameplay
|
namespace osu.Game.Overlays.Options.Gameplay
|
||||||
{
|
{
|
||||||
@ -10,13 +15,38 @@ namespace osu.Game.Overlays.Options.Gameplay
|
|||||||
{
|
{
|
||||||
protected override string Header => "Song Select";
|
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[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new SpriteText { Text = "Display beatmaps from: TODO slider" },
|
new OptionsSlider { Label = "Display beatmaps from", Bindable = starMinimum },
|
||||||
new SpriteText { Text = "up to: TODO slider" },
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
@ -30,10 +31,19 @@ namespace osu.Game.Overlays.Options.Graphics
|
|||||||
LabelText = "Letterboxing",
|
LabelText = "Letterboxing",
|
||||||
Bindable = config.GetBindable<bool>(OsuConfig.Letterboxing),
|
Bindable = config.GetBindable<bool>(OsuConfig.Letterboxing),
|
||||||
},
|
},
|
||||||
new SpriteText { Text = "Horizontal position" },
|
// TODO: deal with bindable ints
|
||||||
new SpriteText { Text = "TODO: slider" },
|
/*
|
||||||
new SpriteText { Text = "Vertical position" },
|
new OptionsSlider
|
||||||
new SpriteText { Text = "TODO: slider" },
|
{
|
||||||
|
Label = "Horizontal position",
|
||||||
|
Bindable = config.GetBindable<int>(OsuConfig.LetterboxPositionX)
|
||||||
|
},
|
||||||
|
new OptionsSlider
|
||||||
|
{
|
||||||
|
Label = "Vertical position",
|
||||||
|
Bindable = config.GetBindable<int>(OsuConfig.LetterboxPositionY)
|
||||||
|
},
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,11 @@ namespace osu.Game.Overlays.Options
|
|||||||
public string Label
|
public string Label
|
||||||
{
|
{
|
||||||
get { return text.Text; }
|
get { return text.Text; }
|
||||||
set { text.Text = value; }
|
set
|
||||||
|
{
|
||||||
|
text.Text = value;
|
||||||
|
text.Alpha = string.IsNullOrEmpty(value) ? 0 : 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public BindableDouble Bindable
|
public BindableDouble Bindable
|
||||||
@ -33,7 +37,7 @@ namespace osu.Game.Overlays.Options
|
|||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
text = new SpriteText(),
|
text = new SpriteText { Alpha = 0 },
|
||||||
slider = new SliderBar
|
slider = new SliderBar
|
||||||
{
|
{
|
||||||
Margin = new MarginPadding { Top = 5 },
|
Margin = new MarginPadding { Top = 5 },
|
||||||
|
Loading…
Reference in New Issue
Block a user