mirror of
https://github.com/ppy/osu.git
synced 2026-05-27 20:48:44 +08:00
Fix dropdown margins and animations being weird
This was attempted to be fixed by frenzibyte using some hack workaround logic, but this is the true fix. Things were never matching due to `UpdateSize` spamming `Resize` transforms every frame, causing the fade out to complete before transforms have reached a final state.
This commit is contained in:
@@ -104,9 +104,17 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
}
|
||||
|
||||
private Vector2? targetSize;
|
||||
|
||||
// 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)
|
||||
{
|
||||
// TODO: should probably fix this at a framework level (this method is running every frame which can spam transforms)
|
||||
if (newSize == targetSize)
|
||||
return;
|
||||
|
||||
targetSize = newSize;
|
||||
|
||||
if (Direction == Direction.Vertical)
|
||||
{
|
||||
Width = newSize.X;
|
||||
|
||||
Reference in New Issue
Block a user