mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-24 13:38:34 +01:00
Compare commits
No commits in common. "20e2d098ef19151a3796c59a2c9bc03d0e228791" and "d1fbcb95599f6b1de1263ec2a03521e7011d952f" have entirely different histories.
20e2d098ef
...
d1fbcb9559
1 changed files with 5 additions and 15 deletions
|
@ -15,7 +15,7 @@ namespace MLEM.Ui.Elements {
|
|||
/// Additionally, a panel can be set to <see cref="scrollOverflow"/> on construction, which causes all elements that don't fit into the panel to be hidden until scrolled to using a <see cref="ScrollBar"/>.
|
||||
/// As this behavior is accomplished using a <see cref="RenderTarget2D"/>, scrolling panels need to have their <see cref="DrawEarly"/> methods called using <see cref="UiSystem.DrawEarly"/>.
|
||||
/// </summary>
|
||||
public class Panel : Element, IDisposable {
|
||||
public class Panel : Element {
|
||||
|
||||
/// <summary>
|
||||
/// The texture that this panel should have, or null if it should be invisible.
|
||||
|
@ -76,10 +76,6 @@ namespace MLEM.Ui.Elements {
|
|||
}
|
||||
}
|
||||
|
||||
~Panel() {
|
||||
this.Dispose();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ForceUpdateArea() {
|
||||
if (this.scrollOverflow) {
|
||||
|
@ -182,9 +178,12 @@ namespace MLEM.Ui.Elements {
|
|||
batch.Begin(SpriteSortMode.Deferred, blendState, samplerState, null, null, null, trans);
|
||||
base.Draw(time, batch, alpha, blendState, samplerState, trans);
|
||||
batch.End();
|
||||
// also draw any children early within the render target with the translation applied
|
||||
base.DrawEarly(time, batch, alpha, blendState, samplerState, trans);
|
||||
}
|
||||
} else {
|
||||
base.DrawEarly(time, batch, alpha, blendState, samplerState, matrix);
|
||||
}
|
||||
base.DrawEarly(time, batch, alpha, blendState, samplerState, matrix);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
@ -235,14 +234,5 @@ namespace MLEM.Ui.Elements {
|
|||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose() {
|
||||
if (this.renderTarget != null) {
|
||||
this.renderTarget.Dispose();
|
||||
this.renderTarget = null;
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue