Mercurial > projects > mde
comparison mde/content/Items.d @ 132:264028f4115a
Cleaned up mde.imde and a couple of widget functions.
New mde.menus module to add default menus.
The input singleton is now created in mde.input.Input instead of mde.imde.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Fri, 23 Jan 2009 14:59:05 +0000 |
parents | 41582439a42b |
children |
comparison
equal
deleted
inserted
replaced
131:9cff74f68b84 | 132:264028f4115a |
---|---|
58 if (q && item is null) // enforce item is an exact match | 58 if (q && item is null) // enforce item is an exact match |
59 return *q; | 59 return *q; |
60 } | 60 } |
61 } else if (h == "imde") { | 61 } else if (h == "imde") { |
62 h = head (item); | 62 h = head (item); |
63 if (h == "menu" && item is null) | 63 if (h == "menus" && item is null) |
64 return imde.menu; | 64 return imde.menus; |
65 else if (h == "quit" && item is null) | |
66 return imde.quit; | |
67 } else if (h == "dynamic") { | 65 } else if (h == "dynamic") { |
68 auto i = head (item) in items; | 66 auto i = head (item) in items; |
69 if (i) return *i; | 67 if (i) return *i; |
70 } | 68 } |
71 | 69 |
115 } | 113 } |
116 } | 114 } |
117 | 115 |
118 // Translate imde: | 116 // Translate imde: |
119 trl = Translation.get ("imde"); | 117 trl = Translation.get ("imde"); |
120 trle = trl.getStruct ("menu"); | 118 trle = trl.getStruct ("menus"); |
121 imde.menu.name (trle.name, trle.desc); | 119 imde.menus.name (trle.name, trle.desc); |
122 trle = trl.getStruct ("quit"); | |
123 imde.quit.name (trle.name, trle.desc); | |
124 | 120 |
125 // Translate dynamic content: | 121 // Translate dynamic content: |
126 if (items.length) { | 122 if (items.length) { |
127 trl = Translation.get ("dynamic"); | 123 trl = Translation.get ("dynamic"); |
128 foreach (n,item; items) { | 124 foreach (n,item; items) { |