diff --git a/DotSDL/Graphics/Background.cs b/DotSDL/Graphics/Background.cs
index b725cb5..f5dda1f 100644
--- a/DotSDL/Graphics/Background.cs
+++ b/DotSDL/Graphics/Background.cs
@@ -30,7 +30,7 @@ namespace DotSDL.Graphics {
// TODO: Might be able to make this faster by leveraging memcpy(). Need to benchmark it.
unsafe {
var copySize = Width * Height * 4; // Width x Height at 4 bytes per pixel.
- Render.LockTexture(Texture, IntPtr.Zero, out var pixels, out var _);
+ Render.LockTexture(Texture, IntPtr.Zero, out var pixels, out _);
Buffer.MemoryCopy(GetCanvasPointer().ToPointer(), pixels, copySize, copySize);
Render.UnlockTexture(Texture);
}
diff --git a/DotSDL/Graphics/Canvas.cs b/DotSDL/Graphics/Canvas.cs
index dc1996b..ed8f516 100644
--- a/DotSDL/Graphics/Canvas.cs
+++ b/DotSDL/Graphics/Canvas.cs
@@ -153,6 +153,17 @@ namespace DotSDL.Graphics {
}
}
+ ///
+ /// true if the should be drawn to the screen, otherwise false.
+ ///
+ public bool Shown { get; set; } = true;
+
+ ///
+ /// The order in which the canvas is drawn. Lower numbered instances are drawn first
+ /// and will appear on the bottom. This number can be negative.
+ ///
+ public int ZOrder { get; set; }
+
///
/// Sets the section of the that should be drawn. If the size values are set to 0, the
/// will fill as much of its containing object as possible.
diff --git a/DotSDL/Graphics/SdlWindow.cs b/DotSDL/Graphics/SdlWindow.cs
index 64be46f..7cfc834 100644
--- a/DotSDL/Graphics/SdlWindow.cs
+++ b/DotSDL/Graphics/SdlWindow.cs
@@ -31,6 +31,8 @@ namespace DotSDL.Graphics {
private float _nextGameUpdate;
private float _updateDelta;
+ private List