(svn r9088) -Add : a new type of widget, called WWT_TEXT. It is a simple truncated string. It will be usefull on windows where lot of simple text is always drawn on the WE_PAINT event, making the code clearer. For now, left, right (total size of the window), top, color and data are necessary to use it. Maybe more features will be available soon.

This commit is contained in:
belugas
2007-03-10 03:25:15 +00:00
parent 8b2f9c8207
commit 8ef56794ab
2 changed files with 8 additions and 0 deletions

View File

@@ -235,6 +235,13 @@ void DrawWindowWidgets(const Window *w)
goto draw_default;
}
case WWT_TEXT: {
StringID str = wi->data;
if (str != STR_NULL) DrawStringTruncated(r.left, r.top, str, wi->color, r.right - r.left);
break;
}
case WWT_INSET: {
StringID str = wi->data;
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, FR_LOWERED | FR_DARKENED);