mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-25 22:18:34 +01:00
Compare commits
4 commits
b2898a8eae
...
f0432ab981
Author | SHA1 | Date | |
---|---|---|---|
f0432ab981 | |||
8332f56237 | |||
b7b1490d70 | |||
4d34a2fac1 |
4 changed files with 16 additions and 9 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -10,6 +10,7 @@ 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
|
||||||
|
@ -22,6 +23,11 @@ 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
|
||||||
|
@ -31,6 +37,7 @@ 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
|
||||||
|
@ -117,6 +124,7 @@ 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
|
||||||
|
@ -201,6 +209,7 @@ 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
|
||||||
|
@ -275,6 +284,7 @@ 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
|
||||||
|
@ -325,6 +335,7 @@ 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
|
||||||
|
|
|
@ -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() || this.SetWidthBasedOnChildren || this.SetHeightBasedOnChildren)
|
if (child.Anchor.IsAuto() || child.PreventParentSpill || this.SetWidthBasedOnChildren || this.SetHeightBasedOnChildren)
|
||||||
this.SetAreaDirty();
|
this.SetAreaDirty();
|
||||||
}
|
}
|
||||||
this.Parent?.OnChildAreaDirty(child, true);
|
this.Parent?.OnChildAreaDirty(child, true);
|
||||||
|
|
|
@ -118,15 +118,11 @@ 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))
|
||||||
if (!child.ScrollOffset.Equals(offset, Element.Epsilon)) {
|
child.ScrollOffset.Y = -this.ScrollBar.CurrentValue;
|
||||||
child.ScrollOffset = offset;
|
|
||||||
this.relevantChildrenDirty = true;
|
this.relevantChildrenDirty = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void ForceUpdateSortedChildren() {
|
public override void ForceUpdateSortedChildren() {
|
||||||
|
|
|
@ -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;
|
private bool forceHide = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new paragraph with the given settings.
|
/// Creates a new paragraph with the given settings.
|
||||||
|
|
Loading…
Reference in a new issue