Mercurial > projects > mde
diff mde/gui/widget/TextWidget.d @ 110:6acd96f8685f
Translation reloading as far as AContent name/desc supported. Limited & crude support for updating gui.
Gave AContent support for multiple callbacks.
New locale: "en".
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Fri, 05 Dec 2008 11:29:39 +0000 |
parents | 08651e8a8c51 |
children | 1655693702fc |
line wrap: on
line diff
--- a/mde/gui/widget/TextWidget.d Thu Dec 04 10:32:20 2008 +0000 +++ b/mde/gui/widget/TextWidget.d Fri Dec 05 11:29:39 2008 +0000 @@ -44,6 +44,14 @@ super (mgr, id, data); } + bool reloadStrings () { + adapter.getDimensions (mw, mh); + bool r = (mw != w || mh != h) ? true : false; + w = mw; + h = mh; + return true; + } + void draw () { super.draw(); adapter.draw (x,y); @@ -82,6 +90,11 @@ super (mgr, id,data); } + bool reloadStrings () { + adapter.text = content.toString(index); + return super.reloadStrings; + } + protected: IContent content; int index;