mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-12-25 01:39:23 +01:00
added info about negative sizes to MLEM.Ui article
This commit is contained in:
parent
333b4b033e
commit
9a1f1e335c
1 changed files with 1 additions and 0 deletions
|
@ -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.
|
Loading…
Reference in a new issue