From 2aaff01675be8d1fdb5aca01528931dfbb565b93 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 31 Oct 2016 12:44:20 -0600 Subject: [PATCH 01/19] Implement config persistence through BasicStorage --- osu.Game/Configuration/OsuConfigManager.cs | 5 +++++ osu.Game/OsuGameBase.cs | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index e1b3397c42..44fd251dd1 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -2,6 +2,7 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Configuration; +using osu.Framework.Platform; using osu.Game.GameModes.Play; using osu.Game.Online.API; @@ -25,6 +26,10 @@ namespace osu.Game.Configuration Set(OsuConfig.VolumeMusic, 1.0, 0, 1); Set(OsuConfig.VolumeEffect, 1.0, 0, 1); } + + public OsuConfigManager(BasicStorage storage) : base(storage) + { + } } enum OsuConfig diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index 7a4c72715e..8aa011f459 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Textures; using osu.Framework.IO.Stores; +using osu.Framework.Platform; using osu.Game.Beatmaps; using osu.Game.Beatmaps.IO; using osu.Game.Configuration; @@ -21,7 +22,7 @@ namespace osu.Game { public class OsuGameBase : BaseGame { - internal OsuConfigManager Config = new OsuConfigManager(); + internal OsuConfigManager Config; public BeatmapDatabase Beatmaps { get; private set; } protected override string MainResourceFile => @"osu.Game.Resources.dll"; @@ -76,6 +77,13 @@ namespace osu.Game }; } + public override void SetHost(BasicGameHost host) + { + if (Config == null) + Config = new OsuConfigManager(host.Storage); + base.SetHost(host); + } + protected override void Update() { base.Update(); From 9f78f8607b0fb83299e1255f0333858d3b01c6ec Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 2 Nov 2016 19:07:07 -0400 Subject: [PATCH 02/19] Implement General options section --- osu.Desktop.VisualTests/OpenTK.dll.config | 25 +++ .../Tests/TestCaseOptions.cs | 29 +++ .../osu.Desktop.VisualTests.csproj | 1 + osu.Game/Overlays/Options.cs | 185 +++++++++++++++++- 4 files changed, 239 insertions(+), 1 deletion(-) create mode 100644 osu.Desktop.VisualTests/OpenTK.dll.config create mode 100644 osu.Desktop.VisualTests/Tests/TestCaseOptions.cs diff --git a/osu.Desktop.VisualTests/OpenTK.dll.config b/osu.Desktop.VisualTests/OpenTK.dll.config new file mode 100644 index 0000000000..5620e3d9e2 --- /dev/null +++ b/osu.Desktop.VisualTests/OpenTK.dll.config @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/osu.Desktop.VisualTests/Tests/TestCaseOptions.cs b/osu.Desktop.VisualTests/Tests/TestCaseOptions.cs new file mode 100644 index 0000000000..72cebe745d --- /dev/null +++ b/osu.Desktop.VisualTests/Tests/TestCaseOptions.cs @@ -0,0 +1,29 @@ +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.GameModes.Testing; +using osu.Framework.Graphics; +using osu.Game.Graphics.UserInterface; +using OpenTK.Input; +using osu.Game.Overlays; +using osu.Framework.Graphics.Containers; + +namespace osu.Desktop.VisualTests.Tests +{ + class TestCaseOptions : TestCase + { + public override string Name => @"Options"; + + public override string Description => @"Tests the options overlay"; + + private Options options; + + public override void Reset() + { + base.Reset(); + + Children = new[] { options = new Options() }; + options.ToggleVisibility(); + } + } +} diff --git a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj b/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj index 65fb72e2a6..36973a358d 100644 --- a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj +++ b/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj @@ -166,6 +166,7 @@ + diff --git a/osu.Game/Overlays/Options.cs b/osu.Game/Overlays/Options.cs index b413d175c5..19bb73e393 100644 --- a/osu.Game/Overlays/Options.cs +++ b/osu.Game/Overlays/Options.cs @@ -1,26 +1,34 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System.Diagnostics; using OpenTK; using OpenTK.Graphics; using OpenTK.Input; using osu.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transformations; +using osu.Framework.Graphics.UserInterface; using osu.Framework.Input; +using osu.Framework.Platform; namespace osu.Game.Overlays { public class Options : OverlayContainer { - private const float width = 300; + private const float width = 400; + private FlowContainer optionsContainer; + private BasicStorage storage; protected override void Load(BaseGame game) { base.Load(game); + storage = game.Host.Storage; + Depth = float.MaxValue; RelativeSizeAxes = Axes.Y; Size = new Vector2(width, 1); @@ -32,8 +40,101 @@ namespace osu.Game.Overlays { RelativeSizeAxes = Axes.Both, Colour = new Color4(0.1f, 0.1f, 0.1f, 0.9f) + }, + // TODO: Links on the side to jump to a section + new ScrollContainer + { + RelativeSizeAxes = Axes.Both, + Padding = new MarginPadding { Left = 5, Right = 5, Top = 50 }, + Children = new[] + { + optionsContainer = new FlowContainer + { + AutoSizeAxes = Axes.Y, + RelativeSizeAxes = Axes.X, + Direction = FlowDirection.VerticalOnly, + Children = new[] + { + new SpriteText + { + Text = "Options", + TextSize = 40, + Anchor = Anchor.TopCentre, + Origin = Anchor.TopCentre, + }, + new SpriteText + { + Colour = new Color4(235, 117, 139, 255), + Text = "Change the way osu! behaves", + Anchor = Anchor.TopCentre, + Origin = Anchor.TopCentre, + Margin = new MarginPadding { Bottom = 25 }, + }, + new SpriteText + { + Text = "TODO: SEARCH", + Anchor = Anchor.TopCentre, + Origin = Anchor.TopCentre, + Margin = new MarginPadding { Bottom = 25 }, + } + } + } + } } }; + addGeneral(); + } + + private void addGeneral() + { + optionsContainer.Add(new OptionsSection + { + Header = "General", + Children = new[] + { + new OptionsSubsection + { + Header = "Sign In", + Children = new[] + { + new SpriteText { Text = "TODO" } + } + }, + new OptionsSubsection + { + Header = "Language", + Children = new Drawable[] + { + new SpriteText { Text = "TODO: Dropdown" }, + new BasicCheckBox + { + Children = new[] { new SpriteText { Text = "Prefer metadata in original language" } } + }, + new BasicCheckBox + { + Children = new[] { new SpriteText { Text = "Use alternative font for chat display" } } + }, + } + }, + new OptionsSubsection + { + Header = "Updates", + Children = new Drawable[] + { + new SpriteText { Text = "TODO: Dropdown" }, + new SpriteText { Text = "Your osu! is up to date" }, // TODO: map this to reality + new Button + { + AutoSizeAxes = Axes.Y, + RelativeSizeAxes = Axes.X, + Colour = new Color4(14, 132, 165, 255), + Text = "Open osu! folder", + Action = storage.OpenOsuDirectory, + } + } + } + } + }); } protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) @@ -59,4 +160,86 @@ namespace osu.Game.Overlays MoveToX(-width, 300, EasingTypes.Out); } } + + class OptionsSection : Container + { + private SpriteText header; + private FlowContainer content; + protected override Container Content => content; + + public string Header + { + get { return header.Text; } + set { header.Text = value.ToUpper(); } + } + + public OptionsSection() + { + const int headerSize = 40, headerMargin = 25; + AutoSizeAxes = Axes.Y; + RelativeSizeAxes = Axes.X; + AddInternal(new[] + { + header = new SpriteText + { + TextSize = headerSize, + Colour = new Color4(88, 218, 254, 255), + Anchor = Anchor.TopRight, + Origin = Anchor.TopRight, + }, + content = new FlowContainer + { + Margin = new MarginPadding { Top = headerSize + headerMargin, Left = 10 }, + Direction = FlowDirection.VerticalOnly, + Spacing = new Vector2(0, 25), + AutoSizeAxes = Axes.Y, + RelativeSizeAxes = Axes.X, + }, + }); + } + } + + class OptionsSubsection : Container + { + private SpriteText header; + private Container content; + protected override Container Content => content; + + public string Header + { + get { return header.Text; } + set { header.Text = value.ToUpper(); } + } + + public OptionsSubsection() + { + const int borderWidth = 3, borderMargin = 10; + RelativeSizeAxes = Axes.X; + AutoSizeAxes = Axes.Y; + AddInternal(new Drawable[] + { + new Box + { + Colour = new Color4(50, 50, 50, 255), + RelativeSizeAxes = Axes.Y, + Width = borderWidth, + }, + content = new FlowContainer + { + Direction = FlowDirection.VerticalOnly, + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Padding = new MarginPadding { Left = borderWidth + borderMargin }, + Children = new[] + { + header = new SpriteText + { + TextSize = 25, + // TODO: Bold + } + } + }, + }); + } + } } From dd0cb5da01b50678a0d9472c4b4ddcd3a680d114 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 2 Nov 2016 19:25:00 -0400 Subject: [PATCH 03/19] Add options from old osu --- osu.Game/Configuration/OsuConfigManager.cs | 124 ++++++++++++++++++++- osu.Game/Overlays/Options.cs | 1 + 2 files changed, 119 insertions(+), 6 deletions(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 44fd251dd1..59f1dabf21 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -34,15 +34,127 @@ namespace osu.Game.Configuration enum OsuConfig { - Width, - Height, - MouseSensitivity, + // General + // Sign in Username, Password, - Token, - PlayMode, + // Language + Language, + PreferOriginalForMetadata, + AlternativeChatFont, + // Updates + ReleaseStream, + // Graphics + // Renderer + FrameLimiter, + FPSCounter, + ReduceDroppedFrames, + DetectPerformanceIssues, + // Layout + Width, + Height, + EnableFullscreen, + EnableLetterboxing, + HorizontalPosition, + VerticalPosition, + // Detail settings + EnableSnakingSliders, + EnableBackgroundVideo, + EnableStoryboards, + EnableComboBursts, + EnableHitLighting, + EnableShaders, + EnableSofteningFilter, + ScreenshotFormat, + // Main menu + EnableMenuSnow, + EnableMenuParallax, + EnableMenuTips, + EnableInterfaceVoices, + EnableOsuMusicTheme, + // Song select + EnableSongSelectThumbnails, + // Gameplay + // General + BackgroundDim, + ProgressDisplay, + ScoreMeterType, + ScoreMeterSize, + AlwaysShowKeyOverlay, + ShowFirstHiddenApproachCircle, + ScaleManiaScrollSpeed, + RememberManiaScrollSpeed, + // Song select + SongSelectMinimumStars, + SongSelectMaximumStars, + // Audio + // Devices + OutputDevice, + // Volume VolumeGlobal, VolumeEffect, - VolumeMusic + VolumeMusic, + IgnoreBeatmapHitsounds, + // Offset + UniversalOffset, + // Skin + SelectedSkin, + IgnoreBeatmapSkins, + UseSkinAudioSamples, + UseTaikoSkin, + UseSkinCursor, + CursorSize, + EnableAutomaticCursorSize, + // Input + // Mouse + MouseSensitivity, + EnableRawInput, + EnableMapRawInputToWindow, + MouseConfinementMode, + DisableMouseWheelInPlay, + DisableMouseButtonsInPlay, + EnableCursorRipples, + // Keyboard + // TODO + // Other + UseOSTabletSupport, + EnableWiimoteDrumSupport, + // Editor + EnableEditorBackgroundVideo, + EnableEditorDefaultSkin, + EnableEditorSnakingSliders, + EnableEditorHitAnimations, + EnableEditorFollowPoints, + EnableEditorStacking, + // Online + // Alerts and Privacy + EnableChatTicker, + HideChatDuringPlay, + EnableNotifyOnMention, + EnableSoundOnMention, + EnableChatNotifications, + EnableCitySharing, + EnableSpectators, + AutoLinkBeatmapsToSpectators, + ShowNotificationsDuringPlay, + ShowFriendOnlineStatusNotifications, + AllowAnyMultiplayerInvites, + // Integration + EnableYahooIntegration, + EnableMSNLiveIntegration, + AutoStartOsuDirect, + PreferNoVideo, + // In-game chat + EnableWordFilter, + EnableForeignFilter, + EnablePrivateMessageLog, + BlockStrangerPrivateMessages, + ChatIgnoreList, + ChatHighlightList, + // Maintenance + // (no persisted options) + // Misc (not mapped to user-visible options) + Token, + PlayMode, } } diff --git a/osu.Game/Overlays/Options.cs b/osu.Game/Overlays/Options.cs index 19bb73e393..6e8fb7461e 100644 --- a/osu.Game/Overlays/Options.cs +++ b/osu.Game/Overlays/Options.cs @@ -46,6 +46,7 @@ namespace osu.Game.Overlays { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Left = 5, Right = 5, Top = 50 }, + ScrollDraggerOnLeft = true, Children = new[] { optionsContainer = new FlowContainer From 89d3f4c2bee3aeacedd33cb6ee5570a05bf61a37 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 2 Nov 2016 19:37:52 -0400 Subject: [PATCH 04/19] Import enum from old osu --- osu.Game/Configuration/OsuConfigManager.cs | 274 ++++++++++++--------- osu.Game/OsuGame.cs | 2 +- 2 files changed, 154 insertions(+), 122 deletions(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 59f1dabf21..7738d4a982 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -14,7 +14,7 @@ namespace osu.Game.Configuration { Set(OsuConfig.Width, 1366, 640); Set(OsuConfig.Height, 768, 480); - Set(OsuConfig.MouseSensitivity, 1.0); + Set(OsuConfig.MouseSpeed, 1.0); Set(OsuConfig.Username, string.Empty); Set(OsuConfig.Password, string.Empty); @@ -22,7 +22,7 @@ namespace osu.Game.Configuration Set(OsuConfig.PlayMode, PlayMode.Osu); - Set(OsuConfig.VolumeGlobal, 0.8, 0, 1); + Set(OsuConfig.VolumeUniversal, 0.8, 0, 1); Set(OsuConfig.VolumeMusic, 1.0, 0, 1); Set(OsuConfig.VolumeEffect, 1.0, 0, 1); } @@ -34,127 +34,159 @@ namespace osu.Game.Configuration enum OsuConfig { - // General - // Sign in - Username, - Password, - // Language - Language, - PreferOriginalForMetadata, - AlternativeChatFont, - // Updates - ReleaseStream, - // Graphics - // Renderer - FrameLimiter, - FPSCounter, - ReduceDroppedFrames, - DetectPerformanceIssues, - // Layout - Width, - Height, - EnableFullscreen, - EnableLetterboxing, - HorizontalPosition, - VerticalPosition, - // Detail settings - EnableSnakingSliders, - EnableBackgroundVideo, - EnableStoryboards, - EnableComboBursts, - EnableHitLighting, - EnableShaders, - EnableSofteningFilter, - ScreenshotFormat, - // Main menu - EnableMenuSnow, - EnableMenuParallax, - EnableMenuTips, - EnableInterfaceVoices, - EnableOsuMusicTheme, - // Song select - EnableSongSelectThumbnails, - // Gameplay - // General - BackgroundDim, - ProgressDisplay, - ScoreMeterType, - ScoreMeterSize, - AlwaysShowKeyOverlay, - ShowFirstHiddenApproachCircle, - ScaleManiaScrollSpeed, - RememberManiaScrollSpeed, - // Song select - SongSelectMinimumStars, - SongSelectMaximumStars, - // Audio - // Devices - OutputDevice, - // Volume - VolumeGlobal, + // New osu: + PlayMode, + Token, + // Imported from old osu: + BeatmapDirectory, + VolumeUniversal, VolumeEffect, VolumeMusic, - IgnoreBeatmapHitsounds, - // Offset - UniversalOffset, - // Skin - SelectedSkin, - IgnoreBeatmapSkins, - UseSkinAudioSamples, - UseTaikoSkin, - UseSkinCursor, + AllowPublicInvites, + AutoChatHide, + AutomaticDownload, + AutomaticDownloadNoVideo, + BlockNonFriendPM, + Bloom, + BloomSoftening, + BossKeyFirstActivation, + ChatAudibleHighlight, + ChatChannels, + ChatFilter, + ChatHighlightName, + ChatMessageNotification, + ChatLastChannel, + ChatRemoveForeign, + ChatSortMode, + ComboBurst, + ComboFire, + ComboFireHeight, + ConfirmExit, + AutoSendNowPlaying, CursorSize, - EnableAutomaticCursorSize, - // Input - // Mouse - MouseSensitivity, - EnableRawInput, - EnableMapRawInputToWindow, - MouseConfinementMode, - DisableMouseWheelInPlay, - DisableMouseButtonsInPlay, - EnableCursorRipples, - // Keyboard - // TODO - // Other - UseOSTabletSupport, - EnableWiimoteDrumSupport, - // Editor - EnableEditorBackgroundVideo, - EnableEditorDefaultSkin, - EnableEditorSnakingSliders, - EnableEditorHitAnimations, - EnableEditorFollowPoints, - EnableEditorStacking, - // Online - // Alerts and Privacy - EnableChatTicker, - HideChatDuringPlay, - EnableNotifyOnMention, - EnableSoundOnMention, - EnableChatNotifications, - EnableCitySharing, - EnableSpectators, - AutoLinkBeatmapsToSpectators, - ShowNotificationsDuringPlay, - ShowFriendOnlineStatusNotifications, - AllowAnyMultiplayerInvites, - // Integration - EnableYahooIntegration, - EnableMSNLiveIntegration, - AutoStartOsuDirect, - PreferNoVideo, - // In-game chat - EnableWordFilter, - EnableForeignFilter, - EnablePrivateMessageLog, - BlockStrangerPrivateMessages, - ChatIgnoreList, - ChatHighlightList, - // Maintenance - // (no persisted options) - // Misc (not mapped to user-visible options) - Token, - PlayMode, + AutomaticCursorSizing, + DimLevel, + Display, + DisplayCityLocation, + DistanceSpacingEnabled, + EditorTip, + VideoEditor, + EditorDefaultSkin, + EditorSnakingSliders, + EditorHitAnimations, + EditorFollowPoints, + EditorStacking, + ForceSliderRendering, + FpsCounter, + FrameTimeDisplay, + GuideTips, + CursorRipple, + HighlightWords, + HighResolution, + HitLighting, + IgnoreBarline, + IgnoreBeatmapSamples, + IgnoreBeatmapSkins, + IgnoreList, + KeyOverlay, + Language, + LastPlayMode, + AllowNowPlayingHighlights, + LastVersion, + LastVersionPermissionsFailed, + LoadSubmittedThread, + LobbyPlayMode, + ShowInterface, + ShowInterfaceDuringRelax, + LobbyShowExistingOnly, + LobbyShowFriendsOnly, + LobbyShowFull, + LobbyShowInProgress, + LobbyShowPassworded, + LogPrivateMessages, + LowResolution, + ManiaSpeed, + UsePerBeatmapManiaSpeed, + ManiaSpeedBPMScale, + MenuTip, + MouseDisableButtons, + MouseDisableWheel, + MouseSpeed, + Offset, + ScoreMeterScale, + DistanceSpacing, + EditorBeatDivisor, + EditorGridSize, + EditorGridSizeDesign, + Height, + Width, + HeightFullscreen, + CustomFrameLimit, + WidthFullscreen, + MsnIntegration, + MyPcSucks, + NotifyFriends, + NotifySubmittedThread, + PopupDuringGameplay, + ProgressBarType, + RankType, + RefreshRate, + OverrideRefreshRate, + ScaleMode, + ScoreboardVisible, + ScoreMeter, + ScreenshotId, + MenuSnow, + MenuTriangles, + SongSelectThumbnails, + ScreenshotFormat, + ShowReplayComments, + ShowSpectators, + ShowStoryboard, + Skin, + SkinSamples, + SkipTablet, + SnakingSliders, + Tablet, + UpdatePending, + UserFilter, + UseSkinCursor, + UseTaikoSkin, + Video, + Wiimote, + YahooIntegration, + ForceFrameFlush, + DetectPerformanceIssues, + Fullscreen, + MenuMusic, + MenuVoice, + MenuParallax, + RawInput, + AbsoluteToOsuWindow, + ConfineMouse, + ShowMenuTips, + HiddenShowFirstApproach, + ComboColourSliderBall, + AlternativeChatFont, + Password, + Username, + DisplayStarsMaximum, + DisplayStarsMinimum, + AudioDevice, + ReleaseStream, + UpdateFailCount, + SavePassword, + SaveUsername, + TreeSortMode, + TreeSortMode2, + Letterboxing, + LetterboxPositionX, + LetterboxPositionY, + FrameSync, + ShowUnicode, + PermanentSongInfo, + Ticker, + CompatibilityContext, + CanForceOptimusCompatibility, } } diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index af078395df..7f14c6c942 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -61,7 +61,7 @@ namespace osu.Game Schedule(delegate { Beatmaps.Import(args); }); //attach our bindables to the audio subsystem. - Audio.Volume.Weld(Config.GetBindable(OsuConfig.VolumeGlobal)); + Audio.Volume.Weld(Config.GetBindable(OsuConfig.VolumeUniversal)); Audio.VolumeSample.Weld(Config.GetBindable(OsuConfig.VolumeEffect)); Audio.VolumeTrack.Weld(Config.GetBindable(OsuConfig.VolumeMusic)); From 40e667b2d853f844b647e69fc1f63f924eca2b64 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 2 Nov 2016 19:47:54 -0400 Subject: [PATCH 05/19] Add default values from old osu --- osu.Game/Configuration/OsuConfigManager.cs | 145 ++++++++++++++++++++- 1 file changed, 144 insertions(+), 1 deletion(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 7738d4a982..319f565938 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -21,10 +21,153 @@ namespace osu.Game.Configuration Set(OsuConfig.Token, string.Empty); Set(OsuConfig.PlayMode, PlayMode.Osu); - + + Set(OsuConfig.BeatmapDirectory, @"Songs"); // TODO: use this + Set(OsuConfig.VolumeUniversal, 0.8, 0, 1); Set(OsuConfig.VolumeMusic, 1.0, 0, 1); Set(OsuConfig.VolumeEffect, 1.0, 0, 1); + + Set(OsuConfig.AllowPublicInvites, true); + Set(OsuConfig.AutoChatHide, true); + Set(OsuConfig.AutomaticDownload, true); + Set(OsuConfig.AutomaticDownloadNoVideo, false); + Set(OsuConfig.BlockNonFriendPM, false); + Set(OsuConfig.BloomSoftening, false); + Set(OsuConfig.BossKeyFirstActivation, true); + Set(OsuConfig.ChatAudibleHighlight, true); + Set(OsuConfig.ChatChannels, string.Empty); + Set(OsuConfig.ChatFilter, false); + Set(OsuConfig.ChatHighlightName, true); + Set(OsuConfig.ChatMessageNotification, true); + Set(OsuConfig.ChatLastChannel, string.Empty); + Set(OsuConfig.ChatRemoveForeign, false); + //Set(OsuConfig.ChatSortMode, UserSortMode.Rank); + Set(OsuConfig.ComboBurst, true); + Set(OsuConfig.ComboFire, false); + Set(OsuConfig.ComboFireHeight, 3); + Set(OsuConfig.ConfirmExit, false); + Set(OsuConfig.AutoSendNowPlaying, true); + Set(OsuConfig.CursorSize, 1.0, 0.5f, 2); + Set(OsuConfig.AutomaticCursorSizing, false); + Set(OsuConfig.DimLevel, 30, 0, 100); + Set(OsuConfig.Display, 1); + Set(OsuConfig.DisplayCityLocation, false); + Set(OsuConfig.DistanceSpacingEnabled, true); + Set(OsuConfig.EditorTip, 0); + Set(OsuConfig.VideoEditor, Get(OsuConfig.Fullscreen)); + Set(OsuConfig.EditorDefaultSkin, false); + Set(OsuConfig.EditorSnakingSliders, true); + Set(OsuConfig.EditorHitAnimations, false); + Set(OsuConfig.EditorFollowPoints, true); + Set(OsuConfig.EditorStacking, true); + Set(OsuConfig.ForceSliderRendering, false); + Set(OsuConfig.FpsCounter, false); + Set(OsuConfig.FrameTimeDisplay, false); + Set(OsuConfig.GuideTips, @""); + Set(OsuConfig.CursorRipple, false); + Set(OsuConfig.HighlightWords, string.Empty); + Set(OsuConfig.HighResolution, false); + Set(OsuConfig.HitLighting, true); + Set(OsuConfig.IgnoreBarline, false); + Set(OsuConfig.IgnoreBeatmapSamples, false); + Set(OsuConfig.IgnoreBeatmapSkins, false); + Set(OsuConfig.IgnoreList, string.Empty); + Set(OsuConfig.KeyOverlay, false); + Set(OsuConfig.Language, @"unknown"); + Set(OsuConfig.AllowNowPlayingHighlights, false); + Set(OsuConfig.LastVersion, string.Empty); + Set(OsuConfig.LastVersionPermissionsFailed, string.Empty); + Set(OsuConfig.LoadSubmittedThread, true); + Set(OsuConfig.LobbyPlayMode, -1); + Set(OsuConfig.ShowInterface, true); + Set(OsuConfig.ShowInterfaceDuringRelax, false); + Set(OsuConfig.LobbyShowExistingOnly, false); + Set(OsuConfig.LobbyShowFriendsOnly, false); + Set(OsuConfig.LobbyShowFull, false); + Set(OsuConfig.LobbyShowInProgress, true); + Set(OsuConfig.LobbyShowPassworded, true); + Set(OsuConfig.LogPrivateMessages, false); + Set(OsuConfig.LowResolution, false); + //Set(OsuConfig.ManiaSpeed, SpeedMania.SPEED_DEFAULT, SpeedMania.SPEED_MIN, SpeedMania.SPEED_MAX); + Set(OsuConfig.UsePerBeatmapManiaSpeed, true); + Set(OsuConfig.ManiaSpeedBPMScale, true); + Set(OsuConfig.MenuTip, 0); + Set(OsuConfig.MouseDisableButtons, false); + Set(OsuConfig.MouseDisableWheel, false); + Set(OsuConfig.MouseSpeed, 1, 0.4, 6); + Set(OsuConfig.Offset, 0, -300, 300); + //Set(OsuConfig.ScoreMeterScale, 1, 0.5, OsuGame.Tournament ? 10 : 2); + Set(OsuConfig.DistanceSpacing, 0.8, 0.1, 6); + Set(OsuConfig.EditorBeatDivisor, 1, 1, 16); + Set(OsuConfig.EditorGridSize, 32, 4, 32); + Set(OsuConfig.EditorGridSizeDesign, 32, 4, 32); + Set(OsuConfig.HeightFullscreen, 9999, 240, 9999); + Set(OsuConfig.CustomFrameLimit, 240, 240, 999); + Set(OsuConfig.WidthFullscreen, 9999, 320, 9999); + Set(OsuConfig.MsnIntegration, false); + Set(OsuConfig.MyPcSucks, false); + Set(OsuConfig.NotifyFriends, true); + Set(OsuConfig.NotifySubmittedThread, true); + Set(OsuConfig.PopupDuringGameplay, true); + //Set(OsuConfig.ProgressBarType, ProgressBarTypes.Pie); + //Set(OsuConfig.RankType, RankingType.Top); + Set(OsuConfig.RefreshRate, 60); + Set(OsuConfig.OverrideRefreshRate, Get(OsuConfig.RefreshRate) != 60); + //Set(OsuConfig.ScaleMode, ScaleMode.WidescreenConservative); + Set(OsuConfig.ScoreboardVisible, true); + //Set(OsuConfig.ScoreMeter, OsuGame.Tournament ? ScoreMeterType.Colour : ScoreMeterType.Error); + Set(OsuConfig.ScreenshotId, 0); + Set(OsuConfig.MenuSnow, false); + Set(OsuConfig.MenuTriangles, true); + Set(OsuConfig.SongSelectThumbnails, true); + //Set(OsuConfig.ScreenshotFormat, ImageFileFormat.Jpg); + Set(OsuConfig.ShowReplayComments, true); + Set(OsuConfig.ShowSpectators, true); + Set(OsuConfig.ShowStoryboard, true); + //Set(OsuConfig.Skin, SkinManager.DEFAULT_SKIN); + Set(OsuConfig.SkinSamples, true); + Set(OsuConfig.SkipTablet, false); + Set(OsuConfig.SnakingSliders, true); + Set(OsuConfig.Tablet, false); + Set(OsuConfig.UpdatePending, false); + Set(OsuConfig.UseSkinCursor, false); + Set(OsuConfig.UseTaikoSkin, false); + Set(OsuConfig.Video, true); + Set(OsuConfig.Wiimote, false); + Set(OsuConfig.YahooIntegration, false); + Set(OsuConfig.ForceFrameFlush, false); + Set(OsuConfig.DetectPerformanceIssues, true); + Set(OsuConfig.Fullscreen, true); + Set(OsuConfig.MenuMusic, true); + Set(OsuConfig.MenuVoice, true); + Set(OsuConfig.MenuParallax, true); + Set(OsuConfig.RawInput, false); + Set(OsuConfig.AbsoluteToOsuWindow, Get(OsuConfig.RawInput)); + Set(OsuConfig.ShowMenuTips, true); + Set(OsuConfig.HiddenShowFirstApproach, true); + Set(OsuConfig.ComboColourSliderBall, true); + Set(OsuConfig.AlternativeChatFont, false); + Set(OsuConfig.Password, string.Empty); + Set(OsuConfig.Username, string.Empty); + Set(OsuConfig.DisplayStarsMaximum, 10, 0, 10); + Set(OsuConfig.DisplayStarsMinimum, 0, 0, 10); + Set(OsuConfig.AudioDevice, string.Empty); + //Set(OsuConfig.ReleaseStream, ReleaseStream.Lazer, true); + Set(OsuConfig.UpdateFailCount, 0); + //Set(OsuConfig.SavePassword, Password != null); + Set(OsuConfig.SaveUsername, true); + //Set(OsuConfig.TreeSortMode, TreeGroupMode.Show_All); + //Set(OsuConfig.TreeSortMode2, TreeSortMode.Title); + Set(OsuConfig.Letterboxing, Get(OsuConfig.Fullscreen)); + Set(OsuConfig.LetterboxPositionX, 0, -100, 100); + Set(OsuConfig.LetterboxPositionY, 0, -100, 100); + //Set(OsuConfig.FrameSync, FrameSync.Limit120); + //Set(OsuConfig.ShowUnicode, unicodeDefault); + Set(OsuConfig.PermanentSongInfo, false); + Set(OsuConfig.Ticker, false); + Set(OsuConfig.CompatibilityContext, false); + Set(OsuConfig.CanForceOptimusCompatibility, true); } public OsuConfigManager(BasicStorage storage) : base(storage) From 2f990b884eef539a344f997297bf7de1a3b16591 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 2 Nov 2016 21:49:00 -0400 Subject: [PATCH 06/19] Tweak style to more closely match osu!next --- osu.Game/Overlays/Options.cs | 80 ++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/osu.Game/Overlays/Options.cs b/osu.Game/Overlays/Options.cs index 6e8fb7461e..a7adf829cf 100644 --- a/osu.Game/Overlays/Options.cs +++ b/osu.Game/Overlays/Options.cs @@ -19,6 +19,7 @@ namespace osu.Game.Overlays { public class Options : OverlayContainer { + internal const float SideMargins = 10; private const float width = 400; private FlowContainer optionsContainer; private BasicStorage storage; @@ -39,13 +40,12 @@ namespace osu.Game.Overlays new Box { RelativeSizeAxes = Axes.Both, - Colour = new Color4(0.1f, 0.1f, 0.1f, 0.9f) + Colour = new Color4(51, 51, 51, 255) }, // TODO: Links on the side to jump to a section new ScrollContainer { RelativeSizeAxes = Axes.Both, - Padding = new MarginPadding { Left = 5, Right = 5, Top = 50 }, ScrollDraggerOnLeft = true, Children = new[] { @@ -58,25 +58,16 @@ namespace osu.Game.Overlays { new SpriteText { - Text = "Options", + Text = "settings", TextSize = 40, - Anchor = Anchor.TopCentre, - Origin = Anchor.TopCentre, + Margin = new MarginPadding { Left = SideMargins, Top = 30 }, }, new SpriteText { Colour = new Color4(235, 117, 139, 255), Text = "Change the way osu! behaves", - Anchor = Anchor.TopCentre, - Origin = Anchor.TopCentre, - Margin = new MarginPadding { Bottom = 25 }, - }, - new SpriteText - { - Text = "TODO: SEARCH", - Anchor = Anchor.TopCentre, - Origin = Anchor.TopCentre, - Margin = new MarginPadding { Bottom = 25 }, + TextSize = 18, + Margin = new MarginPadding { Left = SideMargins, Bottom = 30 }, } } } @@ -130,7 +121,7 @@ namespace osu.Game.Overlays RelativeSizeAxes = Axes.X, Colour = new Color4(14, 132, 165, 255), Text = "Open osu! folder", - Action = storage.OpenOsuDirectory, + Action = storage.OpenInNativeExplorer, } } } @@ -171,30 +162,49 @@ namespace osu.Game.Overlays public string Header { get { return header.Text; } - set { header.Text = value.ToUpper(); } + set { header.Text = value; } } public OptionsSection() { - const int headerSize = 40, headerMargin = 25; + const int headerSize = 30, headerMargin = 25; + const int borderSize = 2; AutoSizeAxes = Axes.Y; RelativeSizeAxes = Axes.X; - AddInternal(new[] + AddInternal(new Drawable[] { - header = new SpriteText + new Box { - TextSize = headerSize, - Colour = new Color4(88, 218, 254, 255), - Anchor = Anchor.TopRight, - Origin = Anchor.TopRight, - }, - content = new FlowContainer - { - Margin = new MarginPadding { Top = headerSize + headerMargin, Left = 10 }, - Direction = FlowDirection.VerticalOnly, - Spacing = new Vector2(0, 25), - AutoSizeAxes = Axes.Y, + Colour = new Color4(3, 3, 3, 255), RelativeSizeAxes = Axes.X, + Height = borderSize, + }, + new Container + { + Padding = new MarginPadding + { + Top = 10 + borderSize, + Left = Options.SideMargins, + Right = Options.SideMargins, + }, + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Children = new[] + { + header = new SpriteText + { + TextSize = headerSize, + Colour = new Color4(247, 198, 35, 255), + }, + content = new FlowContainer + { + Margin = new MarginPadding { Top = headerSize + headerMargin }, + Direction = FlowDirection.VerticalOnly, + Spacing = new Vector2(0, 25), + AutoSizeAxes = Axes.Y, + RelativeSizeAxes = Axes.X, + }, + } }, }); } @@ -214,23 +224,15 @@ namespace osu.Game.Overlays public OptionsSubsection() { - const int borderWidth = 3, borderMargin = 10; RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; AddInternal(new Drawable[] { - new Box - { - Colour = new Color4(50, 50, 50, 255), - RelativeSizeAxes = Axes.Y, - Width = borderWidth, - }, content = new FlowContainer { Direction = FlowDirection.VerticalOnly, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Padding = new MarginPadding { Left = borderWidth + borderMargin }, Children = new[] { header = new SpriteText From 2aa85a4b18e7bd738932c8c4fcca49072254d410 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 2 Nov 2016 22:22:34 -0400 Subject: [PATCH 07/19] Split up options into subclasses --- .../Tests/TestCaseOptions.cs | 4 +- osu.Game/OsuGameBase.cs | 4 +- osu.Game/Overlays/Options/GeneralOptions.cs | 25 ++++++ osu.Game/Overlays/Options/LanguageOptions.cs | 27 +++++++ osu.Game/Overlays/Options/LoginOptions.cs | 64 +++++++++++++++ osu.Game/Overlays/Options/UpdateOptions.cs | 29 +++++++ .../{Options.cs => OptionsOverlay.cs} | 81 +++++-------------- osu.Game/osu.Game.csproj | 9 ++- 8 files changed, 178 insertions(+), 65 deletions(-) create mode 100644 osu.Game/Overlays/Options/GeneralOptions.cs create mode 100644 osu.Game/Overlays/Options/LanguageOptions.cs create mode 100644 osu.Game/Overlays/Options/LoginOptions.cs create mode 100644 osu.Game/Overlays/Options/UpdateOptions.cs rename osu.Game/Overlays/{Options.cs => OptionsOverlay.cs} (69%) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseOptions.cs b/osu.Desktop.VisualTests/Tests/TestCaseOptions.cs index 72cebe745d..781c3034fa 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseOptions.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseOptions.cs @@ -16,13 +16,13 @@ namespace osu.Desktop.VisualTests.Tests public override string Description => @"Tests the options overlay"; - private Options options; + private OptionsOverlay options; public override void Reset() { base.Reset(); - Children = new[] { options = new Options() }; + Children = new[] { options = new OptionsOverlay() }; options.ToggleVisibility(); } } diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index 8aa011f459..a506044bee 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -27,7 +27,7 @@ namespace osu.Game protected override string MainResourceFile => @"osu.Game.Resources.dll"; - public Options Options; + public OptionsOverlay Options; public APIAccess API; protected override Container Content => ratioContainer; @@ -44,7 +44,7 @@ namespace osu.Game Children = new Drawable[] { - Options = new Options(), + Options = new OptionsOverlay(), Cursor = new OsuCursorContainer() }; diff --git a/osu.Game/Overlays/Options/GeneralOptions.cs b/osu.Game/Overlays/Options/GeneralOptions.cs new file mode 100644 index 0000000000..b194303d22 --- /dev/null +++ b/osu.Game/Overlays/Options/GeneralOptions.cs @@ -0,0 +1,25 @@ +using System; +using OpenTK.Graphics; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.UserInterface; +using osu.Framework.Platform; +using osu.Game.Online.API; + +namespace osu.Game.Overlays.Options +{ + public class GeneralOptions : OptionsSection + { + public GeneralOptions(BasicStorage storage, APIAccess api) + { + Header = "General"; + Children = new Drawable[] + { + new LoginOptions(api), + new LanguageOptions(), + new UpdateOptions(storage), + }; + } + } +} + diff --git a/osu.Game/Overlays/Options/LanguageOptions.cs b/osu.Game/Overlays/Options/LanguageOptions.cs new file mode 100644 index 0000000000..9ba66f55ce --- /dev/null +++ b/osu.Game/Overlays/Options/LanguageOptions.cs @@ -0,0 +1,27 @@ +using System; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.UserInterface; + +namespace osu.Game.Overlays.Options +{ + public class LanguageOptions : OptionsSubsection + { + public LanguageOptions() + { + Header = "Language"; + Children = new Drawable[] + { + new SpriteText { Text = "TODO: Dropdown" }, + new BasicCheckBox + { + Children = new[] { new SpriteText { Text = "Prefer metadata in original language" } } + }, + new BasicCheckBox + { + Children = new[] { new SpriteText { Text = "Use alternative font for chat display" } } + }, + }; + } + } +} \ No newline at end of file diff --git a/osu.Game/Overlays/Options/LoginOptions.cs b/osu.Game/Overlays/Options/LoginOptions.cs new file mode 100644 index 0000000000..3dc07cd4cd --- /dev/null +++ b/osu.Game/Overlays/Options/LoginOptions.cs @@ -0,0 +1,64 @@ +using System; +using OpenTK; +using OpenTK.Graphics; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.UserInterface; +using osu.Game.Online.API; + +namespace osu.Game.Overlays.Options +{ + public class LoginOptions : OptionsSubsection + { + public LoginOptions(APIAccess api) + { + var state = api == null ? APIAccess.APIState.Offline : api.State; + Header = "Sign In"; + Children = new[] + { + new Container + { + Alpha = state == APIAccess.APIState.Online ? 1 : 0, + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Children = new[] + { + new SpriteText { Text = $"Logged in as {api?.Username}" } + } + }, + new Container + { + Alpha = state == APIAccess.APIState.Offline ? 1 : 0, + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Children = new[] { new LoginForm() } + }, + }; + } + } + + public class LoginForm : FlowContainer + { + public LoginForm() + { + Direction = FlowDirection.VerticalOnly; + AutoSizeAxes = Axes.Y; + RelativeSizeAxes = Axes.X; + Spacing = new Vector2(0, 5); + // TODO: Wire things up + Children = new Drawable[] + { + new SpriteText { Text = "Username" }, + new TextBox { Height = 20, RelativeSizeAxes = Axes.X }, + new SpriteText { Text = "Password" }, + new TextBox { Height = 20, RelativeSizeAxes = Axes.X }, + new Button + { + RelativeSizeAxes = Axes.X, + Text = "Log in", + } + }; + } + } +} \ No newline at end of file diff --git a/osu.Game/Overlays/Options/UpdateOptions.cs b/osu.Game/Overlays/Options/UpdateOptions.cs new file mode 100644 index 0000000000..2c12a4ad5c --- /dev/null +++ b/osu.Game/Overlays/Options/UpdateOptions.cs @@ -0,0 +1,29 @@ +using System; +using OpenTK.Graphics; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.UserInterface; +using osu.Framework.Platform; + +namespace osu.Game.Overlays.Options +{ + public class UpdateOptions : OptionsSubsection + { + public UpdateOptions(BasicStorage storage) + { + Header = "Updates"; + Children = new Drawable[] + { + new SpriteText { Text = "TODO: Dropdown" }, + new SpriteText { Text = "Your osu! is up to date" }, // TODO: map this to reality + new Button + { + RelativeSizeAxes = Axes.X, + Text = "Open osu! folder", + Action = storage.OpenInNativeExplorer, + } + }; + } + } +} + diff --git a/osu.Game/Overlays/Options.cs b/osu.Game/Overlays/OptionsOverlay.cs similarity index 69% rename from osu.Game/Overlays/Options.cs rename to osu.Game/Overlays/OptionsOverlay.cs index a7adf829cf..c053b98ecd 100644 --- a/osu.Game/Overlays/Options.cs +++ b/osu.Game/Overlays/OptionsOverlay.cs @@ -14,15 +14,20 @@ using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.UserInterface; using osu.Framework.Input; using osu.Framework.Platform; +using osu.Game.Configuration; +using osu.Game.Online.API; +using osu.Game.Overlays.Options; namespace osu.Game.Overlays { - public class Options : OverlayContainer + public class OptionsOverlay : OverlayContainer { internal const float SideMargins = 10; private const float width = 400; private FlowContainer optionsContainer; private BasicStorage storage; + private OsuConfigManager configManager; + private APIAccess api; protected override void Load(BaseGame game) { @@ -30,6 +35,13 @@ namespace osu.Game.Overlays storage = game.Host.Storage; + var osuGame = game as OsuGameBase; + if (osuGame != null) + { + configManager = osuGame.Config; + api = osuGame.API; + } + Depth = float.MaxValue; RelativeSizeAxes = Axes.Y; Size = new Vector2(width, 1); @@ -54,7 +66,7 @@ namespace osu.Game.Overlays AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, Direction = FlowDirection.VerticalOnly, - Children = new[] + Children = new Drawable[] { new SpriteText { @@ -68,65 +80,13 @@ namespace osu.Game.Overlays Text = "Change the way osu! behaves", TextSize = 18, Margin = new MarginPadding { Left = SideMargins, Bottom = 30 }, - } + }, + new GeneralOptions(storage, api), } } } } }; - addGeneral(); - } - - private void addGeneral() - { - optionsContainer.Add(new OptionsSection - { - Header = "General", - Children = new[] - { - new OptionsSubsection - { - Header = "Sign In", - Children = new[] - { - new SpriteText { Text = "TODO" } - } - }, - new OptionsSubsection - { - Header = "Language", - Children = new Drawable[] - { - new SpriteText { Text = "TODO: Dropdown" }, - new BasicCheckBox - { - Children = new[] { new SpriteText { Text = "Prefer metadata in original language" } } - }, - new BasicCheckBox - { - Children = new[] { new SpriteText { Text = "Use alternative font for chat display" } } - }, - } - }, - new OptionsSubsection - { - Header = "Updates", - Children = new Drawable[] - { - new SpriteText { Text = "TODO: Dropdown" }, - new SpriteText { Text = "Your osu! is up to date" }, // TODO: map this to reality - new Button - { - AutoSizeAxes = Axes.Y, - RelativeSizeAxes = Axes.X, - Colour = new Color4(14, 132, 165, 255), - Text = "Open osu! folder", - Action = storage.OpenInNativeExplorer, - } - } - } - } - }); } protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) @@ -153,7 +113,7 @@ namespace osu.Game.Overlays } } - class OptionsSection : Container + public class OptionsSection : Container { private SpriteText header; private FlowContainer content; @@ -184,8 +144,8 @@ namespace osu.Game.Overlays Padding = new MarginPadding { Top = 10 + borderSize, - Left = Options.SideMargins, - Right = Options.SideMargins, + Left = OptionsOverlay.SideMargins, + Right = OptionsOverlay.SideMargins, }, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, @@ -210,7 +170,7 @@ namespace osu.Game.Overlays } } - class OptionsSubsection : Container + public class OptionsSubsection : Container { private SpriteText header; private Container content; @@ -233,6 +193,7 @@ namespace osu.Game.Overlays Direction = FlowDirection.VerticalOnly, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, + Spacing = new Vector2(0, 5), Children = new[] { header = new SpriteText diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index b73bc8ffda..2f84188d0a 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -177,7 +177,7 @@ - + @@ -196,6 +196,10 @@ + + + + @@ -215,6 +219,9 @@ + + +