diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 8e71a54a34..381bca2a71 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -14,144 +14,148 @@ namespace osu.Game.Configuration { #pragma warning disable CS0612 // Type or member is obsolete - Set(OsuConfig.MouseSpeed, 1.0); - Set(OsuConfig.Username, string.Empty); Set(OsuConfig.Token, string.Empty); Set(OsuConfig.PlayMode, PlayMode.Osu); - - Set(OsuConfig.BeatmapDirectory, @"Songs"); // TODO: use this - 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, true); - 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, 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); - Set(OsuConfig.EditorGridSize, 32, 4, 32); - Set(OsuConfig.EditorGridSizeDesign, 32, 4, 32); - Set(OsuConfig.CustomFrameLimit, 240, 240, 999); - Set(OsuConfig.MsnIntegration, false); - Set(OsuConfig.MyPcSucks, false); - Set(OsuConfig.NotifyFriends, true); - Set(OsuConfig.NotifySubmittedThread, true); - Set(OsuConfig.PopupDuringGameplay, true); - Set(OsuConfig.ProgressBarType, ProgressBarType.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, ScoreMeterType.Error); - //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, ScreenshotFormat.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.SnakingInSliders, true); - Set(OsuConfig.SnakingOutSliders, false); - 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.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.DisplayStarsMaximum, 10.0, 0.0, 10.0); - Set(OsuConfig.DisplayStarsMinimum, 0.0, 0.0, 10.0); Set(OsuConfig.AudioDevice, string.Empty); - Set(OsuConfig.ReleaseStream, ReleaseStream.Lazer); - Set(OsuConfig.UpdateFailCount, 0); Set(OsuConfig.SavePassword, false); Set(OsuConfig.SaveUsername, true); - //Set(OsuConfig.TreeSortMode, TreeGroupMode.Show_All); - //Set(OsuConfig.TreeSortMode2, TreeSortMode.Title); + + Set(OsuConfig.CursorSize, 1.0, 0.5f, 2); + Set(OsuConfig.DimLevel, 30, 0, 100); + + Set(OsuConfig.MouseDisableButtons, false); + + Set(OsuConfig.SnakingInSliders, true); + Set(OsuConfig.SnakingOutSliders, false); + + //todo: implement all settings below this line (remove the Disabled set when doing so). + + Set(OsuConfig.MouseSpeed, 1.0).Disabled = true; + Set(OsuConfig.BeatmapDirectory, @"Songs").Disabled = true; // TODO: use thi.Disabled = trues + Set(OsuConfig.AllowPublicInvites, true).Disabled = true; + Set(OsuConfig.AutoChatHide, true).Disabled = true; + Set(OsuConfig.AutomaticDownload, true).Disabled = true; + Set(OsuConfig.AutomaticDownloadNoVideo, false).Disabled = true; + Set(OsuConfig.BlockNonFriendPM, false).Disabled = true; + Set(OsuConfig.BloomSoftening, false).Disabled = true; + Set(OsuConfig.BossKeyFirstActivation, true).Disabled = true; + Set(OsuConfig.ChatAudibleHighlight, true).Disabled = true; + Set(OsuConfig.ChatChannels, string.Empty).Disabled = true; + Set(OsuConfig.ChatFilter, false).Disabled = true; + Set(OsuConfig.ChatHighlightName, true).Disabled = true; + Set(OsuConfig.ChatMessageNotification, true).Disabled = true; + Set(OsuConfig.ChatLastChannel, string.Empty).Disabled = true; + Set(OsuConfig.ChatRemoveForeign, false).Disabled = true; + //Set(OsuConfig.ChatSortMode, UserSortMode.Rank).Disabled = true; + Set(OsuConfig.ComboBurst, true).Disabled = true; + Set(OsuConfig.ComboFire, false).Disabled = true; + Set(OsuConfig.ComboFireHeight, 3).Disabled = true; + Set(OsuConfig.ConfirmExit, false).Disabled = true; + Set(OsuConfig.AutoSendNowPlaying, true).Disabled = true; + Set(OsuConfig.AutomaticCursorSizing, false).Disabled = true; + Set(OsuConfig.Display, 1).Disabled = true; + Set(OsuConfig.DisplayCityLocation, false).Disabled = true; + Set(OsuConfig.DistanceSpacingEnabled, true).Disabled = true; + Set(OsuConfig.EditorTip, 0).Disabled = true; + Set(OsuConfig.VideoEditor, true).Disabled = true; + Set(OsuConfig.EditorDefaultSkin, false).Disabled = true; + Set(OsuConfig.EditorSnakingSliders, true).Disabled = true; + Set(OsuConfig.EditorHitAnimations, false).Disabled = true; + Set(OsuConfig.EditorFollowPoints, true).Disabled = true; + Set(OsuConfig.EditorStacking, true).Disabled = true; + Set(OsuConfig.ForceSliderRendering, false).Disabled = true; + Set(OsuConfig.FpsCounter, false).Disabled = true; + Set(OsuConfig.FrameTimeDisplay, false).Disabled = true; + Set(OsuConfig.GuideTips, @"").Disabled = true; + Set(OsuConfig.CursorRipple, false).Disabled = true; + Set(OsuConfig.HighlightWords, string.Empty).Disabled = true; + Set(OsuConfig.HighResolution, false).Disabled = true; + Set(OsuConfig.HitLighting, true).Disabled = true; + Set(OsuConfig.IgnoreBarline, false).Disabled = true; + Set(OsuConfig.IgnoreBeatmapSamples, false).Disabled = true; + Set(OsuConfig.IgnoreBeatmapSkins, false).Disabled = true; + Set(OsuConfig.IgnoreList, string.Empty).Disabled = true; + Set(OsuConfig.KeyOverlay, false).Disabled = true; + Set(OsuConfig.Language, @"unknown").Disabled = true; + Set(OsuConfig.AllowNowPlayingHighlights, false).Disabled = true; + Set(OsuConfig.LastVersion, string.Empty).Disabled = true; + Set(OsuConfig.LastVersionPermissionsFailed, string.Empty).Disabled = true; + Set(OsuConfig.LoadSubmittedThread, true).Disabled = true; + Set(OsuConfig.LobbyPlayMode, -1).Disabled = true; + Set(OsuConfig.ShowInterface, true).Disabled = true; + Set(OsuConfig.ShowInterfaceDuringRelax, false).Disabled = true; + Set(OsuConfig.LobbyShowExistingOnly, false).Disabled = true; + Set(OsuConfig.LobbyShowFriendsOnly, false).Disabled = true; + Set(OsuConfig.LobbyShowFull, false).Disabled = true; + Set(OsuConfig.LobbyShowInProgress, true).Disabled = true; + Set(OsuConfig.LobbyShowPassworded, true).Disabled = true; + Set(OsuConfig.LogPrivateMessages, false).Disabled = true; + Set(OsuConfig.LowResolution, false).Disabled = true; + //Set(OsuConfig.ManiaSpeed, SpeedMania.SPEED_DEFAULT, SpeedMania.SPEED_MIN, SpeedMania.SPEED_MAX).Disabled = true; + Set(OsuConfig.UsePerBeatmapManiaSpeed, true).Disabled = true; + Set(OsuConfig.ManiaSpeedBPMScale, true).Disabled = true; + Set(OsuConfig.MenuTip, 0).Disabled = true; + Set(OsuConfig.MouseDisableWheel, false).Disabled = true; + Set(OsuConfig.MouseSpeed, 1, 0.4, 6).Disabled = true; + Set(OsuConfig.Offset, 0, -300, 300).Disabled = true; + Set(OsuConfig.ScoreMeterScale, 1, 0.5, 2).Disabled = true; + //Set(OsuConfig.ScoreMeterScale, 1, 0.5, OsuGame.Tournament ? 10 : 2).Disabled = true; + Set(OsuConfig.DistanceSpacing, 0.8, 0.1, 6).Disabled = true; + Set(OsuConfig.EditorBeatDivisor, 1, 1, 16).Disabled = true; + Set(OsuConfig.EditorGridSize, 32, 4, 32).Disabled = true; + Set(OsuConfig.EditorGridSizeDesign, 32, 4, 32).Disabled = true; + Set(OsuConfig.CustomFrameLimit, 240, 240, 999).Disabled = true; + Set(OsuConfig.MsnIntegration, false).Disabled = true; + Set(OsuConfig.MyPcSucks, false).Disabled = true; + Set(OsuConfig.NotifyFriends, true).Disabled = true; + Set(OsuConfig.NotifySubmittedThread, true).Disabled = true; + Set(OsuConfig.PopupDuringGameplay, true).Disabled = true; + Set(OsuConfig.ProgressBarType, ProgressBarType.Pie).Disabled = true; + Set(OsuConfig.RankType, RankingType.Top).Disabled = true; + Set(OsuConfig.RefreshRate, 60).Disabled = true; + Set(OsuConfig.OverrideRefreshRate, Get(OsuConfig.RefreshRate) != 60).Disabled = true; + //Set(OsuConfig.ScaleMode, ScaleMode.WidescreenConservative).Disabled = true; + Set(OsuConfig.ScoreboardVisible, true).Disabled = true; + Set(OsuConfig.ScoreMeter, ScoreMeterType.Error).Disabled = true; + //Set(OsuConfig.ScoreMeter, OsuGame.Tournament ? ScoreMeterType.Colour : ScoreMeterType.Error).Disabled = true; + Set(OsuConfig.ScreenshotId, 0).Disabled = true; + Set(OsuConfig.MenuSnow, false).Disabled = true; + Set(OsuConfig.MenuTriangles, true).Disabled = true; + Set(OsuConfig.SongSelectThumbnails, true).Disabled = true; + Set(OsuConfig.ScreenshotFormat, ScreenshotFormat.Jpg).Disabled = true; + Set(OsuConfig.ShowReplayComments, true).Disabled = true; + Set(OsuConfig.ShowSpectators, true).Disabled = true; + Set(OsuConfig.ShowStoryboard, true).Disabled = true; + //Set(OsuConfig.Skin, SkinManager.DEFAULT_SKIN).Disabled = true; + Set(OsuConfig.SkinSamples, true).Disabled = true; + Set(OsuConfig.SkipTablet, false).Disabled = true; + Set(OsuConfig.Tablet, false).Disabled = true; + Set(OsuConfig.UpdatePending, false).Disabled = true; + Set(OsuConfig.UseSkinCursor, false).Disabled = true; + Set(OsuConfig.UseTaikoSkin, false).Disabled = true; + Set(OsuConfig.Video, true).Disabled = true; + Set(OsuConfig.Wiimote, false).Disabled = true; + Set(OsuConfig.YahooIntegration, false).Disabled = true; + Set(OsuConfig.ForceFrameFlush, false).Disabled = true; + Set(OsuConfig.DetectPerformanceIssues, true).Disabled = true; + Set(OsuConfig.MenuMusic, true).Disabled = true; + Set(OsuConfig.MenuVoice, true).Disabled = true; + Set(OsuConfig.MenuParallax, true).Disabled = true; + Set(OsuConfig.RawInput, false).Disabled = true; + Set(OsuConfig.AbsoluteToOsuWindow, Get(OsuConfig.RawInput)).Disabled = true; + Set(OsuConfig.ShowMenuTips, true).Disabled = true; + Set(OsuConfig.HiddenShowFirstApproach, true).Disabled = true; + Set(OsuConfig.ComboColourSliderBall, true).Disabled = true; + Set(OsuConfig.AlternativeChatFont, false).Disabled = true; + Set(OsuConfig.DisplayStarsMaximum, 10.0, 0.0, 10.0).Disabled = true; + Set(OsuConfig.DisplayStarsMinimum, 0.0, 0.0, 10.0).Disabled = true; + Set(OsuConfig.ReleaseStream, ReleaseStream.Lazer).Disabled = true; + Set(OsuConfig.UpdateFailCount, 0).Disabled = true; + //Set(OsuConfig.TreeSortMode, TreeGroupMode.Show_All).Disabled = true; + //Set(OsuConfig.TreeSortMode2, TreeSortMode.Title).Disabled = true; bool unicodeDefault = false; switch (Get(OsuConfig.Language)) { @@ -162,12 +166,12 @@ namespace osu.Game.Configuration break; } Set(OsuConfig.ShowUnicode, unicodeDefault); - Set(OsuConfig.PermanentSongInfo, false); - Set(OsuConfig.Ticker, false); - Set(OsuConfig.CompatibilityContext, false); - Set(OsuConfig.CanForceOptimusCompatibility, true); + Set(OsuConfig.PermanentSongInfo, false).Disabled = true; + Set(OsuConfig.Ticker, false).Disabled = true; + Set(OsuConfig.CompatibilityContext, false).Disabled = true; + Set(OsuConfig.CanForceOptimusCompatibility, true).Disabled = true; Set(OsuConfig.ConfineMouse, Get(OsuConfig.ConfineMouseToFullscreen) ? - ConfineMouseMode.Fullscreen : ConfineMouseMode.Never); + ConfineMouseMode.Fullscreen : ConfineMouseMode.Never).Disabled = true; GetBindable(OsuConfig.SavePassword).ValueChanged += delegate diff --git a/osu.Game/Graphics/UserInterface/OsuButton.cs b/osu.Game/Graphics/UserInterface/OsuButton.cs index 7d88451a6f..31f66407ce 100644 --- a/osu.Game/Graphics/UserInterface/OsuButton.cs +++ b/osu.Game/Graphics/UserInterface/OsuButton.cs @@ -32,10 +32,15 @@ namespace osu.Game.Graphics.UserInterface Font = @"Exo2.0-Bold", }; + public override bool HandleInput => Action != null; + [BackgroundDependencyLoader] private void load(OsuColour colours) { - Colour = colours.BlueDark; + if (Action == null) + Colour = OsuColour.Gray(0.5f); + + BackgroundColour = colours.BlueDark; Content.Masking = true; Content.CornerRadius = 5; diff --git a/osu.Game/Graphics/UserInterface/OsuCheckbox.cs b/osu.Game/Graphics/UserInterface/OsuCheckbox.cs index bd580bb76b..206b0dc09d 100644 --- a/osu.Game/Graphics/UserInterface/OsuCheckbox.cs +++ b/osu.Game/Graphics/UserInterface/OsuCheckbox.cs @@ -39,6 +39,9 @@ namespace osu.Game.Graphics.UserInterface State = bindable.Value ? CheckBoxState.Checked : CheckBoxState.Unchecked; bindable.ValueChanged += bindableValueChanged; } + + if (bindable?.Disabled ?? true) + Alpha = 0.3f; } } @@ -123,20 +126,20 @@ namespace osu.Game.Graphics.UserInterface protected override void OnChecked() { - if (bindable != null) - bindable.Value = true; - sampleChecked?.Play(); nub.State = CheckBoxState.Checked; + + if (bindable != null) + bindable.Value = true; } protected override void OnUnchecked() { - if (bindable != null) - bindable.Value = false; - sampleUnchecked?.Play(); nub.State = CheckBoxState.Unchecked; + + if (bindable != null) + bindable.Value = false; } } } diff --git a/osu.Game/Overlays/Options/OptionDropDown.cs b/osu.Game/Overlays/Options/OptionDropDown.cs index ff1e6ae103..2f88ab34ae 100644 --- a/osu.Game/Overlays/Options/OptionDropDown.cs +++ b/osu.Game/Overlays/Options/OptionDropDown.cs @@ -34,29 +34,32 @@ namespace osu.Game.Overlays.Options set { if (bindable != null) - bindable.ValueChanged -= Bindable_ValueChanged; + bindable.ValueChanged -= bindable_ValueChanged; bindable = value; - bindable.ValueChanged += Bindable_ValueChanged; - Bindable_ValueChanged(null, null); + bindable.ValueChanged += bindable_ValueChanged; + bindable_ValueChanged(null, null); + + if (bindable?.Disabled ?? true) + Alpha = 0.3f; } } private Bindable bindable; - void Bindable_ValueChanged(object sender, EventArgs e) + void bindable_ValueChanged(object sender, EventArgs e) { dropdown.SelectedValue = bindable.Value; } - void Dropdown_ValueChanged(object sender, EventArgs e) + void dropdown_ValueChanged(object sender, EventArgs e) { bindable.Value = dropdown.SelectedValue; } protected override void Dispose(bool isDisposing) { - bindable.ValueChanged -= Bindable_ValueChanged; - dropdown.ValueChanged -= Dropdown_ValueChanged; + bindable.ValueChanged -= bindable_ValueChanged; + dropdown.ValueChanged -= dropdown_ValueChanged; base.Dispose(isDisposing); } @@ -101,7 +104,7 @@ namespace osu.Game.Overlays.Options Items = this.Items, } }; - dropdown.ValueChanged += Dropdown_ValueChanged; + dropdown.ValueChanged += dropdown_ValueChanged; } } } diff --git a/osu.Game/Overlays/Options/OptionEnumDropDown.cs b/osu.Game/Overlays/Options/OptionEnumDropDown.cs index 81438fd59e..9b9f5acc5c 100644 --- a/osu.Game/Overlays/Options/OptionEnumDropDown.cs +++ b/osu.Game/Overlays/Options/OptionEnumDropDown.cs @@ -1,12 +1,4 @@ using System; -using osu.Framework.Configuration; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Primitives; -using osu.Framework.Graphics.Sprites; -using osu.Framework.Graphics.UserInterface; -using osu.Game.Graphics.Sprites; -using osu.Game.Graphics.UserInterface; using System.Reflection; using System.ComponentModel; using System.Collections.Generic; diff --git a/osu.Game/Overlays/Options/OptionSlider.cs b/osu.Game/Overlays/Options/OptionSlider.cs index 6a41cb9612..32ce420e7e 100644 --- a/osu.Game/Overlays/Options/OptionSlider.cs +++ b/osu.Game/Overlays/Options/OptionSlider.cs @@ -1,6 +1,7 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using OpenTK.Graphics; using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -16,7 +17,7 @@ namespace osu.Game.Overlays.Options { private SliderBar slider; private SpriteText text; - + public string LabelText { get { return text.Text; } @@ -26,11 +27,16 @@ namespace osu.Game.Overlays.Options text.Alpha = string.IsNullOrEmpty(value) ? 0 : 1; } } - + public BindableNumber Bindable { get { return slider.Bindable; } - set { slider.Bindable = value; } + set + { + slider.Bindable = value; + if (value?.Disabled ?? true) + Alpha = 0.3f; + } } public OptionSlider() diff --git a/osu.Game/Overlays/Options/OptionTextBox.cs b/osu.Game/Overlays/Options/OptionTextBox.cs index 18fcfa6fca..813d372db6 100644 --- a/osu.Game/Overlays/Options/OptionTextBox.cs +++ b/osu.Game/Overlays/Options/OptionTextBox.cs @@ -24,6 +24,9 @@ namespace osu.Game.Overlays.Options base.Text = bindable.Value; bindable.ValueChanged += bindableValueChanged; } + + if (bindable?.Disabled ?? true) + Alpha = 0.3f; } } diff --git a/osu.Game/Screens/GameModeWhiteBox.cs b/osu.Game/Screens/GameModeWhiteBox.cs index b72a352ef9..dce33eefb0 100644 --- a/osu.Game/Screens/GameModeWhiteBox.cs +++ b/osu.Game/Screens/GameModeWhiteBox.cs @@ -145,7 +145,7 @@ namespace osu.Game.Screens Size = new Vector2(1, 40), Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, - Colour = getColourFor(t), + BackgroundColour = getColourFor(t), Action = delegate { Push(Activator.CreateInstance(t) as GameMode);