Mercurial > projects > mde
comparison mde/gui/widget/TextWidget.d @ 75:25cb7420dc91
A massive overhaul/rewrite for the gui's data management and setup code. Currently much that was working is broken.
imde's classes are created in a static this instead of mde's main.
gl setup code moved from gl/basic.d to gl/draw.d
mergetag.DefaultData: now HIGH_LOW priority instead of LOW_HIGH. Reduced type list to only used types; small fix for indent function.
setup.paths: new NoFileException thrown instead of MTFileIOException
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Mon, 28 Jul 2008 18:17:48 +0100 |
parents | 159775502bb4 |
children | 3dfd934100f7 |
comparison
equal
deleted
inserted
replaced
74:cee261eba249 | 75:25cb7420dc91 |
---|---|
66 * | 66 * |
67 * Widget uses the initialisation data: | 67 * Widget uses the initialisation data: |
68 * [widgetID, contentID, colour] | 68 * [widgetID, contentID, colour] |
69 * where contentID is an ID for the string ID of the contained content | 69 * where contentID is an ID for the string ID of the contained content |
70 * and colour is an 8-bit-per-channel RGB colour of the form 0xRRGGBB. */ | 70 * and colour is an 8-bit-per-channel RGB colour of the form 0xRRGGBB. */ |
71 this (IWindow wind, int[] data) { | 71 this (IWidgetManager mgr, WidgetData data) { |
72 if (data.length != 3) throw new WidgetDataException; | 72 if (data.length != 2) throw new WidgetDataException; |
73 text.set (wind.getWidgetString(data[1]), data[2]); | 73 text.set (data.str, data[1]); |
74 text.getDimensions (mw, mh); | 74 text.getDimensions (mw, mh); |
75 super (wind,data); | 75 super (mgr,data); |
76 } | 76 } |
77 | 77 |
78 void draw () { | 78 void draw () { |
79 super.draw(); | 79 super.draw(); |
80 text.draw (x,y); | 80 text.draw (x,y); |