Mercurial > projects > mde
diff mde/gui/renderer/IRenderer.d @ 99:5de5810e3516
Implemented an editable TextContent widget; it's now possible to edit text options using the GUI.
The widget supports moving the text entry-point using arrows and home/end, but there's no visual indicator or edit-point setting using the mouse.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Fri, 14 Nov 2008 12:44:32 +0000 |
parents | 30470bc19ca4 |
children | 0ea4a3e651ae |
line wrap: on
line diff
--- a/mde/gui/renderer/IRenderer.d Wed Nov 12 13:18:51 2008 +0000 +++ b/mde/gui/renderer/IRenderer.d Fri Nov 14 12:44:32 2008 +0000 @@ -87,10 +87,14 @@ * NOTE: currently inflexible. Could use (function) pointers, class interfaces or struct * interfaces when available to allow flexibility. */ struct TextAdapter { - void set (char[] c, int col) { + void setText (char[] c) { content = c; - colour = Colour (col); + textCache.cacheVer = -1; // force update } + + void setColour (int col = 0xFFFFFF) { + colour = Colour (col); + } void getDimensions (out wdsize w, out wdsize h) { font.updateBlock (content, textCache);