diff mde/menus.d @ 133:9fd705793568

Fixed menu popup bug, improved recursion detection. Menu popups can now determine whether or not they are sub-menus. Recursion detection can now also check content (if not the same, there's not a risk of infinite recursion).
author Diggory Hardy <diggory.hardy@gmail.com>
date Fri, 23 Jan 2009 16:05:05 +0000
parents 264028f4115a
children 9f035cd139c6
line wrap: on
line diff
--- a/mde/menus.d	Fri Jan 23 14:59:05 2009 +0000
+++ b/mde/menus.d	Fri Jan 23 16:05:05 2009 +0000
@@ -36,5 +36,10 @@
         debug logger.trace ("Quit (from menu)");
         run = false;
     });
-    menus.append (new ContentList ("main", [cast(Content)quit]));
+    auto main = new ContentList ("main", [cast(Content)quit]);
+    debug {
+        main.append (new ContentList ("sm1", [cast(Content) new EventContent ("a"), new EventContent ("b")]));
+        main.append (new ContentList ("sm2", [cast(Content) new EventContent ("c"), new EventContent ("d")]));
+    }
+    menus.append (main);
 }