1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-19 12:13:20 +08:00

s/OptionsDropdown/DropdownOption/g

This commit is contained in:
Drew DeVault 2016-12-01 17:33:30 -05:00
parent 4757a1c433
commit 5456e0102c
7 changed files with 15 additions and 15 deletions

View File

@ -12,12 +12,12 @@ using osu.Game.Configuration;
namespace osu.Game.Overlays.Options namespace osu.Game.Overlays.Options
{ {
public class OptionsDropdown<T> : FlowContainer public class DropdownOption<T> : FlowContainer
{ {
private DropDownMenu<T> dropdown; private DropDownMenu<T> dropdown;
private SpriteText text; private SpriteText text;
public string Label public string LabelText
{ {
get { return text.Text; } get { return text.Text; }
set set
@ -47,7 +47,7 @@ namespace osu.Game.Overlays.Options
dropdown.SelectedValue = bindable.Value; dropdown.SelectedValue = bindable.Value;
} }
public OptionsDropdown() public DropdownOption()
{ {
if (!typeof(T).IsEnum) if (!typeof(T).IsEnum)
throw new InvalidOperationException("OptionsDropdown only supports enums as the generic type argument"); throw new InvalidOperationException("OptionsDropdown only supports enums as the generic type argument");

View File

@ -25,14 +25,14 @@ namespace osu.Game.Overlays.Options.Gameplay
LabelText = "Background dim", LabelText = "Background dim",
Bindable = (BindableInt)config.GetBindable<int>(OsuConfig.DimLevel) Bindable = (BindableInt)config.GetBindable<int>(OsuConfig.DimLevel)
}, },
new OptionsDropdown<ProgressBarType> new DropdownOption<ProgressBarType>
{ {
Label = "Progress display", LabelText = "Progress display",
Bindable = config.GetBindable<ProgressBarType>(OsuConfig.ProgressBarType) Bindable = config.GetBindable<ProgressBarType>(OsuConfig.ProgressBarType)
}, },
new OptionsDropdown<ScoreMeterType> new DropdownOption<ScoreMeterType>
{ {
Label = "Score meter type", LabelText = "Score meter type",
Bindable = config.GetBindable<ScoreMeterType>(OsuConfig.ScoreMeter) Bindable = config.GetBindable<ScoreMeterType>(OsuConfig.ScoreMeter)
}, },
new SliderOption<double> new SliderOption<double>

View File

@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Options.General
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
new OptionsDropdown<ReleaseStream> new DropdownOption<ReleaseStream>
{ {
Label = "Release stream", Label = "Release stream",
Bindable = config.GetBindable<ReleaseStream>(OsuConfig.ReleaseStream), Bindable = config.GetBindable<ReleaseStream>(OsuConfig.ReleaseStream),

View File

@ -57,9 +57,9 @@ namespace osu.Game.Overlays.Options.Graphics
LabelText = "Softening filter", LabelText = "Softening filter",
Bindable = config.GetBindable<bool>(OsuConfig.BloomSoftening) Bindable = config.GetBindable<bool>(OsuConfig.BloomSoftening)
}, },
new OptionsDropdown<ScreenshotFormat> new DropdownOption<ScreenshotFormat>
{ {
Label = "Screenshot", LabelText = "Screenshot",
Bindable = config.GetBindable<ScreenshotFormat>(OsuConfig.ScreenshotFormat) Bindable = config.GetBindable<ScreenshotFormat>(OsuConfig.ScreenshotFormat)
} }
}; };

View File

@ -21,9 +21,9 @@ namespace osu.Game.Overlays.Options.Graphics
Children = new Drawable[] Children = new Drawable[]
{ {
// TODO: this needs to be a custom dropdown at some point // TODO: this needs to be a custom dropdown at some point
new OptionsDropdown<FrameSync> new DropdownOption<FrameSync>
{ {
Label = "Frame limiter", LabelText = "Frame limiter",
Bindable = config.GetBindable<FrameSync>(OsuConfig.FrameSync) Bindable = config.GetBindable<FrameSync>(OsuConfig.FrameSync)
}, },
new CheckBoxOption new CheckBoxOption

View File

@ -36,9 +36,9 @@ namespace osu.Game.Overlays.Options.Input
LabelText = "Map absolute raw input to the osu! window", LabelText = "Map absolute raw input to the osu! window",
Bindable = config.GetBindable<bool>(OsuConfig.AbsoluteToOsuWindow) Bindable = config.GetBindable<bool>(OsuConfig.AbsoluteToOsuWindow)
}, },
new OptionsDropdown<ConfineMouseMode> new DropdownOption<ConfineMouseMode>
{ {
Label = "Confine mouse cursor", LabelText = "Confine mouse cursor",
Bindable = config.GetBindable<ConfineMouseMode>(OsuConfig.ConfineMouse), Bindable = config.GetBindable<ConfineMouseMode>(OsuConfig.ConfineMouse),
}, },
new CheckBoxOption new CheckBoxOption

View File

@ -224,7 +224,7 @@
<Compile Include="Overlays\Options\TextBoxOption.cs" /> <Compile Include="Overlays\Options\TextBoxOption.cs" />
<Compile Include="Overlays\Options\SliderOption.cs" /> <Compile Include="Overlays\Options\SliderOption.cs" />
<Compile Include="Configuration\ProgressBarType.cs" /> <Compile Include="Configuration\ProgressBarType.cs" />
<Compile Include="Overlays\Options\OptionsDropdown.cs" /> <Compile Include="Overlays\Options\DropdownOption.cs" />
<Compile Include="Configuration\DisplayNameAttribute.cs" /> <Compile Include="Configuration\DisplayNameAttribute.cs" />
<Compile Include="Configuration\RankingType.cs" /> <Compile Include="Configuration\RankingType.cs" />
<Compile Include="Configuration\ScoreMeterType.cs" /> <Compile Include="Configuration\ScoreMeterType.cs" />