comparison mde/gui/widget/TextWidget.d @ 112:fe061009029d

EnumContent; log level can be selected from a popup list. New EnumContent, with code to load translations in Items. Editable as an AStringContent. Hacked OptionsMisc to use an EnumContent. Implemented a EnumContentWidget providing a pop-up list to select from (still needs improving). Moved IContent to its own module. ContentExceptions thrown via WDCCheck now. Fixed a small bug with reloading translations.
author Diggory Hardy <diggory.hardy@gmail.com>
date Sat, 13 Dec 2008 12:54:43 +0000
parents 1655693702fc
children b16a534f5302
comparison
equal deleted inserted replaced
111:1655693702fc 112:fe061009029d
83 83
84 /// Basic widget displaying a label from a content. 84 /// Basic widget displaying a label from a content.
85 class ContentLabelWidget : ATextWidget 85 class ContentLabelWidget : ATextWidget
86 { 86 {
87 this (IWidgetManager mgr, widgetID id, WidgetData data, IContent c) { 87 this (IWidgetManager mgr, widgetID id, WidgetData data, IContent c) {
88 WDCheck (data, 3, 0); 88 content = c;
89 content = c; 89 WDCCheck (data, 3, 0, content);
90 if (!content) throw new ContentException ();
91 index = data.ints[1]; 90 index = data.ints[1];
92 adapter = mgr.renderer.getAdapter (data.ints[2]); 91 adapter = mgr.renderer.getAdapter (data.ints[2]);
93 super (mgr, id,data); 92 super (mgr, id,data);
94 } 93 }
95 94