1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-25 22:18:34 +01:00

Compare commits

..

4 commits

4 changed files with 16 additions and 9 deletions

View file

@ -10,6 +10,7 @@ Jump to version:
- [5.0.0](#500)
## 6.1.0
### MLEM
Improvements
- Improved EnumHelper.GetValues signature to return an array
@ -22,6 +23,11 @@ Improvements
- Allow elements to auto-adjust their size even when their children are aligned oddly
- Close other dropdowns when opening a dropdown
Fixes
- Fixed parents of elements that prevent spill not being notified properly
- Fixed paragraphs sometimes not updating their position properly when hidden because they're empty
- Fixed panels sometimes not drawing children that came into view when their positions changed unexpectedly
### MLEM.Data
Improvements
- Allow data texture atlas pivots and offsets to be negative
@ -31,6 +37,7 @@ Fixes
- Fixed data texture atlases not allowing most characters in their region names
## 6.0.0
### MLEM
Additions
- Added consuming variants of IsPressed methods to InputHandler and Keybind
@ -117,6 +124,7 @@ Improvements
- Updated to MonoGame 3.8.1
## 5.3.0
### MLEM
Additions
- Added StringBuilder overloads to GenericFont
@ -201,6 +209,7 @@ Removals
- Marked CopyExtensions as obsolete
## 5.2.0
### MLEM
Additions
- Added a strikethrough formatting code
@ -275,6 +284,7 @@ Additions
- Added PreDraw and PreUpdate events and coroutine events
## 5.1.0
### MLEM
Additions
- Added RotateBy to Direction2Helper
@ -325,6 +335,7 @@ Fixes
- Fixed DynamicEnum AddFlag going into an infinite loop
## 5.0.0
### MLEM
Additions
- Added some Collection extensions, namely for dealing with combinations

View file

@ -1125,7 +1125,7 @@ namespace MLEM.Ui.Elements {
/// <param name="grandchild">Whether the <paramref name="child"/> is a grandchild of this element, rather than a direct child.</param>
protected virtual void OnChildAreaDirty(Element child, bool grandchild) {
if (!grandchild) {
if (child.Anchor.IsAuto() || this.SetWidthBasedOnChildren || this.SetHeightBasedOnChildren)
if (child.Anchor.IsAuto() || child.PreventParentSpill || this.SetWidthBasedOnChildren || this.SetHeightBasedOnChildren)
this.SetAreaDirty();
}
this.Parent?.OnChildAreaDirty(child, true);

View file

@ -118,14 +118,10 @@ namespace MLEM.Ui.Elements {
private void ScrollChildren() {
if (!this.scrollOverflow)
return;
var offset = new Vector2(0, -this.ScrollBar.CurrentValue);
// we ignore false grandchildren so that the children of the scroll bar stay in place
foreach (var child in this.GetChildren(c => c != this.ScrollBar, true, true)) {
if (!child.ScrollOffset.Equals(offset, Element.Epsilon)) {
child.ScrollOffset = offset;
this.relevantChildrenDirty = true;
}
}
foreach (var child in this.GetChildren(c => c != this.ScrollBar, true, true))
child.ScrollOffset.Y = -this.ScrollBar.CurrentValue;
this.relevantChildrenDirty = true;
}
/// <inheritdoc />

View file

@ -110,7 +110,7 @@ namespace MLEM.Ui.Elements {
private string text;
private StyleProp<TextAlignment> alignment;
private StyleProp<GenericFont> regularFont;
private bool forceHide;
private bool forceHide = true;
/// <summary>
/// Creates a new paragraph with the given settings.