fixed upgrade ui crashing

This commit is contained in:
Ell 2023-03-03 22:18:28 +01:00
parent f7bc8738d1
commit db90c8a686

View file

@ -358,9 +358,9 @@ public class Ui {
PositionOffset = new Vector2(0, 2)
});
var upgradeList = upgradeUi.AddChild(new Panel(Anchor.AutoLeft, new Vector2(1), Vector2.Zero, false, true, false) {
ChildPadding = new Padding(5, 15, 5, 5)
ChildPadding = new Padding(5, 15, 5, 5),
PreventParentSpill = true
});
upgradeHeader.OnAreaUpdated += e => upgradeList.Size = new Vector2(1, (upgradeUi.DisplayArea.Height - upgradeHeader.DisplayArea.Height) / e.Scale);
Ui.PopulateUpgradeList(upgradeList);
this.uiSystem.Add("Upgrade", upgradeUi);