mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:25:11 +08:00
Fix resizing bug(?).
This commit is contained in:
parent
57678a13d9
commit
2a64bcda85
@ -67,7 +67,19 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
protected override void AnimateClose() => this.FadeOut(300, Easing.OutQuint);
|
protected override void AnimateClose() => this.FadeOut(300, Easing.OutQuint);
|
||||||
|
|
||||||
// todo: this uses the same styling as OsuMenu. hopefully we can just use OsuMenu in the future with some refactoring
|
// todo: this uses the same styling as OsuMenu. hopefully we can just use OsuMenu in the future with some refactoring
|
||||||
protected override void UpdateSize(Vector2 newSize) => this.ResizeTo(newSize, 300, Easing.OutQuint);
|
protected override void UpdateSize(Vector2 newSize)
|
||||||
|
{
|
||||||
|
if (Direction == Direction.Vertical)
|
||||||
|
{
|
||||||
|
Width = newSize.X;
|
||||||
|
this.ResizeHeightTo(newSize.Y, 300, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Height = newSize.Y;
|
||||||
|
this.ResizeWidthTo(newSize.X, 300, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Color4 accentColour;
|
private Color4 accentColour;
|
||||||
public Color4 AccentColour
|
public Color4 AccentColour
|
||||||
|
@ -30,7 +30,19 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
protected override void AnimateOpen() => this.FadeIn(300, Easing.OutQuint);
|
protected override void AnimateOpen() => this.FadeIn(300, Easing.OutQuint);
|
||||||
protected override void AnimateClose() => this.FadeOut(300, Easing.OutQuint);
|
protected override void AnimateClose() => this.FadeOut(300, Easing.OutQuint);
|
||||||
|
|
||||||
protected override void UpdateSize(Vector2 newSize) => this.ResizeTo(newSize, 300, Easing.OutQuint);
|
protected override void UpdateSize(Vector2 newSize)
|
||||||
|
{
|
||||||
|
if (Direction == Direction.Vertical)
|
||||||
|
{
|
||||||
|
Width = newSize.X;
|
||||||
|
this.ResizeHeightTo(newSize.Y, 300, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Height = newSize.Y;
|
||||||
|
this.ResizeWidthTo(newSize.X, 300, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override DrawableMenuItem CreateDrawableMenuItem(MenuItem item) => new DrawableOsuMenuItem(item);
|
protected override DrawableMenuItem CreateDrawableMenuItem(MenuItem item) => new DrawableOsuMenuItem(item);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user