From 31890a1e013cad367f6f4f77d3748ba0b6d4a57c Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 20 May 2017 18:06:25 -0300 Subject: [PATCH 01/50] =?UTF-8?q?Initial=20layout,=C2=A0channels=20items?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- osu.Game/Overlays/Chat/ChannelListItem.cs | 143 ++++++++++++++++++ .../Overlays/Chat/ChannelSelectionOverlay.cs | 120 +++++++++++++++ osu.Game/osu.Game.csproj | 2 + 3 files changed, 265 insertions(+) create mode 100644 osu.Game/Overlays/Chat/ChannelListItem.cs create mode 100644 osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs new file mode 100644 index 0000000000..f8a058c444 --- /dev/null +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -0,0 +1,143 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using OpenTK; +using OpenTK.Graphics; +using osu.Framework.Allocation; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Game.Graphics; +using osu.Game.Graphics.Sprites; + +namespace osu.Game.Overlays.Chat +{ + public class ChannelListItem : ClickableContainer + { + private const float channel_width = 150; + private const float topic_width = 380; + private const float text_size = 15; + private const float transition_duration = 100; + + private readonly OsuSpriteText topic; + private readonly TextAwesome joinedCheckmark; + + private Color4? joinedColour; + private Color4? topicColour; + + private bool joined; + public bool Joined + { + get { return joined; } + set + { + if (value == joined) return; + joined = value; + + updateColour(); + } + } + + public ChannelListItem() + { + RelativeSizeAxes = Axes.X; + AutoSizeAxes = Axes.Y; + + Children = new Drawable[] + { + new FillFlowContainer + { + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Direction = FillDirection.Horizontal, + Spacing = new Vector2(5f, 0f), + Padding = new MarginPadding { Left = ChannelSelectionOverlay.WIDTH_PADDING, Right = ChannelSelectionOverlay.WIDTH_PADDING }, + Children = new Drawable[] + { + new Container + { + Children = new[] + { + joinedCheckmark = new TextAwesome + { + Anchor = Anchor.TopRight, + Origin = Anchor.TopRight, + Icon = FontAwesome.fa_check_circle, + TextSize = text_size, + Margin = new MarginPadding { Right = 10f }, + Alpha = 0f, + }, + }, + }, + new Container + { + Width = channel_width, + AutoSizeAxes = Axes.Y, + Children = new[] + { + new OsuSpriteText + { + Text = @"#osu!", + TextSize = text_size, + Font = @"Exo2.0-Bold", + }, + }, + }, + new Container + { + Width = topic_width, + AutoSizeAxes = Axes.Y, + Children = new[] + { + topic = new OsuSpriteText + { + Text = @"I dunno, the default channel I guess?", + TextSize = text_size, + Font = @"Exo2.0-SemiBold", + Alpha = 0.8f, + }, + }, + }, + new FillFlowContainer + { + AutoSizeAxes = Axes.Both, + Direction = FillDirection.Horizontal, + Spacing = new Vector2(3f, 0f), + Children = new Drawable[] + { + new TextAwesome + { + Icon = FontAwesome.fa_user, + TextSize = text_size - 2, + Margin = new MarginPadding { Top = 1 }, + }, + new OsuSpriteText + { + Text = @"543145", + TextSize = text_size, + Font = @"Exo2.0-SemiBold", + }, + }, + }, + }, + }, + }; + } + + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + topicColour = colours.Gray9; + joinedColour = colours.Blue; + + updateColour(); + } + + private void updateColour() + { + joinedCheckmark.FadeTo(joined ? 1f : 0f, transition_duration); + topic.FadeTo(joined ? 0.8f : 1f, transition_duration); + topic.FadeColour(joined ? Color4.White : topicColour ?? Color4.White, transition_duration); + FadeColour(joined ? joinedColour ?? Color4.White : Color4.White, transition_duration); + } + } +} diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs new file mode 100644 index 0000000000..217200ec44 --- /dev/null +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -0,0 +1,120 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using OpenTK; +using OpenTK.Graphics; +using osu.Framework.Allocation; +using osu.Framework.Extensions.Color4Extensions; +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.Overlays.Chat +{ + public class ChannelSelectionOverlay : OverlayContainer + { + public static readonly float WIDTH_PADDING = 170; + + private readonly Box bg; + private readonly Box headerBg; + private readonly SearchTextBox search; + + public ChannelSelectionOverlay() + { + RelativeSizeAxes = Axes.X; + Children = new Drawable[] + { + new Container + { + RelativeSizeAxes = Axes.Both, + Masking = true, + EdgeEffect = new EdgeEffect + { + Type = EdgeEffectType.Shadow, + Colour = Color4.Black.Opacity(0.25f), + Radius = 5, + }, + Children = new[] + { + bg = new Box + { + RelativeSizeAxes = Axes.Both, + }, + }, + }, + new Container + { + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Children = new Drawable[] + { + headerBg = new Box + { + RelativeSizeAxes = Axes.Both, + }, + new FillFlowContainer + { + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Direction = FillDirection.Vertical, + Spacing = new Vector2(0f, 10f), + Padding = new MarginPadding { Top = 10f, Bottom = 10f, Left = WIDTH_PADDING, Right = WIDTH_PADDING }, + Children = new Drawable[] + { + new OsuSpriteText + { + Text = @"Chat Channels", + TextSize = 20, + }, + search = new HeaderSearchTextBox + { + RelativeSizeAxes = Axes.X, + PlaceholderText = @"Search", + }, + }, + }, + }, + }, + new ChannelListItem + { + Anchor = Anchor.Centre, + Origin = Anchor.BottomCentre, + Joined = false, + }, + new ChannelListItem + { + Anchor = Anchor.Centre, + Origin = Anchor.TopCentre, + Joined = true, + }, + }; + } + + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + bg.Colour = colours.Gray3; + headerBg.Colour = colours.Gray2.Opacity(0.75f); + } + + protected override void PopIn() + { + search.HoldFocus = true; + Schedule(() => search.TriggerFocus()); + } + + protected override void PopOut() + { + search.HoldFocus = false; + } + + private class HeaderSearchTextBox : SearchTextBox + { + protected override Color4 BackgroundFocused => Color4.Black.Opacity(0.2f); + protected override Color4 BackgroundUnfocused => Color4.Black.Opacity(0.2f); + } + } +} diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index ee906caa9b..89e32a478f 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -428,6 +428,8 @@ + + From 6a8d745db18d8442404190dfe82fddbdb8816835 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 20 May 2017 18:29:57 -0300 Subject: [PATCH 02/50] Use Channels in ChannelListItems, ChannelSection, fix ChannelListItem being misaligned --- osu.Game/Overlays/Chat/ChannelListItem.cs | 14 +++-- osu.Game/Overlays/Chat/ChannelSection.cs | 57 +++++++++++++++++++ .../Overlays/Chat/ChannelSelectionOverlay.cs | 20 ++++--- osu.Game/osu.Game.csproj | 1 + 4 files changed, 77 insertions(+), 15 deletions(-) create mode 100644 osu.Game/Overlays/Chat/ChannelSection.cs diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index f8a058c444..ce46c73574 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -8,11 +8,13 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; +using osu.Game.Online.Chat; namespace osu.Game.Overlays.Chat { public class ChannelListItem : ClickableContainer { + private const float width_padding = 5; private const float channel_width = 150; private const float topic_width = 380; private const float text_size = 15; @@ -37,7 +39,7 @@ namespace osu.Game.Overlays.Chat } } - public ChannelListItem() + public ChannelListItem(Channel channel) { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; @@ -49,8 +51,6 @@ namespace osu.Game.Overlays.Chat RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Horizontal, - Spacing = new Vector2(5f, 0f), - Padding = new MarginPadding { Left = ChannelSelectionOverlay.WIDTH_PADDING, Right = ChannelSelectionOverlay.WIDTH_PADDING }, Children = new Drawable[] { new Container @@ -76,7 +76,7 @@ namespace osu.Game.Overlays.Chat { new OsuSpriteText { - Text = @"#osu!", + Text = $@"#{channel.Name}", TextSize = text_size, Font = @"Exo2.0-Bold", }, @@ -86,11 +86,12 @@ namespace osu.Game.Overlays.Chat { Width = topic_width, AutoSizeAxes = Axes.Y, + Margin = new MarginPadding { Left = width_padding }, Children = new[] { topic = new OsuSpriteText { - Text = @"I dunno, the default channel I guess?", + Text = channel.Topic, TextSize = text_size, Font = @"Exo2.0-SemiBold", Alpha = 0.8f, @@ -101,6 +102,7 @@ namespace osu.Game.Overlays.Chat { AutoSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, + Margin = new MarginPadding { Left = width_padding }, Spacing = new Vector2(3f, 0f), Children = new Drawable[] { @@ -133,7 +135,7 @@ namespace osu.Game.Overlays.Chat } private void updateColour() - { + { joinedCheckmark.FadeTo(joined ? 1f : 0f, transition_duration); topic.FadeTo(joined ? 0.8f : 1f, transition_duration); topic.FadeColour(joined ? Color4.White : topicColour ?? Color4.White, transition_duration); diff --git a/osu.Game/Overlays/Chat/ChannelSection.cs b/osu.Game/Overlays/Chat/ChannelSection.cs new file mode 100644 index 0000000000..cbb197e84c --- /dev/null +++ b/osu.Game/Overlays/Chat/ChannelSection.cs @@ -0,0 +1,57 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System.Collections.Generic; +using System.Linq; +using OpenTK; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Game.Graphics.Sprites; +using osu.Game.Online.Chat; + +namespace osu.Game.Overlays.Chat +{ + public class ChannelSection : Container + { + private readonly FillFlowContainer items; + private readonly OsuSpriteText header; + + public string Header + { + set + { + header.Text = value; + } + } + + public IEnumerable Channels + { + set + { + items.Children = value.Select(c => new ChannelListItem(c)); + } + } + + public ChannelSection() + { + RelativeSizeAxes = Axes.X; + AutoSizeAxes = Axes.Y; + + Children = new Drawable[] + { + header = new OsuSpriteText + { + TextSize = 15, + Font = @"Exo2.0-Bold", + }, + items = new FillFlowContainer + { + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Margin = new MarginPadding { Top = 25 }, + Spacing = new Vector2(0f, 5f), + }, + }; + } + } +} diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index 217200ec44..fbed51cae8 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -11,6 +11,7 @@ using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; +using osu.Game.Online.Chat; namespace osu.Game.Overlays.Chat { @@ -78,17 +79,18 @@ namespace osu.Game.Overlays.Chat }, }, }, - new ChannelListItem + new ChannelSection { Anchor = Anchor.Centre, - Origin = Anchor.BottomCentre, - Joined = false, - }, - new ChannelListItem - { - Anchor = Anchor.Centre, - Origin = Anchor.TopCentre, - Joined = true, + Origin = Anchor.Centre, + Padding = new MarginPadding { Left = WIDTH_PADDING, Right = WIDTH_PADDING }, + Header = @"GENERAL CHANNELS", + Channels = new[] + { + new Channel { Name = @"announcements", Topic = @"Automated announcement of stuff going on in osu!" }, + new Channel { Name = @"osu!", Topic = @"I dunno, the default channel I guess?" }, + new Channel { Name = @"lobby", Topic = @"Look for trouble here" }, + }, }, }; } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 89e32a478f..84ef48d481 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -430,6 +430,7 @@ + From 3cc51006cc496bce41a513e9ac6f35c5150820ac Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 20 May 2017 19:30:40 -0300 Subject: [PATCH 03/50] Add settings button, background triangles, proper displaying of Channels --- osu.Game/Overlays/Chat/ChannelListItem.cs | 4 +- .../Overlays/Chat/ChannelSelectionOverlay.cs | 145 ++++++++++++++++-- 2 files changed, 134 insertions(+), 15 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index ce46c73574..56a0e74c35 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -76,7 +76,7 @@ namespace osu.Game.Overlays.Chat { new OsuSpriteText { - Text = $@"#{channel.Name}", + Text = channel.ToString(), TextSize = text_size, Font = @"Exo2.0-Bold", }, @@ -114,7 +114,7 @@ namespace osu.Game.Overlays.Chat }, new OsuSpriteText { - Text = @"543145", + Text = @"0", TextSize = text_size, Font = @"Exo2.0-SemiBold", }, diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index fbed51cae8..23408259ff 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -1,17 +1,22 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System.Collections.Generic; using OpenTK; using OpenTK.Graphics; using osu.Framework.Allocation; +using osu.Framework.Audio; +using osu.Framework.Audio.Sample; +using osu.Framework.Audio.Track; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; +using osu.Framework.Input; using osu.Game.Graphics; +using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; -using osu.Game.Online.Chat; namespace osu.Game.Overlays.Chat { @@ -20,8 +25,18 @@ namespace osu.Game.Overlays.Chat public static readonly float WIDTH_PADDING = 170; private readonly Box bg; + private readonly Triangles triangles; private readonly Box headerBg; private readonly SearchTextBox search; + private readonly FillFlowContainer sectionsFlow; + + public IEnumerable Sections + { + set + { + sectionsFlow.Children = value; + } + } public ChannelSelectionOverlay() { @@ -38,12 +53,34 @@ namespace osu.Game.Overlays.Chat Colour = Color4.Black.Opacity(0.25f), Radius = 5, }, - Children = new[] + Children = new Drawable[] { bg = new Box { RelativeSizeAxes = Axes.Both, }, + triangles = new Triangles + { + RelativeSizeAxes = Axes.Both, + TriangleScale = 5, + }, + }, + }, + new ScrollContainer + { + RelativeSizeAxes = Axes.Both, + ScrollDraggerVisible = false, + Padding = new MarginPadding { Top = 85 }, + Children = new[] + { + sectionsFlow = new FillFlowContainer + { + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Direction = FillDirection.Vertical, + Spacing = new Vector2(0f, 20f), + Padding = new MarginPadding { Top = 20, Left = WIDTH_PADDING, Right = WIDTH_PADDING }, + }, }, }, new Container @@ -74,23 +111,15 @@ namespace osu.Game.Overlays.Chat { RelativeSizeAxes = Axes.X, PlaceholderText = @"Search", + Exit = Hide, }, }, }, }, }, - new ChannelSection + new SettingsButton { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Padding = new MarginPadding { Left = WIDTH_PADDING, Right = WIDTH_PADDING }, - Header = @"GENERAL CHANNELS", - Channels = new[] - { - new Channel { Name = @"announcements", Topic = @"Automated announcement of stuff going on in osu!" }, - new Channel { Name = @"osu!", Topic = @"I dunno, the default channel I guess?" }, - new Channel { Name = @"lobby", Topic = @"Look for trouble here" }, - }, + Margin = new MarginPadding { Top = 160 }, }, }; } @@ -99,6 +128,9 @@ namespace osu.Game.Overlays.Chat private void load(OsuColour colours) { bg.Colour = colours.Gray3; + triangles.ColourDark = colours.Gray3; + triangles.ColourLight = OsuColour.FromHex(@"353535"); + headerBg.Colour = colours.Gray2.Opacity(0.75f); } @@ -118,5 +150,92 @@ namespace osu.Game.Overlays.Chat protected override Color4 BackgroundFocused => Color4.Black.Opacity(0.2f); protected override Color4 BackgroundUnfocused => Color4.Black.Opacity(0.2f); } + + private class SettingsButton : ClickableContainer + { + private const float width = 60f; + + private readonly Box bg; + private readonly Container bgContainer; + + private SampleChannel clickSample; + + public SettingsButton() + { + Size = new Vector2(width, 50f); + + Children = new Drawable[] + { + bgContainer = new Container + { + RelativeSizeAxes = Axes.Both, + Shear = new Vector2(0.2f, 0f), + Masking = true, + MaskingSmoothness = 2, + EdgeEffect = new EdgeEffect + { + Type = EdgeEffectType.Shadow, + Colour = Color4.Black.Opacity(0.2f), + Offset = new Vector2(2, 0), + Radius = 2, + }, + Children = new[] + { + bg = new Box + { + RelativeSizeAxes = Axes.Both, + EdgeSmoothness = new Vector2(2f, 0f), + }, + }, + }, + new TextAwesome + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Icon = FontAwesome.fa_osu_gear, + TextSize = 20, + Shadow = true, + UseFullGlyphHeight = false, + }, + }; + } + + [BackgroundDependencyLoader] + private void load(OsuColour colours, AudioManager audio) + { + bg.Colour = colours.Pink; + clickSample = audio.Sample.Get(@"Menu/menuclick"); + } + + protected override bool OnHover(InputState state) + { + ResizeWidthTo(width + 20f, 500, EasingTypes.OutElastic); + + return base.OnHover(state); + } + + protected override void OnHoverLost(InputState state) + { + ResizeWidthTo(width, 500, EasingTypes.OutElastic); + } + + protected override bool OnClick(InputState state) + { + var flash = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White.Opacity(0.5f), + }; + + bgContainer.Add(flash); + + flash.Alpha = 1; + flash.FadeOut(500, EasingTypes.OutQuint); + flash.Expire(); + + clickSample.Play(); + return base.OnClick(state); + } + } } } From 7eba619f80c2e6919c2a556020e5f2d2857d3455 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 20 May 2017 19:37:11 -0300 Subject: [PATCH 04/50] Move Joined to Channel --- osu.Game/Online/Chat/Channel.cs | 4 ++-- osu.Game/Overlays/Chat/ChannelListItem.cs | 27 ++++++++++++----------- osu.Game/Overlays/Chat/ChannelSection.cs | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/osu.Game/Online/Chat/Channel.cs b/osu.Game/Online/Chat/Channel.cs index 2925c3ccb4..bffd98ee2c 100644 --- a/osu.Game/Online/Chat/Channel.cs +++ b/osu.Game/Online/Chat/Channel.cs @@ -23,9 +23,9 @@ namespace osu.Game.Online.Chat [JsonProperty(@"channel_id")] public int Id; - public readonly SortedList Messages = new SortedList((m1, m2) => m1.Id.CompareTo(m2.Id)); + public bool Joined; - //internal bool Joined; + public readonly SortedList Messages = new SortedList((m1, m2) => m1.Id.CompareTo(m2.Id)); public bool ReadOnly => Name != "#lazer"; diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index 56a0e74c35..ba1c890747 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -21,25 +21,28 @@ namespace osu.Game.Overlays.Chat private const float transition_duration = 100; private readonly OsuSpriteText topic; + private readonly OsuSpriteText name; private readonly TextAwesome joinedCheckmark; private Color4? joinedColour; private Color4? topicColour; - private bool joined; - public bool Joined + private Channel channel; + public Channel Channel { - get { return joined; } + get { return channel; } set { - if (value == joined) return; - joined = value; + if (value == channel) return; + channel = value; + name.Text = Channel.ToString(); + topic.Text = Channel.Topic; updateColour(); } } - public ChannelListItem(Channel channel) + public ChannelListItem() { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; @@ -74,9 +77,8 @@ namespace osu.Game.Overlays.Chat AutoSizeAxes = Axes.Y, Children = new[] { - new OsuSpriteText + name = new OsuSpriteText { - Text = channel.ToString(), TextSize = text_size, Font = @"Exo2.0-Bold", }, @@ -91,7 +93,6 @@ namespace osu.Game.Overlays.Chat { topic = new OsuSpriteText { - Text = channel.Topic, TextSize = text_size, Font = @"Exo2.0-SemiBold", Alpha = 0.8f, @@ -136,10 +137,10 @@ namespace osu.Game.Overlays.Chat private void updateColour() { - joinedCheckmark.FadeTo(joined ? 1f : 0f, transition_duration); - topic.FadeTo(joined ? 0.8f : 1f, transition_duration); - topic.FadeColour(joined ? Color4.White : topicColour ?? Color4.White, transition_duration); - FadeColour(joined ? joinedColour ?? Color4.White : Color4.White, transition_duration); + joinedCheckmark.FadeTo(Channel.Joined ? 1f : 0f, transition_duration); + topic.FadeTo(Channel.Joined ? 0.8f : 1f, transition_duration); + topic.FadeColour(Channel.Joined ? Color4.White : topicColour ?? Color4.White, transition_duration); + FadeColour(Channel.Joined ? joinedColour ?? Color4.White : Color4.White, transition_duration); } } } diff --git a/osu.Game/Overlays/Chat/ChannelSection.cs b/osu.Game/Overlays/Chat/ChannelSection.cs index cbb197e84c..af61f67c99 100644 --- a/osu.Game/Overlays/Chat/ChannelSection.cs +++ b/osu.Game/Overlays/Chat/ChannelSection.cs @@ -28,7 +28,7 @@ namespace osu.Game.Overlays.Chat { set { - items.Children = value.Select(c => new ChannelListItem(c)); + items.Children = value.Select(c => new ChannelListItem { Channel = c }); } } From 47dfc0d7bc0f73ab716751e06f4890c8b43053ce Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 20 May 2017 20:05:28 -0300 Subject: [PATCH 05/50] Added transition --- osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index 23408259ff..4d0fcb52d9 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -7,7 +7,6 @@ using OpenTK.Graphics; using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Audio.Sample; -using osu.Framework.Audio.Track; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -41,18 +40,13 @@ namespace osu.Game.Overlays.Chat public ChannelSelectionOverlay() { RelativeSizeAxes = Axes.X; + Children = new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Masking = true, - EdgeEffect = new EdgeEffect - { - Type = EdgeEffectType.Shadow, - Colour = Color4.Black.Opacity(0.25f), - Radius = 5, - }, Children = new Drawable[] { bg = new Box @@ -138,11 +132,17 @@ namespace osu.Game.Overlays.Chat { search.HoldFocus = true; Schedule(() => search.TriggerFocus()); + + FadeIn(100, EasingTypes.OutQuint); + MoveToY(0, 800, EasingTypes.OutQuint); } protected override void PopOut() { search.HoldFocus = false; + + FadeOut(500, EasingTypes.InQuint); + MoveToY(DrawHeight, 500, EasingTypes.In); } private class HeaderSearchTextBox : SearchTextBox From 2e1d01a2681973567744727e7174b2cbb306f063 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 20 May 2017 20:22:55 -0300 Subject: [PATCH 06/50] Added searching --- osu.Game/Overlays/Chat/ChannelListItem.cs | 11 ++++++++- osu.Game/Overlays/Chat/ChannelSection.cs | 23 +++++++++++-------- .../Overlays/Chat/ChannelSelectionOverlay.cs | 8 +++++-- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index ba1c890747..5318d2e592 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -12,7 +12,7 @@ using osu.Game.Online.Chat; namespace osu.Game.Overlays.Chat { - public class ChannelListItem : ClickableContainer + public class ChannelListItem : ClickableContainer, IFilterable { private const float width_padding = 5; private const float channel_width = 150; @@ -27,6 +27,15 @@ namespace osu.Game.Overlays.Chat private Color4? joinedColour; private Color4? topicColour; + public string[] FilterTerms => new[] { Channel.Name }; + public bool MatchingCurrentFilter + { + set + { + FadeTo(value ? 1f : 0f, 100); + } + } + private Channel channel; public Channel Channel { diff --git a/osu.Game/Overlays/Chat/ChannelSection.cs b/osu.Game/Overlays/Chat/ChannelSection.cs index af61f67c99..4bbf25d96e 100644 --- a/osu.Game/Overlays/Chat/ChannelSection.cs +++ b/osu.Game/Overlays/Chat/ChannelSection.cs @@ -11,25 +11,30 @@ using osu.Game.Online.Chat; namespace osu.Game.Overlays.Chat { - public class ChannelSection : Container + public class ChannelSection : Container, IHasFilterableChildren { private readonly FillFlowContainer items; private readonly OsuSpriteText header; + public IEnumerable FilterableChildren => items.Children.OfType(); + public string[] FilterTerms => new[] { Header }; + public bool MatchingCurrentFilter + { + set + { + FadeTo(value ? 1f : 0f, 100); + } + } + public string Header { - set - { - header.Text = value; - } + get { return header.Text; } + set { header.Text = value; } } public IEnumerable Channels { - set - { - items.Children = value.Select(c => new ChannelListItem { Channel = c }); - } + set { items.Children = value.Select(c => new ChannelListItem { Channel = c }); } } public ChannelSection() diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index 4d0fcb52d9..4d8cc59ad0 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Chat private readonly Triangles triangles; private readonly Box headerBg; private readonly SearchTextBox search; - private readonly FillFlowContainer sectionsFlow; + private readonly SearchContainer sectionsFlow; public IEnumerable Sections { @@ -67,11 +67,13 @@ namespace osu.Game.Overlays.Chat Padding = new MarginPadding { Top = 85 }, Children = new[] { - sectionsFlow = new FillFlowContainer + sectionsFlow = new SearchContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, + LayoutDuration = 200, + LayoutEasing = EasingTypes.OutQuint, Spacing = new Vector2(0f, 20f), Padding = new MarginPadding { Top = 20, Left = WIDTH_PADDING, Right = WIDTH_PADDING }, }, @@ -116,6 +118,8 @@ namespace osu.Game.Overlays.Chat Margin = new MarginPadding { Top = 160 }, }, }; + + search.Current.ValueChanged += newValue => sectionsFlow.SearchTerm = newValue; } [BackgroundDependencyLoader] From 4a166c1949ae81d9edd26a2484ccfe281d3cb48e Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 20 May 2017 20:48:36 -0300 Subject: [PATCH 07/50] Make ChannelSelectionOverlay a FocusedOverlayContainer --- osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index 4d8cc59ad0..9746ae2ae8 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -19,7 +19,7 @@ using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Chat { - public class ChannelSelectionOverlay : OverlayContainer + public class ChannelSelectionOverlay : FocusedOverlayContainer { public static readonly float WIDTH_PADDING = 170; @@ -134,6 +134,8 @@ namespace osu.Game.Overlays.Chat protected override void PopIn() { + base.PopIn(); + search.HoldFocus = true; Schedule(() => search.TriggerFocus()); @@ -143,6 +145,8 @@ namespace osu.Game.Overlays.Chat protected override void PopOut() { + base.PopOut(); + search.HoldFocus = false; FadeOut(500, EasingTypes.InQuint); From a60d1efc21911e856cb3e6914d9dd2ceb616eca7 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 20 May 2017 21:26:39 -0300 Subject: [PATCH 08/50] Basic channel joining (ignore layout in ChatOverlay, temporary) --- osu.Game/Online/Chat/Channel.cs | 3 ++- osu.Game/Overlays/Chat/ChannelListItem.cs | 27 ++++++++++++++----- osu.Game/Overlays/Chat/ChannelSection.cs | 12 +++++---- .../Overlays/Chat/ChannelSelectionOverlay.cs | 12 +++++++++ osu.Game/Overlays/ChatOverlay.cs | 22 +++++++++++++++ 5 files changed, 63 insertions(+), 13 deletions(-) diff --git a/osu.Game/Online/Chat/Channel.cs b/osu.Game/Online/Chat/Channel.cs index bffd98ee2c..b548d72389 100644 --- a/osu.Game/Online/Chat/Channel.cs +++ b/osu.Game/Online/Chat/Channel.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; +using osu.Framework.Configuration; using osu.Framework.Lists; namespace osu.Game.Online.Chat @@ -23,7 +24,7 @@ namespace osu.Game.Online.Chat [JsonProperty(@"channel_id")] public int Id; - public bool Joined; + public Bindable Joined = new Bindable(); public readonly SortedList Messages = new SortedList((m1, m2) => m1.Id.CompareTo(m2.Id)); diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index 5318d2e592..94e3438d87 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.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 System; using OpenTK; using OpenTK.Graphics; using osu.Framework.Allocation; @@ -36,6 +37,8 @@ namespace osu.Game.Overlays.Chat } } + public Action OnRequestJoin; + private Channel channel; public Channel Channel { @@ -43,11 +46,13 @@ namespace osu.Game.Overlays.Chat set { if (value == channel) return; + if (channel != null) channel.Joined.ValueChanged -= updateColour; channel = value; name.Text = Channel.ToString(); topic.Text = Channel.Topic; - updateColour(); + channel.Joined.ValueChanged += updateColour; + updateColour(Channel.Joined); } } @@ -56,6 +61,8 @@ namespace osu.Game.Overlays.Chat RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; + Action = () => { if (!Channel.Joined) OnRequestJoin?.Invoke(Channel); }; + Children = new Drawable[] { new FillFlowContainer @@ -141,15 +148,21 @@ namespace osu.Game.Overlays.Chat topicColour = colours.Gray9; joinedColour = colours.Blue; - updateColour(); + updateColour(Channel.Joined); } - private void updateColour() + protected override void Dispose(bool isDisposing) { - joinedCheckmark.FadeTo(Channel.Joined ? 1f : 0f, transition_duration); - topic.FadeTo(Channel.Joined ? 0.8f : 1f, transition_duration); - topic.FadeColour(Channel.Joined ? Color4.White : topicColour ?? Color4.White, transition_duration); - FadeColour(Channel.Joined ? joinedColour ?? Color4.White : Color4.White, transition_duration); + if(channel != null) channel.Joined.ValueChanged -= updateColour; + base.Dispose(isDisposing); + } + + private void updateColour(bool joined) + { + joinedCheckmark.FadeTo(joined ? 1f : 0f, transition_duration); + topic.FadeTo(joined ? 0.8f : 1f, transition_duration); + topic.FadeColour(joined ? Color4.White : topicColour ?? Color4.White, transition_duration); + FadeColour(joined ? joinedColour ?? Color4.White : Color4.White, transition_duration); } } } diff --git a/osu.Game/Overlays/Chat/ChannelSection.cs b/osu.Game/Overlays/Chat/ChannelSection.cs index 4bbf25d96e..60fabdf187 100644 --- a/osu.Game/Overlays/Chat/ChannelSection.cs +++ b/osu.Game/Overlays/Chat/ChannelSection.cs @@ -13,14 +13,15 @@ namespace osu.Game.Overlays.Chat { public class ChannelSection : Container, IHasFilterableChildren { - private readonly FillFlowContainer items; private readonly OsuSpriteText header; - public IEnumerable FilterableChildren => items.Children.OfType(); + public readonly FillFlowContainer ChannelFlow; + + public IEnumerable FilterableChildren => ChannelFlow.Children.OfType(); public string[] FilterTerms => new[] { Header }; public bool MatchingCurrentFilter { - set + set { FadeTo(value ? 1f : 0f, 100); } @@ -34,9 +35,10 @@ namespace osu.Game.Overlays.Chat public IEnumerable Channels { - set { items.Children = value.Select(c => new ChannelListItem { Channel = c }); } + set { ChannelFlow.Children = value.Select(c => new ChannelListItem { Channel = c }); } } + public ChannelSection() { RelativeSizeAxes = Axes.X; @@ -49,7 +51,7 @@ namespace osu.Game.Overlays.Chat TextSize = 15, Font = @"Exo2.0-Bold", }, - items = new FillFlowContainer + ChannelFlow = new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index 9746ae2ae8..7187b9df40 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.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 System; using System.Collections.Generic; using OpenTK; using OpenTK.Graphics; @@ -16,6 +17,7 @@ using osu.Game.Graphics; using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; +using osu.Game.Online.Chat; namespace osu.Game.Overlays.Chat { @@ -29,11 +31,21 @@ namespace osu.Game.Overlays.Chat private readonly SearchTextBox search; private readonly SearchContainer sectionsFlow; + public Action OnRequestJoin; + public IEnumerable Sections { set { sectionsFlow.Children = value; + + foreach (ChannelSection s in sectionsFlow.Children) + { + foreach (ChannelListItem c in s.ChannelFlow.Children) + { + c.OnRequestJoin = channel => { OnRequestJoin?.Invoke(channel); }; + } + } } } diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 2836be22ae..67a807103d 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -53,6 +53,10 @@ namespace osu.Game.Overlays private Bindable chatHeight; + private readonly ChannelSelectionOverlay channelSelection; + + protected override bool InternalContains(Vector2 screenSpacePos) => base.InternalContains(screenSpacePos) || channelSelection.Contains(screenSpacePos); + public ChatOverlay() { RelativeSizeAxes = Axes.Both; @@ -65,6 +69,12 @@ namespace osu.Game.Overlays Children = new Drawable[] { + channelSelection = new ChannelSelectionOverlay + { + Origin = Anchor.BottomLeft, + Height = 400, + State = Visibility.Visible, + }, new Container { Name = @"chat area", @@ -233,6 +243,16 @@ namespace osu.Game.Overlays addChannel(channels.Find(c => c.Name == @"#lazer")); addChannel(channels.Find(c => c.Name == @"#osu")); addChannel(channels.Find(c => c.Name == @"#lobby")); + + channelSelection.OnRequestJoin = channel => addChannel(channel); + channelSelection.Sections = new[] + { + new ChannelSection + { + Header = @"ALL CHANNELS", + Channels = channels, + }, + }; }); messageRequest = Scheduler.AddDelayed(fetchNewMessages, 1000, true); @@ -294,6 +314,8 @@ namespace osu.Game.Overlays if (CurrentChannel == null) CurrentChannel = channel; + + channel.Joined.Value = true; } private void fetchInitialMessages(Channel channel) From 51bc3dfe72e25e1dc7897c78885a01bc2f1cbc48 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 20 May 2017 21:38:36 -0300 Subject: [PATCH 09/50] Padding below channel list, remove text shadows, fix search box focusing --- osu.Game/Overlays/Chat/ChannelListItem.cs | 7 ++++++- osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs | 11 ++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index 94e3438d87..ba6818026e 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . +// Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; @@ -82,6 +82,7 @@ namespace osu.Game.Overlays.Chat Origin = Anchor.TopRight, Icon = FontAwesome.fa_check_circle, TextSize = text_size, + Shadow = false, Margin = new MarginPadding { Right = 10f }, Alpha = 0f, }, @@ -97,6 +98,7 @@ namespace osu.Game.Overlays.Chat { TextSize = text_size, Font = @"Exo2.0-Bold", + Shadow = false, }, }, }, @@ -111,6 +113,7 @@ namespace osu.Game.Overlays.Chat { TextSize = text_size, Font = @"Exo2.0-SemiBold", + Shadow = false, Alpha = 0.8f, }, }, @@ -127,6 +130,7 @@ namespace osu.Game.Overlays.Chat { Icon = FontAwesome.fa_user, TextSize = text_size - 2, + Shadow = false, Margin = new MarginPadding { Top = 1 }, }, new OsuSpriteText @@ -134,6 +138,7 @@ namespace osu.Game.Overlays.Chat Text = @"0", TextSize = text_size, Font = @"Exo2.0-SemiBold", + Shadow = false, }, }, }, diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index 7187b9df40..249bd13094 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . +// Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; @@ -21,7 +21,7 @@ using osu.Game.Online.Chat; namespace osu.Game.Overlays.Chat { - public class ChannelSelectionOverlay : FocusedOverlayContainer + public class ChannelSelectionOverlay : OverlayContainer { public static readonly float WIDTH_PADDING = 170; @@ -87,7 +87,7 @@ namespace osu.Game.Overlays.Chat LayoutDuration = 200, LayoutEasing = EasingTypes.OutQuint, Spacing = new Vector2(0f, 20f), - Padding = new MarginPadding { Top = 20, Left = WIDTH_PADDING, Right = WIDTH_PADDING }, + Padding = new MarginPadding { Top = 20, Bottom = 20, Left = WIDTH_PADDING, Right = WIDTH_PADDING }, }, }, }, @@ -114,6 +114,7 @@ namespace osu.Game.Overlays.Chat { Text = @"Chat Channels", TextSize = 20, + Shadow = false, }, search = new HeaderSearchTextBox { @@ -146,8 +147,6 @@ namespace osu.Game.Overlays.Chat protected override void PopIn() { - base.PopIn(); - search.HoldFocus = true; Schedule(() => search.TriggerFocus()); @@ -157,8 +156,6 @@ namespace osu.Game.Overlays.Chat protected override void PopOut() { - base.PopOut(); - search.HoldFocus = false; FadeOut(500, EasingTypes.InQuint); From 62897d302e27af3a28c8b9e325deb4e91f75b08a Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Mon, 22 May 2017 22:37:25 -0300 Subject: [PATCH 10/50] Remove SettingsButton(old and outdated design), fix channel list scrolling under the header --- .../Overlays/Chat/ChannelSelectionOverlay.cs | 121 +++--------------- 1 file changed, 17 insertions(+), 104 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index 249bd13094..9b010e1794 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -6,13 +6,10 @@ using System.Collections.Generic; using OpenTK; using OpenTK.Graphics; using osu.Framework.Allocation; -using osu.Framework.Audio; -using osu.Framework.Audio.Sample; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; -using osu.Framework.Input; using osu.Game.Graphics; using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Sprites; @@ -72,22 +69,29 @@ namespace osu.Game.Overlays.Chat }, }, }, - new ScrollContainer + new Container { RelativeSizeAxes = Axes.Both, - ScrollDraggerVisible = false, Padding = new MarginPadding { Top = 85 }, Children = new[] { - sectionsFlow = new SearchContainer + new ScrollContainer { - RelativeSizeAxes = Axes.X, - AutoSizeAxes = Axes.Y, - Direction = FillDirection.Vertical, - LayoutDuration = 200, - LayoutEasing = EasingTypes.OutQuint, - Spacing = new Vector2(0f, 20f), - Padding = new MarginPadding { Top = 20, Bottom = 20, Left = WIDTH_PADDING, Right = WIDTH_PADDING }, + RelativeSizeAxes = Axes.Both, + ScrollDraggerVisible = false, + Children = new[] + { + sectionsFlow = new SearchContainer + { + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Direction = FillDirection.Vertical, + LayoutDuration = 200, + LayoutEasing = EasingTypes.OutQuint, + Spacing = new Vector2(0f, 20f), + Padding = new MarginPadding { Top = 20, Bottom = 20, Left = WIDTH_PADDING, Right = WIDTH_PADDING }, + }, + }, }, }, }, @@ -126,10 +130,6 @@ namespace osu.Game.Overlays.Chat }, }, }, - new SettingsButton - { - Margin = new MarginPadding { Top = 160 }, - }, }; search.Current.ValueChanged += newValue => sectionsFlow.SearchTerm = newValue; @@ -167,92 +167,5 @@ namespace osu.Game.Overlays.Chat protected override Color4 BackgroundFocused => Color4.Black.Opacity(0.2f); protected override Color4 BackgroundUnfocused => Color4.Black.Opacity(0.2f); } - - private class SettingsButton : ClickableContainer - { - private const float width = 60f; - - private readonly Box bg; - private readonly Container bgContainer; - - private SampleChannel clickSample; - - public SettingsButton() - { - Size = new Vector2(width, 50f); - - Children = new Drawable[] - { - bgContainer = new Container - { - RelativeSizeAxes = Axes.Both, - Shear = new Vector2(0.2f, 0f), - Masking = true, - MaskingSmoothness = 2, - EdgeEffect = new EdgeEffect - { - Type = EdgeEffectType.Shadow, - Colour = Color4.Black.Opacity(0.2f), - Offset = new Vector2(2, 0), - Radius = 2, - }, - Children = new[] - { - bg = new Box - { - RelativeSizeAxes = Axes.Both, - EdgeSmoothness = new Vector2(2f, 0f), - }, - }, - }, - new TextAwesome - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Icon = FontAwesome.fa_osu_gear, - TextSize = 20, - Shadow = true, - UseFullGlyphHeight = false, - }, - }; - } - - [BackgroundDependencyLoader] - private void load(OsuColour colours, AudioManager audio) - { - bg.Colour = colours.Pink; - clickSample = audio.Sample.Get(@"Menu/menuclick"); - } - - protected override bool OnHover(InputState state) - { - ResizeWidthTo(width + 20f, 500, EasingTypes.OutElastic); - - return base.OnHover(state); - } - - protected override void OnHoverLost(InputState state) - { - ResizeWidthTo(width, 500, EasingTypes.OutElastic); - } - - protected override bool OnClick(InputState state) - { - var flash = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White.Opacity(0.5f), - }; - - bgContainer.Add(flash); - - flash.Alpha = 1; - flash.FadeOut(500, EasingTypes.OutQuint); - flash.Expire(); - - clickSample.Play(); - return base.OnClick(state); - } - } } } From fb0b54e66a9f0d22f4cc9c3beb17b7c116085d99 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Fri, 26 May 2017 03:28:09 -0300 Subject: [PATCH 11/50] Remove merge error --- osu.Game/Online/Chat/Channel.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/osu.Game/Online/Chat/Channel.cs b/osu.Game/Online/Chat/Channel.cs index d48de42fa1..ba410948cc 100644 --- a/osu.Game/Online/Chat/Channel.cs +++ b/osu.Game/Online/Chat/Channel.cs @@ -28,8 +28,6 @@ namespace osu.Game.Online.Chat public readonly SortedList Messages = new SortedList(Comparer.Default); - public readonly SortedList Messages = new SortedList((m1, m2) => m1.Id.CompareTo(m2.Id)); - public bool ReadOnly => Name != "#lazer"; public const int MAX_HISTORY = 300; From d29ebb139ffcb745c02d8f84ff0750be87d66f4c Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Fri, 26 May 2017 03:38:52 -0300 Subject: [PATCH 12/50] Cleanup --- osu.Game/Online/Chat/Channel.cs | 4 ++-- osu.Game/Overlays/Chat/ChannelListItem.cs | 6 +++--- osu.Game/Overlays/ChatOverlay.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/osu.Game/Online/Chat/Channel.cs b/osu.Game/Online/Chat/Channel.cs index ba410948cc..01685cc7dc 100644 --- a/osu.Game/Online/Chat/Channel.cs +++ b/osu.Game/Online/Chat/Channel.cs @@ -24,10 +24,10 @@ namespace osu.Game.Online.Chat [JsonProperty(@"channel_id")] public int Id; - public Bindable Joined = new Bindable(); - public readonly SortedList Messages = new SortedList(Comparer.Default); + public Bindable Joined = new Bindable(); + public bool ReadOnly => Name != "#lazer"; public const int MAX_HISTORY = 300; diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index ba6818026e..cc9aacc643 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -29,10 +29,10 @@ namespace osu.Game.Overlays.Chat private Color4? topicColour; public string[] FilterTerms => new[] { Channel.Name }; - public bool MatchingCurrentFilter - { + public bool MatchingCurrentFilter + { set - { + { FadeTo(value ? 1f : 0f, 100); } } diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 7af37fb955..193b18dd12 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -69,7 +69,7 @@ namespace osu.Game.Overlays Children = new Drawable[] { - channelSelection = new ChannelSelectionOverlay + channelSelection = new ChannelSelectionOverlay //todo: temporary placement { Origin = Anchor.BottomLeft, Height = 400, From 21e900df73bd3f0de111b18962d7b826f8235431 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Fri, 26 May 2017 03:46:50 -0300 Subject: [PATCH 13/50] Transition code cleanup --- osu.Game/Overlays/Chat/ChannelListItem.cs | 18 ++++++++++++++---- osu.Game/Overlays/Chat/ChannelSection.cs | 11 +++++------ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index cc9aacc643..fe058e131a 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -164,10 +164,20 @@ namespace osu.Game.Overlays.Chat private void updateColour(bool joined) { - joinedCheckmark.FadeTo(joined ? 1f : 0f, transition_duration); - topic.FadeTo(joined ? 0.8f : 1f, transition_duration); - topic.FadeColour(joined ? Color4.White : topicColour ?? Color4.White, transition_duration); - FadeColour(joined ? joinedColour ?? Color4.White : Color4.White, transition_duration); + if (joined) + { + joinedCheckmark.FadeTo(1f, transition_duration); + topic.FadeTo(0.8f, transition_duration); + topic.FadeColour(Color4.White, transition_duration); + FadeColour(joinedColour ?? Color4.White, transition_duration); + } + else + { + joinedCheckmark.FadeTo(0f, transition_duration); + topic.FadeTo(1f, transition_duration); + topic.FadeColour(topicColour ?? Color4.White, transition_duration); + FadeColour(Color4.White, transition_duration); + } } } } diff --git a/osu.Game/Overlays/Chat/ChannelSection.cs b/osu.Game/Overlays/Chat/ChannelSection.cs index 60fabdf187..4fe705e0e0 100644 --- a/osu.Game/Overlays/Chat/ChannelSection.cs +++ b/osu.Game/Overlays/Chat/ChannelSection.cs @@ -17,12 +17,12 @@ namespace osu.Game.Overlays.Chat public readonly FillFlowContainer ChannelFlow; - public IEnumerable FilterableChildren => ChannelFlow.Children.OfType(); - public string[] FilterTerms => new[] { Header }; - public bool MatchingCurrentFilter - { + public IEnumerable FilterableChildren => ChannelFlow.Children.OfType(); + public string[] FilterTerms => new[] { Header }; + public bool MatchingCurrentFilter + { set - { + { FadeTo(value ? 1f : 0f, 100); } } @@ -38,7 +38,6 @@ namespace osu.Game.Overlays.Chat set { ChannelFlow.Children = value.Select(c => new ChannelListItem { Channel = c }); } } - public ChannelSection() { RelativeSizeAxes = Axes.X; From d632435a344d2a5cb05b89329f27d521ef51d51d Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Fri, 26 May 2017 03:51:09 -0300 Subject: [PATCH 14/50] Make ChannelListItems scale better --- osu.Game/Overlays/Chat/ChannelListItem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index fe058e131a..5d40766bee 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -17,7 +17,6 @@ namespace osu.Game.Overlays.Chat { private const float width_padding = 5; private const float channel_width = 150; - private const float topic_width = 380; private const float text_size = 15; private const float transition_duration = 100; @@ -104,7 +103,8 @@ namespace osu.Game.Overlays.Chat }, new Container { - Width = topic_width, + RelativeSizeAxes = Axes.X, + Width = 0.7f, AutoSizeAxes = Axes.Y, Margin = new MarginPadding { Left = width_padding }, Children = new[] From 4c551270e986afda61427a8faf6b72ee6c6c9bb4 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Fri, 26 May 2017 03:56:10 -0300 Subject: [PATCH 15/50] Add OnRequestLeave --- osu.Game/Overlays/Chat/ChannelListItem.cs | 3 ++- osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index 5d40766bee..1232c0a132 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -37,6 +37,7 @@ namespace osu.Game.Overlays.Chat } public Action OnRequestJoin; + public Action OnRequestLeave; private Channel channel; public Channel Channel @@ -60,7 +61,7 @@ namespace osu.Game.Overlays.Chat RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - Action = () => { if (!Channel.Joined) OnRequestJoin?.Invoke(Channel); }; + Action = () => { (Channel.Joined ? OnRequestLeave : OnRequestJoin)?.Invoke(Channel); }; Children = new Drawable[] { diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index 9b010e1794..ed01789712 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -29,6 +29,7 @@ namespace osu.Game.Overlays.Chat private readonly SearchContainer sectionsFlow; public Action OnRequestJoin; + public Action OnRequestLeave; public IEnumerable Sections { @@ -41,6 +42,7 @@ namespace osu.Game.Overlays.Chat foreach (ChannelListItem c in s.ChannelFlow.Children) { c.OnRequestJoin = channel => { OnRequestJoin?.Invoke(channel); }; + c.OnRequestLeave = channel => { OnRequestLeave?.Invoke(channel); }; } } } From ae96ef08f707fae6703fbc8feee0ce4222f17fe0 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Fri, 26 May 2017 04:02:04 -0300 Subject: [PATCH 16/50] Tab character --- osu.Game/Overlays/Chat/ChannelListItem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index 1232c0a132..23dba69c90 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Chat public string[] FilterTerms => new[] { Channel.Name }; public bool MatchingCurrentFilter { - set + set { FadeTo(value ? 1f : 0f, 100); } From 38d0138978001a452727ee0d0ede8cdc5982e712 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Fri, 26 May 2017 04:11:45 -0300 Subject: [PATCH 17/50] CI fixes --- osu.Game/Overlays/Chat/ChannelSection.cs | 2 +- osu.Game/Overlays/ChatOverlay.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelSection.cs b/osu.Game/Overlays/Chat/ChannelSection.cs index 4fe705e0e0..e5fce2667e 100644 --- a/osu.Game/Overlays/Chat/ChannelSection.cs +++ b/osu.Game/Overlays/Chat/ChannelSection.cs @@ -17,7 +17,7 @@ namespace osu.Game.Overlays.Chat public readonly FillFlowContainer ChannelFlow; - public IEnumerable FilterableChildren => ChannelFlow.Children.OfType(); + public IEnumerable FilterableChildren => ChannelFlow.Children; public string[] FilterTerms => new[] { Header }; public bool MatchingCurrentFilter { diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 193b18dd12..04bab211ab 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -245,7 +245,7 @@ namespace osu.Game.Overlays addChannel(channels.Find(c => c.Name == @"#osu")); addChannel(channels.Find(c => c.Name == @"#lobby")); - channelSelection.OnRequestJoin = channel => addChannel(channel); + channelSelection.OnRequestJoin = addChannel; channelSelection.Sections = new[] { new ChannelSection From b632e7f1ad8950344aa7e3a35e7c7cd81e919de5 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 27 May 2017 17:35:42 -0300 Subject: [PATCH 18/50] Accept Channel in ctor and remove Channel property --- osu.Game/Overlays/Chat/ChannelListItem.cs | 32 ++++++++--------------- osu.Game/Overlays/Chat/ChannelSection.cs | 2 +- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index 23dba69c90..8b0c3778c3 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -21,13 +21,12 @@ namespace osu.Game.Overlays.Chat private const float transition_duration = 100; private readonly OsuSpriteText topic; - private readonly OsuSpriteText name; private readonly TextAwesome joinedCheckmark; private Color4? joinedColour; private Color4? topicColour; - public string[] FilterTerms => new[] { Channel.Name }; + public string[] FilterTerms => new[] { channel.Name }; public bool MatchingCurrentFilter { set @@ -40,28 +39,15 @@ namespace osu.Game.Overlays.Chat public Action OnRequestLeave; private Channel channel; - public Channel Channel - { - get { return channel; } - set - { - if (value == channel) return; - if (channel != null) channel.Joined.ValueChanged -= updateColour; - channel = value; - name.Text = Channel.ToString(); - topic.Text = Channel.Topic; - channel.Joined.ValueChanged += updateColour; - updateColour(Channel.Joined); - } - } - - public ChannelListItem() + public ChannelListItem(Channel channel) { + this.channel = channel; + RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - Action = () => { (Channel.Joined ? OnRequestLeave : OnRequestJoin)?.Invoke(Channel); }; + Action = () => { (channel.Joined ? OnRequestLeave : OnRequestJoin)?.Invoke(channel); }; Children = new Drawable[] { @@ -94,8 +80,9 @@ namespace osu.Game.Overlays.Chat AutoSizeAxes = Axes.Y, Children = new[] { - name = new OsuSpriteText + new OsuSpriteText { + Text = channel.ToString(), TextSize = text_size, Font = @"Exo2.0-Bold", Shadow = false, @@ -112,6 +99,7 @@ namespace osu.Game.Overlays.Chat { topic = new OsuSpriteText { + Text = channel.Topic, TextSize = text_size, Font = @"Exo2.0-SemiBold", Shadow = false, @@ -146,6 +134,8 @@ namespace osu.Game.Overlays.Chat }, }, }; + + channel.Joined.ValueChanged += updateColour; } [BackgroundDependencyLoader] @@ -154,7 +144,7 @@ namespace osu.Game.Overlays.Chat topicColour = colours.Gray9; joinedColour = colours.Blue; - updateColour(Channel.Joined); + updateColour(channel.Joined); } protected override void Dispose(bool isDisposing) diff --git a/osu.Game/Overlays/Chat/ChannelSection.cs b/osu.Game/Overlays/Chat/ChannelSection.cs index e5fce2667e..c0391c7113 100644 --- a/osu.Game/Overlays/Chat/ChannelSection.cs +++ b/osu.Game/Overlays/Chat/ChannelSection.cs @@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Chat public IEnumerable Channels { - set { ChannelFlow.Children = value.Select(c => new ChannelListItem { Channel = c }); } + set { ChannelFlow.Children = value.Select(c => new ChannelListItem(c)); } } public ChannelSection() From 754fe956f9b264db7e4179293af518f68ba9ec35 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 27 May 2017 17:40:20 -0300 Subject: [PATCH 19/50] Make ChannelSection headers uppercase in the setter --- osu.Game/Overlays/Chat/ChannelSection.cs | 2 +- osu.Game/Overlays/ChatOverlay.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelSection.cs b/osu.Game/Overlays/Chat/ChannelSection.cs index c0391c7113..0fe6019ed6 100644 --- a/osu.Game/Overlays/Chat/ChannelSection.cs +++ b/osu.Game/Overlays/Chat/ChannelSection.cs @@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Chat public string Header { get { return header.Text; } - set { header.Text = value; } + set { header.Text = value.ToUpper(); } } public IEnumerable Channels diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 04bab211ab..a1e43068ea 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -250,7 +250,7 @@ namespace osu.Game.Overlays { new ChannelSection { - Header = @"ALL CHANNELS", + Header = "All Channels", Channels = channels, }, }; From b88c07f1a02208566729ea39372af84debd0f300 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Sat, 27 May 2017 17:49:57 -0300 Subject: [PATCH 20/50] Make channel readonly --- osu.Game/Overlays/Chat/ChannelListItem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index 8b0c3778c3..156939fff1 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -20,6 +20,8 @@ namespace osu.Game.Overlays.Chat private const float text_size = 15; private const float transition_duration = 100; + private readonly Channel channel; + private readonly OsuSpriteText topic; private readonly TextAwesome joinedCheckmark; @@ -38,8 +40,6 @@ namespace osu.Game.Overlays.Chat public Action OnRequestJoin; public Action OnRequestLeave; - private Channel channel; - public ChannelListItem(Channel channel) { this.channel = channel; From 50e50ce67ee4a408ef3dadb2519ee4f0f3c21fb5 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Mon, 29 May 2017 20:33:28 -0300 Subject: [PATCH 21/50] Update with framework changes --- osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index ed01789712..c6524d5418 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -150,7 +150,7 @@ namespace osu.Game.Overlays.Chat protected override void PopIn() { search.HoldFocus = true; - Schedule(() => search.TriggerFocus()); + Schedule(() => search.TriggerOnFocus()); FadeIn(100, EasingTypes.OutQuint); MoveToY(0, 800, EasingTypes.OutQuint); From 745e2e5e188c9b880fc1e4ef73262ba8efefe42a Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Mon, 29 May 2017 21:23:03 -0300 Subject: [PATCH 22/50] Make the channel selection overlay hide/resize with chat --- osu.Game/Overlays/ChatOverlay.cs | 127 ++++++++++++++++++------------- 1 file changed, 74 insertions(+), 53 deletions(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 6d8ae36369..304350b57f 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -29,6 +29,7 @@ namespace osu.Game.Overlays public class ChatOverlay : FocusedOverlayContainer, IOnlineComponent { private const float textbox_height = 60; + private const float channel_selection_min_height = 0.3f; private ScheduledDelegate messageRequest; @@ -48,6 +49,7 @@ namespace osu.Game.Overlays private readonly ChatTabControl channelTabs; + private readonly Container chatContainer; private readonly Box chatBackground; private readonly Box tabBackground; @@ -55,13 +57,12 @@ namespace osu.Game.Overlays private readonly ChannelSelectionOverlay channelSelection; - protected override bool InternalContains(Vector2 screenSpacePos) => base.InternalContains(screenSpacePos) || channelSelection.Contains(screenSpacePos); + protected override bool InternalContains(Vector2 screenSpacePos) => chatContainer.Contains(screenSpacePos) || channelSelection.Contains(screenSpacePos); public ChatOverlay() { RelativeSizeAxes = Axes.Both; RelativePositionAxes = Axes.Both; - Size = new Vector2(1, DEFAULT_HEIGHT); Anchor = Anchor.BottomLeft; Origin = Anchor.BottomLeft; @@ -71,78 +72,96 @@ namespace osu.Game.Overlays { channelSelection = new ChannelSelectionOverlay //todo: temporary placement { - Origin = Anchor.BottomLeft, - Height = 400, + Anchor = Anchor.TopLeft, + Origin = Anchor.TopLeft, + RelativeSizeAxes = Axes.Both, + Height = 1f - DEFAULT_HEIGHT, State = Visibility.Visible, }, - new Container + chatContainer = new Container { - Name = @"chat area", + Name = @"chat container", + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft, RelativeSizeAxes = Axes.Both, - Padding = new MarginPadding { Top = TAB_AREA_HEIGHT }, - Children = new Drawable[] + Height = DEFAULT_HEIGHT, + Children = new[] { - chatBackground = new Box + new Container { + Name = @"chat area", RelativeSizeAxes = Axes.Both, - }, - currentChannelContainer = new Container - { - RelativeSizeAxes = Axes.Both, - Padding = new MarginPadding + Padding = new MarginPadding { Top = TAB_AREA_HEIGHT }, + Children = new Drawable[] { - Bottom = textbox_height + padding - }, + chatBackground = new Box + { + RelativeSizeAxes = Axes.Both, + }, + currentChannelContainer = new Container + { + RelativeSizeAxes = Axes.Both, + Padding = new MarginPadding + { + Bottom = textbox_height + padding + }, + }, + new Container + { + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft, + RelativeSizeAxes = Axes.X, + Height = textbox_height, + Padding = new MarginPadding + { + Top = padding * 2, + Bottom = padding * 2, + Left = ChatLine.LEFT_PADDING + padding * 2, + Right = padding * 2, + }, + Children = new Drawable[] + { + inputTextBox = new FocusedTextBox + { + RelativeSizeAxes = Axes.Both, + Height = 1, + PlaceholderText = "type your message", + Exit = () => State = Visibility.Hidden, + OnCommit = postMessage, + HoldFocus = true, + } + } + } + } }, new Container { - Anchor = Anchor.BottomLeft, - Origin = Anchor.BottomLeft, + Name = @"tabs area", RelativeSizeAxes = Axes.X, - Height = textbox_height, - Padding = new MarginPadding - { - Top = padding * 2, - Bottom = padding * 2, - Left = ChatLine.LEFT_PADDING + padding * 2, - Right = padding * 2, - }, + Height = TAB_AREA_HEIGHT, Children = new Drawable[] { - inputTextBox = new FocusedTextBox + tabBackground = new Box { RelativeSizeAxes = Axes.Both, - Height = 1, - PlaceholderText = "type your message", - Exit = () => State = Visibility.Hidden, - OnCommit = postMessage, - HoldFocus = true, - } + Colour = Color4.Black, + }, + channelTabs = new ChatTabControl + { + RelativeSizeAxes = Axes.Both, + }, } - } - } - }, - new Container - { - Name = @"tabs area", - RelativeSizeAxes = Axes.X, - Height = TAB_AREA_HEIGHT, - Children = new Drawable[] - { - tabBackground = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.Black, }, - channelTabs = new ChatTabControl - { - RelativeSizeAxes = Axes.Both, - }, - } + }, }, }; channelTabs.Current.ValueChanged += newChannel => CurrentChannel = newChannel; + channelSelection.StateChanged += (overlay, state) => + { + if (state == Visibility.Visible && 1f - chatHeight.Value < channel_selection_min_height) + chatHeight.Value = 1f - channel_selection_min_height; + }; } private double startDragChatHeight; @@ -211,7 +230,9 @@ namespace osu.Game.Overlays chatHeight = config.GetBindable(OsuSetting.ChatDisplayHeight); chatHeight.ValueChanged += h => { - Height = (float)h; + chatContainer.Height = (float)h; + channelSelection.Height = 1f - (float)h; + if (channelSelection.Height < channel_selection_min_height) channelSelection.Hide(); tabBackground.FadeTo(Height == 1 ? 1 : 0.8f, 200); }; chatHeight.TriggerChange(); From d29bf58817be2c5ee2fbc31f24131469f509d5b4 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Mon, 29 May 2017 21:50:15 -0300 Subject: [PATCH 23/50] Show scroll dragger --- osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index c6524d5418..c755e6fe3e 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -80,7 +80,6 @@ namespace osu.Game.Overlays.Chat new ScrollContainer { RelativeSizeAxes = Axes.Both, - ScrollDraggerVisible = false, Children = new[] { sectionsFlow = new SearchContainer From d8e86da78c1007ec58c83bbfee7d4e56d10b0372 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Mon, 29 May 2017 22:00:15 -0300 Subject: [PATCH 24/50] Better scroll dragger position --- osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index c755e6fe3e..ab23f010cb 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -74,7 +74,7 @@ namespace osu.Game.Overlays.Chat new Container { RelativeSizeAxes = Axes.Both, - Padding = new MarginPadding { Top = 85 }, + Padding = new MarginPadding { Top = 85, Right = WIDTH_PADDING }, Children = new[] { new ScrollContainer @@ -90,7 +90,7 @@ namespace osu.Game.Overlays.Chat LayoutDuration = 200, LayoutEasing = EasingTypes.OutQuint, Spacing = new Vector2(0f, 20f), - Padding = new MarginPadding { Top = 20, Bottom = 20, Left = WIDTH_PADDING, Right = WIDTH_PADDING }, + Padding = new MarginPadding { Vertical = 20, Left = WIDTH_PADDING }, }, }, }, From 2ba86cffa6f5f0480d5ba025cf42f253838e4afc Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Mon, 29 May 2017 22:04:53 -0300 Subject: [PATCH 25/50] Channel list item hover effect --- osu.Game/Overlays/Chat/ChannelListItem.cs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index 156939fff1..ede80074d5 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -7,6 +7,7 @@ using OpenTK.Graphics; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Input; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Online.Chat; @@ -22,11 +23,13 @@ namespace osu.Game.Overlays.Chat private readonly Channel channel; + private readonly OsuSpriteText name; private readonly OsuSpriteText topic; private readonly TextAwesome joinedCheckmark; private Color4? joinedColour; private Color4? topicColour; + private Color4 hoverColour; public string[] FilterTerms => new[] { channel.Name }; public bool MatchingCurrentFilter @@ -80,7 +83,7 @@ namespace osu.Game.Overlays.Chat AutoSizeAxes = Axes.Y, Children = new[] { - new OsuSpriteText + name = new OsuSpriteText { Text = channel.ToString(), TextSize = text_size, @@ -143,10 +146,25 @@ namespace osu.Game.Overlays.Chat { topicColour = colours.Gray9; joinedColour = colours.Blue; + hoverColour = colours.Yellow; updateColour(channel.Joined); } + protected override bool OnHover(InputState state) + { + if (!channel.Joined.Value) + name.FadeColour(hoverColour, transition_duration); + + return base.OnHover(state); + } + + protected override void OnHoverLost(InputState state) + { + if (!channel.Joined.Value) + name.FadeColour(Color4.White, transition_duration); + } + protected override void Dispose(bool isDisposing) { if(channel != null) channel.Joined.ValueChanged -= updateColour; @@ -157,6 +175,7 @@ namespace osu.Game.Overlays.Chat { if (joined) { + name.FadeColour(Color4.White, transition_duration); joinedCheckmark.FadeTo(1f, transition_duration); topic.FadeTo(0.8f, transition_duration); topic.FadeColour(Color4.White, transition_duration); From 96efa5a2403606ba2f268193d2aa1d41628e0a8a Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Mon, 29 May 2017 22:10:07 -0300 Subject: [PATCH 26/50] Hook up to channel selector tab item --- osu.Game/Overlays/ChatOverlay.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 831cccf2d8..447946b863 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -76,7 +76,6 @@ namespace osu.Game.Overlays Origin = Anchor.TopLeft, RelativeSizeAxes = Axes.Both, Height = 1f - DEFAULT_HEIGHT, - State = Visibility.Visible, }, chatContainer = new Container { @@ -157,6 +156,7 @@ namespace osu.Game.Overlays }; channelTabs.Current.ValueChanged += newChannel => CurrentChannel = newChannel; + channelTabs.ChannelSelectorActive.ValueChanged += (value) => channelSelection.State = value ? Visibility.Visible : Visibility.Hidden; channelSelection.StateChanged += (overlay, state) => { if (state == Visibility.Visible && 1f - chatHeight.Value < channel_selection_min_height) From 2edbf64d697de95734b147c88b4d05ca8857e7db Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Mon, 29 May 2017 22:22:14 -0300 Subject: [PATCH 27/50] Redundant parentheses --- osu.Game/Overlays/ChatOverlay.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 447946b863..8b4b3d2704 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -156,7 +156,7 @@ namespace osu.Game.Overlays }; channelTabs.Current.ValueChanged += newChannel => CurrentChannel = newChannel; - channelTabs.ChannelSelectorActive.ValueChanged += (value) => channelSelection.State = value ? Visibility.Visible : Visibility.Hidden; + channelTabs.ChannelSelectorActive.ValueChanged += value => channelSelection.State = value ? Visibility.Visible : Visibility.Hidden; channelSelection.StateChanged += (overlay, state) => { if (state == Visibility.Visible && 1f - chatHeight.Value < channel_selection_min_height) From d9704301742b3fbd92461d0ce47308174b429734 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Wed, 31 May 2017 22:08:25 -0300 Subject: [PATCH 28/50] Fix the channel selector not appearing if the chat is scaled up too tall then back down --- osu.Game/Overlays/ChatOverlay.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 8b4b3d2704..b94489c421 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -232,7 +232,11 @@ namespace osu.Game.Overlays { chatContainer.Height = (float)h; channelSelection.Height = 1f - (float)h; - if (channelSelection.Height < channel_selection_min_height) channelSelection.Hide(); + if (channelSelection.Height < channel_selection_min_height) + channelSelection.Hide(); + else if (channelSelection.State == Visibility.Hidden && channelTabs.ChannelSelectorActive.Value) + channelSelection.Show(); + tabBackground.FadeTo(Height == 1 ? 1 : 0.8f, 200); }; chatHeight.TriggerChange(); From 6176f1d275acd855afd1b181a6ab3e18f756063c Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Wed, 31 May 2017 22:29:52 -0300 Subject: [PATCH 29/50] Make the transition when chat is too tall and opening the channel selector smoother --- osu.Game/Overlays/ChatOverlay.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index b94489c421..23827a7f1d 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -70,7 +70,7 @@ namespace osu.Game.Overlays Children = new Drawable[] { - channelSelection = new ChannelSelectionOverlay //todo: temporary placement + channelSelection = new ChannelSelectionOverlay { Anchor = Anchor.TopLeft, Origin = Anchor.TopLeft, @@ -160,7 +160,12 @@ namespace osu.Game.Overlays channelSelection.StateChanged += (overlay, state) => { if (state == Visibility.Visible && 1f - chatHeight.Value < channel_selection_min_height) + { + chatContainer.ResizeHeightTo(1f - channel_selection_min_height, 800, EasingTypes.OutQuint); + channelSelection.ResizeHeightTo(channel_selection_min_height, 800, EasingTypes.OutQuint); + channelSelection.Show(); chatHeight.Value = 1f - channel_selection_min_height; + } }; } From 52d524a65e1d24eafc7397fe3cb673912fe7dd69 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Wed, 31 May 2017 22:39:03 -0300 Subject: [PATCH 30/50] Update with framework changes --- osu.Game/Overlays/Chat/ChannelListItem.cs | 2 +- osu.Game/Overlays/Chat/ChannelSection.cs | 2 +- .../Overlays/Chat/ChannelSelectionOverlay.cs | 20 +++++++++++++------ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index ede80074d5..825f0ae980 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -32,7 +32,7 @@ namespace osu.Game.Overlays.Chat private Color4 hoverColour; public string[] FilterTerms => new[] { channel.Name }; - public bool MatchingCurrentFilter + public bool MatchingFilter { set { diff --git a/osu.Game/Overlays/Chat/ChannelSection.cs b/osu.Game/Overlays/Chat/ChannelSection.cs index 0fe6019ed6..f12ec53605 100644 --- a/osu.Game/Overlays/Chat/ChannelSection.cs +++ b/osu.Game/Overlays/Chat/ChannelSection.cs @@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Chat public IEnumerable FilterableChildren => ChannelFlow.Children; public string[] FilterTerms => new[] { Header }; - public bool MatchingCurrentFilter + public bool MatchingFilter { set { diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index ab23f010cb..872543bdd9 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -10,6 +10,7 @@ using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; +using osu.Framework.Input; using osu.Game.Graphics; using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Sprites; @@ -18,7 +19,7 @@ using osu.Game.Online.Chat; namespace osu.Game.Overlays.Chat { - public class ChannelSelectionOverlay : OverlayContainer + public class ChannelSelectionOverlay : FocusedOverlayContainer { public static readonly float WIDTH_PADDING = 170; @@ -146,21 +147,28 @@ namespace osu.Game.Overlays.Chat headerBg.Colour = colours.Gray2.Opacity(0.75f); } + protected override void OnFocus(InputState state) + { + InputManager.ChangeFocus(search); + base.OnFocus(state); + } + protected override void PopIn() { - search.HoldFocus = true; - Schedule(() => search.TriggerOnFocus()); - FadeIn(100, EasingTypes.OutQuint); MoveToY(0, 800, EasingTypes.OutQuint); + + search.HoldFocus = true; + base.PopIn(); } protected override void PopOut() { - search.HoldFocus = false; - FadeOut(500, EasingTypes.InQuint); MoveToY(DrawHeight, 500, EasingTypes.In); + + search.HoldFocus = false; + base.PopOut(); } private class HeaderSearchTextBox : SearchTextBox From 32f98ca62b09e1be982bfd243047d44e38ed68d6 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Wed, 31 May 2017 22:42:53 -0300 Subject: [PATCH 31/50] Don't autohide the channel list if the chat is too tall --- osu.Game/Overlays/ChatOverlay.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index e4f04c49d6..9b97f7e1b3 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -241,11 +241,6 @@ namespace osu.Game.Overlays { chatContainer.Height = (float)h; channelSelection.Height = 1f - (float)h; - if (channelSelection.Height < channel_selection_min_height) - channelSelection.Hide(); - else if (channelSelection.State == Visibility.Hidden && channelTabs.ChannelSelectorActive.Value) - channelSelection.Show(); - tabBackground.FadeTo(Height == 1 ? 1 : 0.8f, 200); }; chatHeight.TriggerChange(); From c2d1a44de5946ed1f0749010a064224f78cea7fd Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Thu, 1 Jun 2017 05:17:45 -0300 Subject: [PATCH 32/50] Fix channel selection not getting focus --- osu.Game/Overlays/ChatOverlay.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 9b97f7e1b3..e8081c965a 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -159,12 +159,20 @@ namespace osu.Game.Overlays channelTabs.ChannelSelectorActive.ValueChanged += value => channelSelection.State = value ? Visibility.Visible : Visibility.Hidden; channelSelection.StateChanged += (overlay, state) => { - if (state == Visibility.Visible && 1f - chatHeight.Value < channel_selection_min_height) + if (state == Visibility.Visible) { - chatContainer.ResizeHeightTo(1f - channel_selection_min_height, 800, EasingTypes.OutQuint); - channelSelection.ResizeHeightTo(channel_selection_min_height, 800, EasingTypes.OutQuint); - channelSelection.Show(); - chatHeight.Value = 1f - channel_selection_min_height; + inputTextBox.HoldFocus = false; + if (1f - chatHeight.Value < channel_selection_min_height) + { + chatContainer.ResizeHeightTo(1f - channel_selection_min_height, 800, EasingTypes.OutQuint); + channelSelection.ResizeHeightTo(channel_selection_min_height, 800, EasingTypes.OutQuint); + channelSelection.Show(); + chatHeight.Value = 1f - channel_selection_min_height; + } + } + else + { + inputTextBox.HoldFocus = true; } }; } From d728c87cca39a492449dd85df117e8b012f77316 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Thu, 1 Jun 2017 05:26:01 -0300 Subject: [PATCH 33/50] Fix janky opening transition when resizing the chat and reopening the channel list --- osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index 872543bdd9..780cad575f 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -155,6 +155,8 @@ namespace osu.Game.Overlays.Chat protected override void PopIn() { + MoveToY(DrawHeight); + FadeIn(100, EasingTypes.OutQuint); MoveToY(0, 800, EasingTypes.OutQuint); From a707d63647baded46e81eb4dded9f008b70bde51 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Thu, 1 Jun 2017 05:41:21 -0300 Subject: [PATCH 34/50] Fix visual errors if spamming close/open on channel list --- osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index 780cad575f..5e76468fde 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -155,7 +155,7 @@ namespace osu.Game.Overlays.Chat protected override void PopIn() { - MoveToY(DrawHeight); + if (Alpha == 0) MoveToY(DrawHeight); FadeIn(100, EasingTypes.OutQuint); MoveToY(0, 800, EasingTypes.OutQuint); From fad5b4ca9d4c33acddca01c613971e5e7cc6225a Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Thu, 1 Jun 2017 06:10:26 -0300 Subject: [PATCH 35/50] Speed up animations --- osu.Game/Overlays/Chat/ChannelListItem.cs | 2 +- osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index 825f0ae980..1a2d74b060 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -154,7 +154,7 @@ namespace osu.Game.Overlays.Chat protected override bool OnHover(InputState state) { if (!channel.Joined.Value) - name.FadeColour(hoverColour, transition_duration); + name.FadeColour(hoverColour, 50, EasingTypes.OutQuint); return base.OnHover(state); } diff --git a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs index 5e76468fde..cd736a5fe9 100644 --- a/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs +++ b/osu.Game/Overlays/Chat/ChannelSelectionOverlay.cs @@ -23,6 +23,8 @@ namespace osu.Game.Overlays.Chat { public static readonly float WIDTH_PADDING = 170; + private const float transition_duration = 500; + private readonly Box bg; private readonly Triangles triangles; private readonly Box headerBg; @@ -157,8 +159,8 @@ namespace osu.Game.Overlays.Chat { if (Alpha == 0) MoveToY(DrawHeight); - FadeIn(100, EasingTypes.OutQuint); - MoveToY(0, 800, EasingTypes.OutQuint); + FadeIn(transition_duration, EasingTypes.OutQuint); + MoveToY(0, transition_duration, EasingTypes.OutQuint); search.HoldFocus = true; base.PopIn(); @@ -166,8 +168,8 @@ namespace osu.Game.Overlays.Chat protected override void PopOut() { - FadeOut(500, EasingTypes.InQuint); - MoveToY(DrawHeight, 500, EasingTypes.In); + FadeOut(transition_duration, EasingTypes.InSine); + MoveToY(DrawHeight, transition_duration, EasingTypes.InSine); search.HoldFocus = false; base.PopOut(); From ecb0c2f68f47c2a1fbaa7c0ccc5ce18935448ed6 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Thu, 1 Jun 2017 07:55:01 -0300 Subject: [PATCH 36/50] Cleanup ChannelListItem Joined binding --- osu.Game/Overlays/Chat/ChannelListItem.cs | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelListItem.cs index 1a2d74b060..9aa11cdd4f 100644 --- a/osu.Game/Overlays/Chat/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelListItem.cs @@ -5,6 +5,7 @@ using System; using OpenTK; using OpenTK.Graphics; using osu.Framework.Allocation; +using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Input; @@ -23,12 +24,13 @@ namespace osu.Game.Overlays.Chat private readonly Channel channel; + private readonly Bindable joinedBind = new Bindable(); private readonly OsuSpriteText name; private readonly OsuSpriteText topic; private readonly TextAwesome joinedCheckmark; - private Color4? joinedColour; - private Color4? topicColour; + private Color4 joinedColour; + private Color4 topicColour; private Color4 hoverColour; public string[] FilterTerms => new[] { channel.Name }; @@ -137,8 +139,6 @@ namespace osu.Game.Overlays.Chat }, }, }; - - channel.Joined.ValueChanged += updateColour; } [BackgroundDependencyLoader] @@ -148,7 +148,8 @@ namespace osu.Game.Overlays.Chat joinedColour = colours.Blue; hoverColour = colours.Yellow; - updateColour(channel.Joined); + joinedBind.ValueChanged += updateColour; + joinedBind.BindTo(channel.Joined); } protected override bool OnHover(InputState state) @@ -165,12 +166,6 @@ namespace osu.Game.Overlays.Chat name.FadeColour(Color4.White, transition_duration); } - protected override void Dispose(bool isDisposing) - { - if(channel != null) channel.Joined.ValueChanged -= updateColour; - base.Dispose(isDisposing); - } - private void updateColour(bool joined) { if (joined) @@ -179,13 +174,13 @@ namespace osu.Game.Overlays.Chat joinedCheckmark.FadeTo(1f, transition_duration); topic.FadeTo(0.8f, transition_duration); topic.FadeColour(Color4.White, transition_duration); - FadeColour(joinedColour ?? Color4.White, transition_duration); + FadeColour(joinedColour, transition_duration); } else { joinedCheckmark.FadeTo(0f, transition_duration); topic.FadeTo(1f, transition_duration); - topic.FadeColour(topicColour ?? Color4.White, transition_duration); + topic.FadeColour(topicColour, transition_duration); FadeColour(Color4.White, transition_duration); } } From 24b3ec7787bb94b6b0346af45503cd10148ff439 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Thu, 1 Jun 2017 08:16:53 -0300 Subject: [PATCH 37/50] Fix tab background not fading --- osu.Game/Overlays/ChatOverlay.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index e8081c965a..df02b903bf 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -249,7 +249,7 @@ namespace osu.Game.Overlays { chatContainer.Height = (float)h; channelSelection.Height = 1f - (float)h; - tabBackground.FadeTo(Height == 1 ? 1 : 0.8f, 200); + tabBackground.FadeTo(h == 1 ? 1 : 0.8f, 200); }; chatHeight.TriggerChange(); From 697fab9248188e55795d037253175c4cdddee41d Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Thu, 1 Jun 2017 20:22:09 -0300 Subject: [PATCH 38/50] Reselect the chosen tab when closing the channel list --- osu.Game/Overlays/Chat/ChatTabControl.cs | 11 ++++++++++- osu.Game/Overlays/ChatOverlay.cs | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Chat/ChatTabControl.cs b/osu.Game/Overlays/Chat/ChatTabControl.cs index a281cff7db..87222f03f9 100644 --- a/osu.Game/Overlays/Chat/ChatTabControl.cs +++ b/osu.Game/Overlays/Chat/ChatTabControl.cs @@ -23,9 +23,13 @@ namespace osu.Game.Overlays.Chat protected override TabItem CreateTabItem(Channel value) => new ChannelTabItem(value); private const float shear_width = 10; + private readonly Channel addChannel = new Channel { Name = "+" }; public readonly Bindable ChannelSelectorActive = new Bindable(); + private Channel lastTab; + public Channel LastTab => lastTab; + public ChatTabControl() { TabContainer.Margin = new MarginPadding { Left = 50 }; @@ -41,7 +45,12 @@ namespace osu.Game.Overlays.Chat Padding = new MarginPadding(10), }); - AddTabItem(new ChannelTabItem.ChannelSelectorTabItem(new Channel { Name = "+" }, ChannelSelectorActive)); + AddTabItem(new ChannelTabItem.ChannelSelectorTabItem(addChannel, ChannelSelectorActive)); + + Current.ValueChanged += tab => + { + if (tab != addChannel) lastTab = tab; + }; } private class ChannelTabItem : TabItem diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index df02b903bf..62ede00bb6 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -173,6 +173,7 @@ namespace osu.Game.Overlays else { inputTextBox.HoldFocus = true; + channelTabs.Current.Value = channelTabs.LastTab; } }; } From 62ada0afcb214e68e1b35b31df38cce30cb26d00 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Thu, 1 Jun 2017 20:46:18 -0300 Subject: [PATCH 39/50] Make the add tab item unselectable and toggle the channel list --- osu.Game/Overlays/Chat/ChatTabControl.cs | 17 ++++------------- osu.Game/Overlays/ChatOverlay.cs | 1 - 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChatTabControl.cs b/osu.Game/Overlays/Chat/ChatTabControl.cs index 87222f03f9..ba36fce33e 100644 --- a/osu.Game/Overlays/Chat/ChatTabControl.cs +++ b/osu.Game/Overlays/Chat/ChatTabControl.cs @@ -23,13 +23,9 @@ namespace osu.Game.Overlays.Chat protected override TabItem CreateTabItem(Channel value) => new ChannelTabItem(value); private const float shear_width = 10; - private readonly Channel addChannel = new Channel { Name = "+" }; public readonly Bindable ChannelSelectorActive = new Bindable(); - private Channel lastTab; - public Channel LastTab => lastTab; - public ChatTabControl() { TabContainer.Margin = new MarginPadding { Left = 50 }; @@ -45,12 +41,7 @@ namespace osu.Game.Overlays.Chat Padding = new MarginPadding(10), }); - AddTabItem(new ChannelTabItem.ChannelSelectorTabItem(addChannel, ChannelSelectorActive)); - - Current.ValueChanged += tab => - { - if (tab != addChannel) lastTab = tab; - }; + AddTabItem(new ChannelTabItem.ChannelSelectorTabItem(new Channel { Name = "+" }, ChannelSelectorActive)); } private class ChannelTabItem : TabItem @@ -216,11 +207,11 @@ namespace osu.Game.Overlays.Chat { public override bool Active { - get { return base.Active; } + get { return false; } set { - activeBindable.Value = value; - base.Active = value; + activeBindable.Value = !activeBindable.Value; + base.Active = false; } } diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 62ede00bb6..df02b903bf 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -173,7 +173,6 @@ namespace osu.Game.Overlays else { inputTextBox.HoldFocus = true; - channelTabs.Current.Value = channelTabs.LastTab; } }; } From 90dabe01f4150aa1949f609bec800efa8d3c8df2 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Fri, 2 Jun 2017 01:00:09 -0300 Subject: [PATCH 40/50] Fix the channel list appearing behind the tab bar --- osu.Game/Overlays/ChatOverlay.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index df02b903bf..e7d77b8408 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -55,6 +55,7 @@ namespace osu.Game.Overlays private Bindable chatHeight; + private readonly Container channelSelectionContainer; private readonly ChannelSelectionOverlay channelSelection; protected override bool InternalContains(Vector2 screenSpacePos) => chatContainer.Contains(screenSpacePos) || channelSelection.Contains(screenSpacePos); @@ -70,12 +71,18 @@ namespace osu.Game.Overlays Children = new Drawable[] { - channelSelection = new ChannelSelectionOverlay + channelSelectionContainer = new Container { - Anchor = Anchor.TopLeft, - Origin = Anchor.TopLeft, RelativeSizeAxes = Axes.Both, Height = 1f - DEFAULT_HEIGHT, + Masking = true, + Children = new[] + { + channelSelection = new ChannelSelectionOverlay + { + RelativeSizeAxes = Axes.Both, + }, + }, }, chatContainer = new Container { @@ -165,7 +172,7 @@ namespace osu.Game.Overlays if (1f - chatHeight.Value < channel_selection_min_height) { chatContainer.ResizeHeightTo(1f - channel_selection_min_height, 800, EasingTypes.OutQuint); - channelSelection.ResizeHeightTo(channel_selection_min_height, 800, EasingTypes.OutQuint); + channelSelectionContainer.ResizeHeightTo(channel_selection_min_height, 800, EasingTypes.OutQuint); channelSelection.Show(); chatHeight.Value = 1f - channel_selection_min_height; } @@ -248,7 +255,7 @@ namespace osu.Game.Overlays chatHeight.ValueChanged += h => { chatContainer.Height = (float)h; - channelSelection.Height = 1f - (float)h; + channelSelectionContainer.Height = 1f - (float)h; tabBackground.FadeTo(h == 1 ? 1 : 0.8f, 200); }; chatHeight.TriggerChange(); From 1fa70167c2061b5c61f591e971e790e6478bd81f Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Fri, 2 Jun 2017 01:35:36 -0300 Subject: [PATCH 41/50] Fix channel list occasioanlly taking clicks when not open --- osu.Game/Overlays/ChatOverlay.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index e7d77b8408..ecb8d316c6 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -58,7 +58,7 @@ namespace osu.Game.Overlays private readonly Container channelSelectionContainer; private readonly ChannelSelectionOverlay channelSelection; - protected override bool InternalContains(Vector2 screenSpacePos) => chatContainer.Contains(screenSpacePos) || channelSelection.Contains(screenSpacePos); + protected override bool InternalContains(Vector2 screenSpacePos) => chatContainer.Contains(screenSpacePos) || (channelSelection.State == Visibility.Visible && channelSelection.Contains(screenSpacePos)); public ChatOverlay() { From d81ff9cbc2345c0cd3279018a6620ec609dced6a Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Fri, 2 Jun 2017 01:41:55 -0300 Subject: [PATCH 42/50] Add visual states for ChannelSelectorTabItem --- osu.Game/Overlays/Chat/ChatTabControl.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/osu.Game/Overlays/Chat/ChatTabControl.cs b/osu.Game/Overlays/Chat/ChatTabControl.cs index ba36fce33e..13d90a1089 100644 --- a/osu.Game/Overlays/Chat/ChatTabControl.cs +++ b/osu.Game/Overlays/Chat/ChatTabControl.cs @@ -211,6 +211,7 @@ namespace osu.Game.Overlays.Chat set { activeBindable.Value = !activeBindable.Value; + selectorUpdateState(); base.Active = false; } } @@ -235,6 +236,26 @@ namespace osu.Game.Overlays.Chat backgroundInactive = colour.Gray2; backgroundActive = colour.Gray3; } + + protected override void LoadComplete() + { + base.LoadComplete(); + + selectorUpdateState(); + } + + protected override void OnHoverLost(InputState state) + { + selectorUpdateState(); + } + + private void selectorUpdateState() + { + if (activeBindable.Value) + fadeActive(); + else + fadeInactive(); + } } } } From c13e807d82510a9c5bbc38f95aa7df99e0c11ea2 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Fri, 2 Jun 2017 01:48:43 -0300 Subject: [PATCH 43/50] Redundant parenthesis --- osu.Game/Overlays/ChatOverlay.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index ecb8d316c6..d969ec5579 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -58,7 +58,7 @@ namespace osu.Game.Overlays private readonly Container channelSelectionContainer; private readonly ChannelSelectionOverlay channelSelection; - protected override bool InternalContains(Vector2 screenSpacePos) => chatContainer.Contains(screenSpacePos) || (channelSelection.State == Visibility.Visible && channelSelection.Contains(screenSpacePos)); + protected override bool InternalContains(Vector2 screenSpacePos) => chatContainer.Contains(screenSpacePos) || channelSelection.State == Visibility.Visible && channelSelection.Contains(screenSpacePos); public ChatOverlay() { From 16fcfc473d79efbc0008ada0d35ea8510db1729b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 5 Jun 2017 18:04:40 +0900 Subject: [PATCH 44/50] Fix toggle not toggling on pressing escape Also add comment about hacky implementation of toggle tab. --- osu.Game/Overlays/Chat/ChatTabControl.cs | 7 ++++++- osu.Game/Overlays/ChatOverlay.cs | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Chat/ChatTabControl.cs b/osu.Game/Overlays/Chat/ChatTabControl.cs index 13d90a1089..111e2dc4ad 100644 --- a/osu.Game/Overlays/Chat/ChatTabControl.cs +++ b/osu.Game/Overlays/Chat/ChatTabControl.cs @@ -210,8 +210,10 @@ namespace osu.Game.Overlays.Chat get { return false; } set { + // we basically never want this tab to become active. + // this allows us to become a "toggle" tab. + // is a bit hacky, to say the least. activeBindable.Value = !activeBindable.Value; - selectorUpdateState(); base.Active = false; } } @@ -221,6 +223,9 @@ namespace osu.Game.Overlays.Chat public ChannelSelectorTabItem(Channel value, Bindable active) : base(value) { activeBindable = active; + activeBindable.ValueChanged += v => selectorUpdateState(); + + Depth = float.MaxValue; Width = 45; diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 8d79f470f5..7430ab8923 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -166,6 +166,8 @@ namespace osu.Game.Overlays channelTabs.ChannelSelectorActive.ValueChanged += value => channelSelection.State = value ? Visibility.Visible : Visibility.Hidden; channelSelection.StateChanged += (overlay, state) => { + channelTabs.ChannelSelectorActive.Value = state == Visibility.Visible; + if (state == Visibility.Visible) { inputTextBox.HoldFocus = false; From e92c1210d12eb689691fad34014aceb52194d007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Mon, 5 Jun 2017 12:59:29 +0200 Subject: [PATCH 45/50] Make osu tooltips move smoothly --- osu-framework | 2 +- osu.Game/Graphics/Cursor/OsuTooltipContainer.cs | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index c76d8b811b..925bbe42ba 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit c76d8b811b93d0c0862f342ebbab70a461006e13 +Subproject commit 925bbe42bab95078b9d33189205b5b1b76bf8e01 diff --git a/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs b/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs index 46addf5ac2..3df735b725 100644 --- a/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuTooltipContainer.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; using OpenTK.Graphics; using osu.Framework.Allocation; using osu.Framework.Extensions.Color4Extensions; @@ -24,6 +25,7 @@ namespace osu.Game.Graphics.Cursor { private readonly Box background; private readonly OsuSpriteText text; + private bool firstMovement = true; public override string TooltipText { @@ -88,6 +90,19 @@ namespace osu.Game.Graphics.Cursor using (BeginDelayedSequence(150)) FadeOut(500, EasingTypes.OutQuint); } + + public override void Move(Vector2 pos) + { + if (firstMovement) + { + Position = pos; + firstMovement = false; + } + else + { + MoveTo(pos, 200, EasingTypes.OutQuint); + } + } } } } From b4b3ba0787f15bf6d7df870e7c2791defe50bea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Mon, 5 Jun 2017 13:07:38 +0200 Subject: [PATCH 46/50] Fix incorrect initial movement of tooltips --- osu.Game/Graphics/Cursor/OsuTooltipContainer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs b/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs index 3df735b725..bce0279465 100644 --- a/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs @@ -83,6 +83,7 @@ namespace osu.Game.Graphics.Cursor protected override void PopIn() { FadeIn(500, EasingTypes.OutQuint); + firstMovement = true; } protected override void PopOut() From c85a0223b0d4ffc5290b99040f644c39ece11b16 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 5 Jun 2017 20:52:46 +0900 Subject: [PATCH 47/50] Only instantly move tooltip is we are not visible --- osu.Game/Graphics/Cursor/OsuTooltipContainer.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs b/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs index bce0279465..815d820a47 100644 --- a/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuTooltipContainer.cs @@ -25,7 +25,7 @@ namespace osu.Game.Graphics.Cursor { private readonly Box background; private readonly OsuSpriteText text; - private bool firstMovement = true; + private bool instantMovement = true; public override string TooltipText { @@ -34,7 +34,7 @@ namespace osu.Game.Graphics.Cursor if (value == text.Text) return; text.Text = value; - if (Alpha > 0) + if (IsPresent) { AutoSizeDuration = 250; background.FlashColour(OsuColour.Gray(0.4f), 1000, EasingTypes.OutQuint); @@ -82,8 +82,8 @@ namespace osu.Game.Graphics.Cursor protected override void PopIn() { + instantMovement |= !IsPresent; FadeIn(500, EasingTypes.OutQuint); - firstMovement = true; } protected override void PopOut() @@ -94,10 +94,10 @@ namespace osu.Game.Graphics.Cursor public override void Move(Vector2 pos) { - if (firstMovement) + if (instantMovement) { Position = pos; - firstMovement = false; + instantMovement = false; } else { From d9106c4e304da129f881072d8eea9566ca5222bf Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 5 Jun 2017 21:58:13 +0900 Subject: [PATCH 48/50] Temporarily disable inspection --- osu.Game/Overlays/Chat/ChatTabControl.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Overlays/Chat/ChatTabControl.cs b/osu.Game/Overlays/Chat/ChatTabControl.cs index 111e2dc4ad..23ddff9381 100644 --- a/osu.Game/Overlays/Chat/ChatTabControl.cs +++ b/osu.Game/Overlays/Chat/ChatTabControl.cs @@ -208,6 +208,7 @@ namespace osu.Game.Overlays.Chat public override bool Active { get { return false; } + // ReSharper disable once ValueParameterNotUsed set { // we basically never want this tab to become active. From 6b7e18a1e36de8c3dae809bb6415b08226a455d3 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 5 Jun 2017 23:12:39 +0900 Subject: [PATCH 49/50] Fix not being able to change channels when channel select dialog is up --- osu.Game/Overlays/ChatOverlay.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 7430ab8923..2e6f143e74 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -324,9 +324,7 @@ namespace osu.Game.Overlays set { - if (currentChannel == value) return; - - if (channelTabs.ChannelSelectorActive) return; + if (currentChannel == value || value == null) return; currentChannel = value; From 141c53c50624fbf830dff0e4c5ab71eb8760f96d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 6 Jun 2017 13:54:16 +0900 Subject: [PATCH 50/50] Update resource again (fixes filesize increase) --- osu-resources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-resources b/osu-resources index a5199500cc..b348c1e540 160000 --- a/osu-resources +++ b/osu-resources @@ -1 +1 @@ -Subproject commit a5199500cc3ba96101fd858e0f78f36e538697b1 +Subproject commit b348c1e540edbb3325a8da9bca452c9dce2938d6