1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 06:43:21 +08:00

Make the transition when chat is too tall and opening the channel selector smoother

This commit is contained in:
DrabWeb 2017-05-31 22:29:52 -03:00
parent d970430174
commit 6176f1d275

View File

@ -70,7 +70,7 @@ namespace osu.Game.Overlays
Children = new Drawable[] Children = new Drawable[]
{ {
channelSelection = new ChannelSelectionOverlay //todo: temporary placement channelSelection = new ChannelSelectionOverlay
{ {
Anchor = Anchor.TopLeft, Anchor = Anchor.TopLeft,
Origin = Anchor.TopLeft, Origin = Anchor.TopLeft,
@ -160,7 +160,12 @@ namespace osu.Game.Overlays
channelSelection.StateChanged += (overlay, state) => channelSelection.StateChanged += (overlay, state) =>
{ {
if (state == Visibility.Visible && 1f - chatHeight.Value < channel_selection_min_height) 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; chatHeight.Value = 1f - channel_selection_min_height;
}
}; };
} }