From 2c5de9e392e8b7433730f4150605231da299737e Mon Sep 17 00:00:00 2001 From: Michele Ravaioli Date: Mon, 7 Oct 2024 17:35:40 +0200 Subject: [PATCH] prepend instead of append in renderer submission --- ScalaGameEngine/src/main/scala/sge/swing/SwingIO.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ScalaGameEngine/src/main/scala/sge/swing/SwingIO.scala b/ScalaGameEngine/src/main/scala/sge/swing/SwingIO.scala index a6181137..b22a02fb 100644 --- a/ScalaGameEngine/src/main/scala/sge/swing/SwingIO.scala +++ b/ScalaGameEngine/src/main/scala/sge/swing/SwingIO.scala @@ -211,7 +211,7 @@ object SwingIO: setBackground(color) def add(renderer: (Graphics2D => Unit, Int)): Unit = - renderers = renderers :+ renderer + renderers = renderer +: renderers def showRenderers(): Unit = SwingUtilities.invokeLater(() => { show = true; repaint()