diff game/IDMButton.java @ 64:bca0112851d6

Only load button graphics once.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 25 Feb 2011 07:27:18 +0200
parents f81f76458b92
children b586ce4f6d97
line wrap: on
line diff
--- a/game/IDMButton.java	Fri Feb 25 07:26:58 2011 +0200
+++ b/game/IDMButton.java	Fri Feb 25 07:27:18 2011 +0200
@@ -40,6 +40,9 @@
     
     private static void loadImages()
     {
+        if (imgUp != null && imgPressed != null)
+            return;
+
         try
         {
             ResourceLoader res = new ResourceLoader("graphics/button1_up.png");