Mercurial > projects > mde
comparison mde/gui/widget/contentFunctions.d @ 143:2ac3e0012788
Added a simple Slider widget.
Moved SwitchWidget into PopupMenuWidget's module and renamed the module ParentContent.
Made editContent create DisplayContentWidgets for DebugContent (instead of ButtonContentWidgets).
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Mon, 09 Feb 2009 23:27:41 +0000 |
parents | 3468e9bfded1 |
children | 24d77c52243f |
comparison
equal
deleted
inserted
replaced
142:9dabcc44f515 | 143:2ac3e0012788 |
---|---|
20 | 20 |
21 import mde.gui.exception; | 21 import mde.gui.exception; |
22 import mde.gui.widget.Ifaces; | 22 import mde.gui.widget.Ifaces; |
23 import mde.gui.widget.TextWidget; | 23 import mde.gui.widget.TextWidget; |
24 import mde.gui.widget.layout; | 24 import mde.gui.widget.layout; |
25 import mde.gui.widget.PopupMenu; | 25 import mde.gui.widget.ParentContent; |
26 import mde.gui.widget.miscContent; | 26 import mde.gui.widget.miscContent; |
27 | 27 |
28 import mde.content.AStringContent; | 28 import mde.content.AStringContent; |
29 import mde.content.miscContent; | |
29 | 30 |
30 /****************************************************************************** | 31 /****************************************************************************** |
31 * A function which uses Items.get (data.strings[0]) to get a content and | 32 * A function which uses Items.get (data.strings[0]) to get a content and |
32 * creates a widget from data.ints[1]. The first item in each ints and strings | 33 * creates a widget from data.ints[1]. The first item in each ints and strings |
33 * is removed before passing data to the new widget. | 34 * is removed before passing data to the new widget. |
55 return new AStringContentWidget(mgr,parent,id,data,c); | 56 return new AStringContentWidget(mgr,parent,id,data,c); |
56 } | 57 } |
57 if (cast(IContentList) c) | 58 if (cast(IContentList) c) |
58 return new ContentListWidget(mgr,parent,id,data,c); | 59 return new ContentListWidget(mgr,parent,id,data,c); |
59 // Normally only EventContents are used for buttons, but any Content can be: | 60 // Normally only EventContents are used for buttons, but any Content can be: |
60 if (cast(Content) c) | 61 if (cast(EventContent) c) |
61 return new ButtonContentWidget(mgr,parent,id,data,c); | 62 return new ButtonContentWidget(mgr,parent,id,data,c); |
62 // generic uneditable option | 63 // generic uneditable option |
63 return new DisplayContentWidget(mgr,parent,id,data,c); | 64 return new DisplayContentWidget(mgr,parent,id,data,c); |
64 } | 65 } |
65 | 66 |