diff options
author | peter1138 <peter1138@openttd.org> | 2005-12-14 08:05:36 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2005-12-14 08:05:36 +0000 |
commit | db78ce622dac046f015e13cb47c8a6bd07b520b8 (patch) | |
tree | 18ce3d5422993edd9291e2c660d35f4d844e77da /widget.c | |
parent | 82542799e2e9bd03271e606b223b331e2c57ac4b (diff) | |
download | openttd-db78ce622dac046f015e13cb47c8a6bd07b520b8.tar.xz |
(svn r3302) - Fix: split drawing of text buttons and the closebox, so the closebox symbol can be centred.
Diffstat (limited to 'widget.c')
-rw-r--r-- | widget.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -191,7 +191,7 @@ void DrawWindowWidgets(const Window *w) goto draw_default; } - case WWT_CLOSEBOX: /* WWT_TEXTBTN */ + case WWT_TEXTBTN: /* WWT_TEXTBTN */ case WWT_4: { DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : 0); } @@ -410,6 +410,14 @@ void DrawWindowWidgets(const Window *w) break; } + case WWT_CLOSEBOX: { + assert(r.right - r.left == 10); // ensure the same sizes are used everywhere + + DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, 0); + DrawString(r.left + 2, r.top + 2, STR_00C5, 0); + break; + } + case WWT_CAPTION: { assert(r.bottom - r.top == 13); // XXX - to ensure the same sizes are used everywhere! DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, FR_BORDERONLY); |