From a58470de9fdc0ab46222df2f378c3b2d312bf676 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 30 Oct 2024 20:33:05 +0100 Subject: [PATCH] three tiny fixes --- Docs/articles/ui.md | 2 +- MLEM.Ui/Elements/Group.cs | 2 +- MLEM.Ui/Elements/Panel.cs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Docs/articles/ui.md b/Docs/articles/ui.md index 0e76aa9..f68bbef 100644 --- a/Docs/articles/ui.md +++ b/Docs/articles/ui.md @@ -13,7 +13,7 @@ protected override void LoadContent() { // Load your other content here // Initialize the Ui system - this.UiSystem = new UiSystem(this.Window, this.GraphicsDevice, new UntexturedStyle(this.SpriteBatch)); + this.UiSystem = new UiSystem(this, this.GraphicsDevice, new UntexturedStyle(this.SpriteBatch)); } protected override void Update(GameTime gameTime) { diff --git a/MLEM.Ui/Elements/Group.cs b/MLEM.Ui/Elements/Group.cs index 8035046..f8f496b 100644 --- a/MLEM.Ui/Elements/Group.cs +++ b/MLEM.Ui/Elements/Group.cs @@ -6,7 +6,7 @@ namespace MLEM.Ui.Elements { /// /// A group element to be used inside of a . /// A group is an element that has no rendering or interaction on its own, but that can aid with automatic placement of child elements. - /// If a grouping whose children scroll, and which has a , is desired, a panel with its set to can be used. + /// If a grouping whose children scroll, and which has a , is desired, a with its set to can be used. /// public class Group : Element { diff --git a/MLEM.Ui/Elements/Panel.cs b/MLEM.Ui/Elements/Panel.cs index 3300fea..36f5288 100644 --- a/MLEM.Ui/Elements/Panel.cs +++ b/MLEM.Ui/Elements/Panel.cs @@ -86,6 +86,7 @@ namespace MLEM.Ui.Elements { if (scrollOverflow) { this.scrollBarMaxHistory = new float[3]; + this.scrollBarMaxHistoryDirty = true; this.ResetScrollBarMaxHistory(); this.ScrollBar = new ScrollBar(Anchor.TopRight, Vector2.Zero, 0, 0) {