mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Merge remote-tracking branch 'upstream/master' into miterosan-Private_Messages
This commit is contained in:
@ -11,10 +11,8 @@ using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
@ -174,7 +172,7 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
textbox.HoldFocus = false;
|
||||
if (1f - ChatHeight.Value < channel_selection_min_height)
|
||||
transformChatHeightTo(1f - channel_selection_min_height, 800, Easing.OutQuint);
|
||||
this.TransformBindableTo(ChatHeight, 1f - channel_selection_min_height, 800, Easing.OutQuint);
|
||||
}
|
||||
else
|
||||
textbox.HoldFocus = true;
|
||||
@ -362,26 +360,5 @@ namespace osu.Game.Overlays
|
||||
|
||||
textbox.Text = string.Empty;
|
||||
}
|
||||
|
||||
private void transformChatHeightTo(double newChatHeight, double duration = 0, Easing easing = Easing.None)
|
||||
{
|
||||
this.TransformTo(this.PopulateTransform(new TransformChatHeight(), newChatHeight, duration, easing));
|
||||
}
|
||||
|
||||
private class TransformChatHeight : Transform<double, ChatOverlay>
|
||||
{
|
||||
private double valueAt(double time)
|
||||
{
|
||||
if (time < StartTime) return StartValue;
|
||||
if (time >= EndTime) return EndValue;
|
||||
|
||||
return Interpolation.ValueAt(time, StartValue, EndValue, StartTime, EndTime, Easing);
|
||||
}
|
||||
|
||||
public override string TargetMember => "ChatHeight.Value";
|
||||
|
||||
protected override void Apply(ChatOverlay d, double time) => d.ChatHeight.Value = valueAt(time);
|
||||
protected override void ReadIntoStartValue(ChatOverlay d) => StartValue = d.ChatHeight.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user