mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-26 06:28:35 +01:00
Fixed children of Panel scroll bars also being scrolled
This commit is contained in:
parent
fa34258bbe
commit
bb22bbdf75
2 changed files with 3 additions and 1 deletions
|
@ -60,6 +60,7 @@ Fixes
|
||||||
- Fixed auto-navigating panels not scrolling to the center of elements properly
|
- Fixed auto-navigating panels not scrolling to the center of elements properly
|
||||||
- Fixed UiControls allowing for non-selectable or non-mouseable elements to be marked as selected or moused
|
- Fixed UiControls allowing for non-selectable or non-mouseable elements to be marked as selected or moused
|
||||||
- Fixed buttons and checkboxes changing their CanBeSelected and CanBePressed values when being disabled
|
- Fixed buttons and checkboxes changing their CanBeSelected and CanBePressed values when being disabled
|
||||||
|
- Fixed children of Panel scroll bars also being scrolled
|
||||||
|
|
||||||
Removals
|
Removals
|
||||||
- Marked StyleProp equality members as obsolete
|
- Marked StyleProp equality members as obsolete
|
||||||
|
|
|
@ -119,7 +119,8 @@ namespace MLEM.Ui.Elements {
|
||||||
if (!this.scrollOverflow)
|
if (!this.scrollOverflow)
|
||||||
return;
|
return;
|
||||||
var offset = new Vector2(0, -this.ScrollBar.CurrentValue);
|
var offset = new Vector2(0, -this.ScrollBar.CurrentValue);
|
||||||
foreach (var child in this.GetChildren(c => c != this.ScrollBar, true)) {
|
// 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, Epsilon)) {
|
if (!child.ScrollOffset.Equals(offset, Epsilon)) {
|
||||||
child.ScrollOffset = offset;
|
child.ScrollOffset = offset;
|
||||||
this.relevantChildrenDirty = true;
|
this.relevantChildrenDirty = true;
|
||||||
|
|
Loading…
Reference in a new issue