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

Compare commits

..

No commits in common. "f0432ab981c51da7339f942317bf75b6b600f689" and "b2898a8eae7ccd4394bdd637332ac12fa522dc73" have entirely different histories.

4 changed files with 9 additions and 16 deletions

View file

@ -10,7 +10,6 @@ Jump to version:
- [5.0.0](#500) - [5.0.0](#500)
## 6.1.0 ## 6.1.0
### MLEM ### MLEM
Improvements Improvements
- Improved EnumHelper.GetValues signature to return an array - Improved EnumHelper.GetValues signature to return an array
@ -23,11 +22,6 @@ Improvements
- Allow elements to auto-adjust their size even when their children are aligned oddly - Allow elements to auto-adjust their size even when their children are aligned oddly
- Close other dropdowns when opening a dropdown - 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 ### MLEM.Data
Improvements Improvements
- Allow data texture atlas pivots and offsets to be negative - Allow data texture atlas pivots and offsets to be negative
@ -37,7 +31,6 @@ Fixes
- Fixed data texture atlases not allowing most characters in their region names - Fixed data texture atlases not allowing most characters in their region names
## 6.0.0 ## 6.0.0
### MLEM ### MLEM
Additions Additions
- Added consuming variants of IsPressed methods to InputHandler and Keybind - Added consuming variants of IsPressed methods to InputHandler and Keybind
@ -124,7 +117,6 @@ Improvements
- Updated to MonoGame 3.8.1 - Updated to MonoGame 3.8.1
## 5.3.0 ## 5.3.0
### MLEM ### MLEM
Additions Additions
- Added StringBuilder overloads to GenericFont - Added StringBuilder overloads to GenericFont
@ -209,7 +201,6 @@ Removals
- Marked CopyExtensions as obsolete - Marked CopyExtensions as obsolete
## 5.2.0 ## 5.2.0
### MLEM ### MLEM
Additions Additions
- Added a strikethrough formatting code - Added a strikethrough formatting code
@ -284,7 +275,6 @@ Additions
- Added PreDraw and PreUpdate events and coroutine events - Added PreDraw and PreUpdate events and coroutine events
## 5.1.0 ## 5.1.0
### MLEM ### MLEM
Additions Additions
- Added RotateBy to Direction2Helper - Added RotateBy to Direction2Helper
@ -335,7 +325,6 @@ Fixes
- Fixed DynamicEnum AddFlag going into an infinite loop - Fixed DynamicEnum AddFlag going into an infinite loop
## 5.0.0 ## 5.0.0
### MLEM ### MLEM
Additions Additions
- Added some Collection extensions, namely for dealing with combinations - 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> /// <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) { protected virtual void OnChildAreaDirty(Element child, bool grandchild) {
if (!grandchild) { if (!grandchild) {
if (child.Anchor.IsAuto() || child.PreventParentSpill || this.SetWidthBasedOnChildren || this.SetHeightBasedOnChildren) if (child.Anchor.IsAuto() || this.SetWidthBasedOnChildren || this.SetHeightBasedOnChildren)
this.SetAreaDirty(); this.SetAreaDirty();
} }
this.Parent?.OnChildAreaDirty(child, true); this.Parent?.OnChildAreaDirty(child, true);

View file

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

View file

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