Mercurial > projects > mde
diff mde/content/Items.d @ 113:9824bee909fd
Popup menu; works for simple menus except that clicking an item doesn't close it.
Revised popup support a bit; EnumContentWidget is broken and due to be replaced.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Fri, 19 Dec 2008 10:32:28 +0000 |
parents | fe061009029d |
children | 1b1e2297e2fc |
line wrap: on
line diff
--- a/mde/content/Items.d Sat Dec 13 12:54:43 2008 +0000 +++ b/mde/content/Items.d Fri Dec 19 10:32:28 2008 +0000 @@ -21,7 +21,7 @@ import mde.content.Content; import mde.gui.exception; -import mde.imde; +import imde = mde.imde; import mde.lookup.Options; import mde.lookup.Translation; @@ -59,8 +59,10 @@ } } else if (h == "imde") { h = head (item); - if (h == "quit" && item is null) - return quit; + if (h == "menu" && item is null) + return imde.menu; + else if (h == "quit" && item is null) + return imde.quit; } throw new ContentItemException (h); } @@ -109,8 +111,10 @@ } // Translate imde: + trle = Translation.get ("imde").getStruct ("menu"); + imde.menu.name (trle.name, trle.desc); trle = Translation.get ("imde").getStruct ("quit"); - quit.name (trle.name, trle.desc); + imde.quit.name (trle.name, trle.desc); currentL10n = miscOpts.L10n(); }