From 9a1f1e335c3219d7700449440de455394c165a82 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 25 Sep 2020 17:18:58 +0200 Subject: [PATCH] added info about negative sizes to MLEM.Ui article --- Docs/articles/ui.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Docs/articles/ui.md b/Docs/articles/ui.md index 323e9cc..cdbabc6 100644 --- a/Docs/articles/ui.md +++ b/Docs/articles/ui.md @@ -91,3 +91,4 @@ this.UiSystem.Add("InfoBox", box); Note that, when setting the width and height of any element, there are some things to note: - Each element has a `SetWidthBasedOnChildren` and a `SetHeightBasedOnChildren` property, which allow them to change their size automatically based on their content - When specifying a width or height *lower than or equal to 1*, it is seen as a percentage based on the parent's size instead. For example, a paragraph with a width of `0.5F` inside of a panel width a width of `200` will be `100` units wide. +- When specifying a width *lower than 0*, it is seen as a percentage based on the element's height, and vice versa. For example, a panel with a width of `200` and a height of `-2` will be `400` units tall. \ No newline at end of file