mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 19:27:26 +08:00
options -> settings
This commit is contained in:
parent
d07d94d606
commit
83a89ce22d
@ -3,11 +3,11 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Screens.Play.Options;
|
||||
using osu.Game.Screens.Play.Settings;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
internal class TestCaseOptionsContainer : TestCase
|
||||
internal class TestCaseSettingsDisplay : TestCase
|
||||
{
|
||||
public override string Description => @"Setting visible in replay/auto";
|
||||
|
||||
@ -15,7 +15,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
Add(new OptionsDisplay()
|
||||
Add(new SettingsDisplay()
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
@ -196,7 +196,7 @@
|
||||
<Compile Include="Tests\TestCaseMusicController.cs" />
|
||||
<Compile Include="Tests\TestCaseNotificationManager.cs" />
|
||||
<Compile Include="Tests\TestCaseOnScreenDisplay.cs" />
|
||||
<Compile Include="Tests\TestCaseOptionsContainer.cs" />
|
||||
<Compile Include="Tests\TestCaseSettingsDisplay.cs" />
|
||||
<Compile Include="Tests\TestCasePlayer.cs" />
|
||||
<Compile Include="Tests\TestCaseHitObjects.cs" />
|
||||
<Compile Include="Tests\TestCaseKeyCounter.cs" />
|
||||
|
@ -7,24 +7,22 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Screens.Play.Options
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
public abstract class OptionContainer : Container
|
||||
public abstract class SettingsContainer : Container
|
||||
{
|
||||
/// <summary>
|
||||
/// The title of this option.
|
||||
/// </summary>
|
||||
public abstract string Title { get; }
|
||||
|
||||
private readonly OptionDropdown content;
|
||||
private readonly SettingsDropdown content;
|
||||
private readonly SimpleButton button;
|
||||
private bool contentIsVisible;
|
||||
|
||||
protected OptionContainer()
|
||||
protected SettingsContainer()
|
||||
{
|
||||
AutoSizeAxes = Axes.Y;
|
||||
Width = 250;
|
||||
@ -78,7 +76,7 @@ namespace osu.Game.Screens.Play.Options
|
||||
},
|
||||
}
|
||||
},
|
||||
content = new OptionDropdown
|
||||
content = new SettingsDropdown
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
}
|
||||
@ -107,5 +105,46 @@ namespace osu.Game.Screens.Play.Options
|
||||
else
|
||||
content.Hide();
|
||||
}
|
||||
|
||||
private class SettingsDropdown : OverlayContainer
|
||||
{
|
||||
private const float transition_duration = 600;
|
||||
|
||||
private FillFlowContainer content;
|
||||
|
||||
public SettingsDropdown()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
content = new FillFlowContainer
|
||||
{
|
||||
Direction = FillDirection.Vertical,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Padding = new MarginPadding(15),
|
||||
Spacing = new Vector2(0, 10),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public new void Add(Drawable drawable)
|
||||
{
|
||||
content.Add(drawable);
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
{
|
||||
ResizeTo(new Vector2(1, content.Height), transition_duration, EasingTypes.OutQuint);
|
||||
FadeIn(transition_duration, EasingTypes.OutQuint);
|
||||
}
|
||||
|
||||
protected override void PopOut()
|
||||
{
|
||||
ResizeTo(new Vector2(1, 0), transition_duration, EasingTypes.OutQuint);
|
||||
FadeOut(transition_duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@ using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Screens.Play.HUD;
|
||||
using OpenTK.Input;
|
||||
using osu.Game.Screens.Play.Options;
|
||||
using osu.Game.Screens.Play.Settings;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
@ -30,7 +30,7 @@ namespace osu.Game.Screens.Play
|
||||
public readonly HealthDisplay HealthDisplay;
|
||||
public readonly SongProgress Progress;
|
||||
public readonly ModDisplay ModDisplay;
|
||||
public readonly OptionsDisplay OptionsDisplay;
|
||||
public readonly SettingsDisplay SettingsDisplay;
|
||||
|
||||
private Bindable<bool> showKeyCounter;
|
||||
private Bindable<bool> showHud;
|
||||
@ -44,7 +44,7 @@ namespace osu.Game.Screens.Play
|
||||
protected abstract HealthDisplay CreateHealthDisplay();
|
||||
protected abstract SongProgress CreateProgress();
|
||||
protected abstract ModDisplay CreateModsContainer();
|
||||
protected abstract OptionsDisplay CreateOptionsDisplay();
|
||||
protected abstract SettingsDisplay CreateSettingsDisplay();
|
||||
|
||||
protected HUDOverlay()
|
||||
{
|
||||
@ -63,7 +63,7 @@ namespace osu.Game.Screens.Play
|
||||
HealthDisplay = CreateHealthDisplay(),
|
||||
Progress = CreateProgress(),
|
||||
ModDisplay = CreateModsContainer(),
|
||||
OptionsDisplay = CreateOptionsDisplay(),
|
||||
SettingsDisplay = CreateSettingsDisplay(),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1,50 +0,0 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Screens.Play.Options
|
||||
{
|
||||
public class OptionDropdown : OverlayContainer
|
||||
{
|
||||
private const float transition_duration = 600;
|
||||
|
||||
private FillFlowContainer content;
|
||||
|
||||
public OptionDropdown()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
content = new FillFlowContainer
|
||||
{
|
||||
Direction = FillDirection.Vertical,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Padding = new MarginPadding(15),
|
||||
Spacing = new Vector2(0, 10),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public new void Add(Drawable drawable)
|
||||
{
|
||||
content.Add(drawable);
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
{
|
||||
ResizeTo(new Vector2(1, content.Height), transition_duration, EasingTypes.OutQuint);
|
||||
FadeIn(transition_duration, EasingTypes.OutQuint);
|
||||
}
|
||||
|
||||
protected override void PopOut()
|
||||
{
|
||||
ResizeTo(new Vector2(1, 0), transition_duration, EasingTypes.OutQuint);
|
||||
FadeOut(transition_duration);
|
||||
}
|
||||
}
|
||||
}
|
@ -208,7 +208,7 @@ namespace osu.Game.Screens.Play
|
||||
hudOverlay.Progress.Objects = HitRenderer.Objects;
|
||||
hudOverlay.Progress.AudioClock = decoupledClock;
|
||||
hudOverlay.Progress.AllowSeeking = HitRenderer.HasReplayLoaded;
|
||||
hudOverlay.OptionsDisplay.IsVisible = HitRenderer.HasReplayLoaded;
|
||||
hudOverlay.SettingsDisplay.IsVisible = HitRenderer.HasReplayLoaded;
|
||||
hudOverlay.Progress.OnSeek = pos => decoupledClock.Seek(pos);
|
||||
|
||||
hudOverlay.ModDisplay.Current.BindTo(Beatmap.Mods);
|
||||
|
@ -6,10 +6,11 @@ using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Overlays.Music;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Screens.Play.Options
|
||||
namespace osu.Game.Screens.Play.Settings
|
||||
{
|
||||
public class CollectionOptions : OptionContainer
|
||||
public class CollectionSettings : SettingsContainer
|
||||
{
|
||||
public override string Title => @"COLLECTIONS";
|
||||
|
@ -7,9 +7,9 @@ using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Overlays.Settings;
|
||||
|
||||
namespace osu.Game.Screens.Play.Options
|
||||
namespace osu.Game.Screens.Play.Settings
|
||||
{
|
||||
public class DiscussionOptions : OptionContainer
|
||||
public class DiscussionSettings : SettingsContainer
|
||||
{
|
||||
public override string Title => @"DISCUSSIONS";
|
||||
|
@ -4,10 +4,11 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Overlays.Settings;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Screens.Play.Options
|
||||
namespace osu.Game.Screens.Play.Settings
|
||||
{
|
||||
public class PlaybackOptions : OptionContainer
|
||||
public class PlaybackSettings : SettingsContainer
|
||||
{
|
||||
public override string Title => @"PLAYBACK";
|
||||
|
@ -4,9 +4,9 @@
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Screens.Play.Options
|
||||
namespace osu.Game.Screens.Play.Settings
|
||||
{
|
||||
public class OptionsDisplay : FillFlowContainer
|
||||
public class SettingsDisplay : FillFlowContainer
|
||||
{
|
||||
private bool isVisible;
|
||||
public bool IsVisible
|
||||
@ -23,14 +23,14 @@ namespace osu.Game.Screens.Play.Options
|
||||
get { return isVisible; }
|
||||
}
|
||||
|
||||
public OptionsDisplay()
|
||||
public SettingsDisplay()
|
||||
{
|
||||
Direction = FillDirection.Vertical;
|
||||
Spacing = new Vector2(0, 20);
|
||||
|
||||
Add(new CollectionOptions());
|
||||
Add(new DiscussionOptions());
|
||||
Add(new PlaybackOptions());
|
||||
Add(new CollectionSettings());
|
||||
Add(new DiscussionSettings());
|
||||
Add(new PlaybackSettings());
|
||||
}
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Screens.Play.HUD;
|
||||
using OpenTK;
|
||||
using osu.Game.Screens.Play.Options;
|
||||
using osu.Game.Screens.Play.Settings;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
@ -72,7 +72,7 @@ namespace osu.Game.Screens.Play
|
||||
Margin = new MarginPadding { Top = 20, Right = 10 },
|
||||
};
|
||||
|
||||
protected override OptionsDisplay CreateOptionsDisplay() => new OptionsDisplay
|
||||
protected override SettingsDisplay CreateSettingsDisplay() => new SettingsDisplay
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
|
@ -233,12 +233,11 @@
|
||||
<Compile Include="Screens\Charts\ChartInfo.cs" />
|
||||
<Compile Include="Screens\Edit\Editor.cs" />
|
||||
<Compile Include="Screens\Play\HotkeyRetryOverlay.cs" />
|
||||
<Compile Include="Screens\Play\Options\CollectionOptions.cs" />
|
||||
<Compile Include="Screens\Play\Options\DiscussionOptions.cs" />
|
||||
<Compile Include="Screens\Play\Options\OptionContainer.cs" />
|
||||
<Compile Include="Screens\Play\Options\OptionDropdown.cs" />
|
||||
<Compile Include="Screens\Play\Options\OptionsDisplay.cs" />
|
||||
<Compile Include="Screens\Play\Options\PlaybackOptions.cs" />
|
||||
<Compile Include="Screens\Play\Settings\CollectionSettings.cs" />
|
||||
<Compile Include="Screens\Play\Settings\DiscussionSettings.cs" />
|
||||
<Compile Include="Graphics\UserInterface\SettingsContainer.cs" />
|
||||
<Compile Include="Screens\Play\Settings\SettingsDisplay.cs" />
|
||||
<Compile Include="Screens\Play\Settings\PlaybackSettings.cs" />
|
||||
<Compile Include="Screens\Play\PauseContainer.cs" />
|
||||
<Compile Include="Screens\Play\SongProgressInfo.cs" />
|
||||
<Compile Include="Screens\Play\HUD\ModDisplay.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user