From e06aa44c4c1dccfc484e9b76a92d035417275dac Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Thu, 9 Feb 2017 16:18:08 +0300 Subject: [PATCH 1/3] Warning Fixes --- osu.Game.Modes.Osu/UI/OsuComboCounter.cs | 2 +- osu.Game/Beatmaps/WorkingBeatmap.cs | 4 ++-- osu.Game/Online/API/Requests/GetMessagesRequest.cs | 2 +- osu.Game/Online/Chat/Drawables/ChatLine.cs | 2 +- osu.Game/Overlays/Options/Sections/GameplaySection.cs | 2 +- osu.Game/Overlays/Options/Sections/General/LoginOptions.cs | 7 ++----- .../Overlays/Options/Sections/Online/InGameChatOptions.cs | 6 ++---- osu.Game/Screens/Menu/OsuLogo.cs | 5 ++--- osu.Game/Screens/Play/KeyCounterKeyboard.cs | 4 ++-- osu.Game/Screens/Play/KeyCounterMouse.cs | 4 ++-- 10 files changed, 16 insertions(+), 22 deletions(-) diff --git a/osu.Game.Modes.Osu/UI/OsuComboCounter.cs b/osu.Game.Modes.Osu/UI/OsuComboCounter.cs index 0d27fe502a..b6770b6f21 100644 --- a/osu.Game.Modes.Osu/UI/OsuComboCounter.cs +++ b/osu.Game.Modes.Osu/UI/OsuComboCounter.cs @@ -17,7 +17,7 @@ public class OsuComboCounter : ComboCounter protected virtual float PopOutSmallScale => 1.1f; protected virtual bool CanPopOutWhileRolling => false; - public Vector2 PopOutScale = new Vector2(1.6f); + public new Vector2 PopOutScale = new Vector2(1.6f); protected override void LoadComplete() { diff --git a/osu.Game/Beatmaps/WorkingBeatmap.cs b/osu.Game/Beatmaps/WorkingBeatmap.cs index b78bf1a273..019674c3ad 100644 --- a/osu.Game/Beatmaps/WorkingBeatmap.cs +++ b/osu.Game/Beatmaps/WorkingBeatmap.cs @@ -105,8 +105,8 @@ public WorkingBeatmap(Beatmap beatmap) public WorkingBeatmap(BeatmapInfo beatmapInfo, BeatmapSetInfo beatmapSetInfo, BeatmapDatabase database) { - this.BeatmapInfo = beatmapInfo; - this.BeatmapSetInfo = beatmapSetInfo; + BeatmapInfo = beatmapInfo; + BeatmapSetInfo = beatmapSetInfo; this.database = database; } diff --git a/osu.Game/Online/API/Requests/GetMessagesRequest.cs b/osu.Game/Online/API/Requests/GetMessagesRequest.cs index 5450d8d106..ab309b2bfa 100644 --- a/osu.Game/Online/API/Requests/GetMessagesRequest.cs +++ b/osu.Game/Online/API/Requests/GetMessagesRequest.cs @@ -15,7 +15,7 @@ public class GetMessagesRequest : APIRequest> public GetMessagesRequest(List channels, long? sinceId) { this.channels = channels; - this.since = sinceId; + since = sinceId; } protected override WebRequest CreateWebRequest() diff --git a/osu.Game/Online/Chat/Drawables/ChatLine.cs b/osu.Game/Online/Chat/Drawables/ChatLine.cs index a1f757d73f..21c6659e78 100644 --- a/osu.Game/Online/Chat/Drawables/ChatLine.cs +++ b/osu.Game/Online/Chat/Drawables/ChatLine.cs @@ -20,7 +20,7 @@ public class ChatLine : Container public ChatLine(Message message) { - this.Message = message; + Message = message; RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; diff --git a/osu.Game/Overlays/Options/Sections/GameplaySection.cs b/osu.Game/Overlays/Options/Sections/GameplaySection.cs index fcfa23c652..87de1fd249 100644 --- a/osu.Game/Overlays/Options/Sections/GameplaySection.cs +++ b/osu.Game/Overlays/Options/Sections/GameplaySection.cs @@ -16,7 +16,7 @@ public GameplaySection() { base.Children = new Drawable[] { - new Gameplay.GeneralOptions(), + new GeneralOptions(), new SongSelectOptions(), }; } diff --git a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs index 916159fc88..08777c97a7 100644 --- a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs @@ -91,9 +91,6 @@ class LoginForm : FlowContainer private TextBox password; private APIAccess api; - private OsuCheckbox saveUsername; - private OsuCheckbox savePassword; - private void performLogin() { if (!string.IsNullOrEmpty(username.Text) && !string.IsNullOrEmpty(password.Text)) @@ -121,12 +118,12 @@ private void load(APIAccess api, OsuConfigManager config) PlaceholderText = "Password", RelativeSizeAxes = Axes.X }, - saveUsername = new OsuCheckbox + new OsuCheckbox { LabelText = "Remember username", Bindable = config.GetBindable(OsuConfig.SaveUsername), }, - savePassword = new OsuCheckbox + new OsuCheckbox { LabelText = "Stay logged in", Bindable = config.GetBindable(OsuConfig.SavePassword), diff --git a/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs b/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs index 9021c798fd..9a477f40c7 100644 --- a/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs @@ -10,8 +10,6 @@ namespace osu.Game.Overlays.Options.Sections.Online { public class InGameChatOptions : OptionsSubsection { - private OptionTextBox chatIgnoreList; - private OptionTextBox chatHighlightWords; protected override string Header => "Chat"; [BackgroundDependencyLoader] @@ -40,12 +38,12 @@ private void load(OsuConfigManager config) Bindable = config.GetBindable(OsuConfig.BlockNonFriendPM) }, new OptionLabel { Text = "Chat ignore list (space-seperated list)" }, - chatIgnoreList = new OptionTextBox { + new OptionTextBox { RelativeSizeAxes = Axes.X, Bindable = config.GetBindable(OsuConfig.IgnoreList) }, new OptionLabel { Text = "Chat highlight words (space-seperated list)" }, - chatHighlightWords = new OptionTextBox { + new OptionTextBox { RelativeSizeAxes = Axes.X, Bindable = config.GetBindable(OsuConfig.HighlightWords) }, diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index c18659b445..225b15c57e 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -24,7 +24,7 @@ namespace osu.Game.Screens.Menu /// /// osu! logo and its attachments (pulsing, visualiser etc.) /// - public partial class OsuLogo : Container + public class OsuLogo : Container { public Color4 OsuPink = OsuColour.FromHex(@"e967a1"); @@ -32,7 +32,6 @@ public partial class OsuLogo : Container private CircularContainer logoContainer; private Container logoBounceContainer; private Container logoHoverContainer; - private MenuVisualisation vis; private AudioSample sampleClick; @@ -154,7 +153,7 @@ public OsuLogo() } } }, - vis = new MenuVisualisation + new MenuVisualisation { Anchor = Anchor.Centre, Origin = Anchor.Centre, diff --git a/osu.Game/Screens/Play/KeyCounterKeyboard.cs b/osu.Game/Screens/Play/KeyCounterKeyboard.cs index 5dac1bfd43..83f6526c91 100644 --- a/osu.Game/Screens/Play/KeyCounterKeyboard.cs +++ b/osu.Game/Screens/Play/KeyCounterKeyboard.cs @@ -17,13 +17,13 @@ public KeyCounterKeyboard(string name, Key key) : base(name) protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) { - if (args.Key == this.Key) IsLit = true; + if (args.Key == Key) IsLit = true; return base.OnKeyDown(state, args); } protected override bool OnKeyUp(InputState state, KeyUpEventArgs args) { - if (args.Key == this.Key) IsLit = false; + if (args.Key == Key) IsLit = false; return base.OnKeyUp(state, args); } } diff --git a/osu.Game/Screens/Play/KeyCounterMouse.cs b/osu.Game/Screens/Play/KeyCounterMouse.cs index 7ae352b42b..ef3bf3ccba 100644 --- a/osu.Game/Screens/Play/KeyCounterMouse.cs +++ b/osu.Game/Screens/Play/KeyCounterMouse.cs @@ -20,13 +20,13 @@ public KeyCounterMouse(string name, MouseButton button) : base(name) protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) { - if (args.Button == this.Button) IsLit = true; + if (args.Button == Button) IsLit = true; return base.OnMouseDown(state, args); } protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) { - if (args.Button == this.Button) IsLit = false; + if (args.Button == Button) IsLit = false; return base.OnMouseUp(state, args); } } From d5b7a8ce9e3e1882befec91146d516edc028551b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 10 Feb 2017 11:19:13 +0900 Subject: [PATCH 2/3] Add pink glow to cursor because I can't fucking see it against white. --- osu.Game/Graphics/Cursor/OsuCursorContainer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs index 8df0777989..691fb701f1 100644 --- a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs @@ -67,6 +67,11 @@ private void load(TextureStore textures, OsuConfigManager config) Masking = true, BorderThickness = Size.X / 6, BorderColour = Color4.White, + EdgeEffect = new EdgeEffect { + Type = EdgeEffectType.Shadow, + Colour = Color4.Pink.Opacity(0.5f), + Radius = 5, + }, Children = new Drawable[] { new Box From 456fc5e37578c41a8cf41164f88a02f90cf07dac Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 10 Feb 2017 16:43:11 +0900 Subject: [PATCH 3/3] Update framework. --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 21fd81a848..7df72f8d0c 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 21fd81a84860cf6854026458ac82905b6248f41d +Subproject commit 7df72f8d0cb887437a2816d3f413bf37ca2d6641