mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 20:58:34 +01:00
made panels update their draw area properly in drawearly
This commit is contained in:
parent
1e62513e25
commit
b8e73717f4
1 changed files with 3 additions and 2 deletions
|
@ -135,14 +135,15 @@ namespace MLEM.Ui.Elements {
|
|||
// if we handle overflow, draw using the render target in DrawUnbound
|
||||
if (!this.scrollOverflow) {
|
||||
base.Draw(time, batch, alpha, blendState, samplerState, matrix);
|
||||
} else if (this.renderTarget != null) {
|
||||
} else {
|
||||
// draw the actual render target (don't apply the alpha here because it's already drawn onto with alpha)
|
||||
batch.Draw(this.renderTarget, this.GetRenderTargetArea(), Color.White);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DrawEarly(GameTime time, SpriteBatch batch, float alpha, BlendState blendState, SamplerState samplerState, Matrix matrix) {
|
||||
if (this.scrollOverflow && this.renderTarget != null) {
|
||||
if (this.scrollOverflow) {
|
||||
this.UpdateAreaIfDirty();
|
||||
// draw children onto the render target
|
||||
batch.GraphicsDevice.SetRenderTarget(this.renderTarget);
|
||||
batch.GraphicsDevice.Clear(Color.Transparent);
|
||||
|
|
Loading…
Reference in a new issue