Update with framework changes

This commit is contained in:
DrabWeb
2017-05-31 22:39:03 -03:00
parent e7bf1e02cb
commit 52d524a65e
3 changed files with 16 additions and 8 deletions

View File

@ -32,7 +32,7 @@ namespace osu.Game.Overlays.Chat
private Color4 hoverColour; private Color4 hoverColour;
public string[] FilterTerms => new[] { channel.Name }; public string[] FilterTerms => new[] { channel.Name };
public bool MatchingCurrentFilter public bool MatchingFilter
{ {
set set
{ {

View File

@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Chat
public IEnumerable<IFilterable> FilterableChildren => ChannelFlow.Children; public IEnumerable<IFilterable> FilterableChildren => ChannelFlow.Children;
public string[] FilterTerms => new[] { Header }; public string[] FilterTerms => new[] { Header };
public bool MatchingCurrentFilter public bool MatchingFilter
{ {
set set
{ {

View File

@ -10,6 +10,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Input;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Backgrounds;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
@ -18,7 +19,7 @@ using osu.Game.Online.Chat;
namespace osu.Game.Overlays.Chat namespace osu.Game.Overlays.Chat
{ {
public class ChannelSelectionOverlay : OverlayContainer public class ChannelSelectionOverlay : FocusedOverlayContainer
{ {
public static readonly float WIDTH_PADDING = 170; public static readonly float WIDTH_PADDING = 170;
@ -146,21 +147,28 @@ namespace osu.Game.Overlays.Chat
headerBg.Colour = colours.Gray2.Opacity(0.75f); headerBg.Colour = colours.Gray2.Opacity(0.75f);
} }
protected override void OnFocus(InputState state)
{
InputManager.ChangeFocus(search);
base.OnFocus(state);
}
protected override void PopIn() protected override void PopIn()
{ {
search.HoldFocus = true;
Schedule(() => search.TriggerOnFocus());
FadeIn(100, EasingTypes.OutQuint); FadeIn(100, EasingTypes.OutQuint);
MoveToY(0, 800, EasingTypes.OutQuint); MoveToY(0, 800, EasingTypes.OutQuint);
search.HoldFocus = true;
base.PopIn();
} }
protected override void PopOut() protected override void PopOut()
{ {
search.HoldFocus = false;
FadeOut(500, EasingTypes.InQuint); FadeOut(500, EasingTypes.InQuint);
MoveToY(DrawHeight, 500, EasingTypes.In); MoveToY(DrawHeight, 500, EasingTypes.In);
search.HoldFocus = false;
base.PopOut();
} }
private class HeaderSearchTextBox : SearchTextBox private class HeaderSearchTextBox : SearchTextBox