comparison mde/gui/widget/miscWidgets.d @ 137:9f035cd139c6

BIG commit. Major change: old Options class is gone, all content values are loaded and saved automatically. All options updated to reflect this, some changed. Content restrutured a lot: New IContent module, Content module includes more functionality. New ContentLoader module to manage content loading/saving/translation. Translation module moved to content dir and cut down to reflect current usage. File format unchanged except renames: FontOptions -> Font, VideoOptions -> Screen. Font render mode and LCD filter options are now enums. GUI loading needs to create content (and set type for enums), but doesn't save/load value. Some setup of mainSchedule moved to mde.mainLoop. Content callbacks are called on content change now. ContentLists are set up implicitly from content symbols. Not as fast but much easier! Bug-fix in the new MTTagReader. Renamed MT *Reader maker functions to avoid confusion in paths.d. New mde.setup.logger module to allow logger setup before any other module's static this().
author Diggory Hardy <diggory.hardy@gmail.com>
date Sat, 07 Feb 2009 12:46:03 +0000
parents 9cff74f68b84
children 0dd49f333189
comparison
equal deleted inserted replaced
136:4084f07f2c7a 137:9f035cd139c6
17 module mde.gui.widget.miscWidgets; 17 module mde.gui.widget.miscWidgets;
18 18
19 import mde.gui.widget.AChildWidget; 19 import mde.gui.widget.AChildWidget;
20 import mde.gui.exception; 20 import mde.gui.exception;
21 import mde.gui.renderer.IRenderer; 21 import mde.gui.renderer.IRenderer;
22 import mde.content.IContent;
22 23
23 import tango.util.log.Log : Log, Logger; 24 import tango.util.log.Log : Log, Logger;
24 25
25 private Logger logger; 26 private Logger logger;
26 static this () { 27 static this () {
58 } 59 }
59 60
60 /// A debug widget. Essentially as SizableBlankWidget but doesn't mind any amount of data and prints it. 61 /// A debug widget. Essentially as SizableBlankWidget but doesn't mind any amount of data and prints it.
61 class DebugWidget : SizableWidget 62 class DebugWidget : SizableWidget
62 { 63 {
63 this (IWidgetManager mgr, IParentWidget parent, widgetID id, WidgetData data) { 64 this (IWidgetManager mgr, IParentWidget parent, widgetID id, WidgetData data, IContent c) {
64 super (mgr, parent, id); 65 super (mgr, parent, id);
65 logger.warn ("Debug widget ({}); parameters: ints = {}, strings = {}", id, data.ints, data.strings); 66 logger.warn ("Debug widget ({}); parameters: ints = {}, strings = {}; content: {}", id, data.ints, data.strings, c);
66 } 67 }
67 68
68 override void draw () { 69 override void draw () {
69 super.draw; 70 super.draw;
70 71