diff options
author | rubidium <rubidium@openttd.org> | 2009-02-09 02:33:10 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-02-09 02:33:10 +0000 |
commit | 90e2465d7d2c770707feeaebfebbe56bd76383f1 (patch) | |
tree | aa639d9f07d77989dca1ce7b2cf1a57a95a43c69 /src/widget.cpp | |
parent | 030f52e998b176087de5ad5f6b5c47a7e348bf16 (diff) | |
download | openttd-90e2465d7d2c770707feeaebfebbe56bd76383f1.tar.xz |
(svn r15427) -Codechange: give w->caption_color a more sensible name as it holds the owner of whatever is shown in the window
Diffstat (limited to 'src/widget.cpp')
-rw-r--r-- | src/widget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widget.cpp b/src/widget.cpp index 45c928c8f..7684e0cef 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -468,10 +468,10 @@ void Window::DrawWidgets() const case WWT_CAPTION: assert(r.bottom - r.top == 13); // To ensure the same sizes are used everywhere! DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->colour, FR_BORDERONLY); - DrawFrameRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, wi->colour, (this->caption_color == 0xFF) ? FR_LOWERED | FR_DARKENED : FR_LOWERED | FR_DARKENED | FR_BORDERONLY); + DrawFrameRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, wi->colour, (this->owner == INVALID_OWNER) ? FR_LOWERED | FR_DARKENED : FR_LOWERED | FR_DARKENED | FR_BORDERONLY); - if (this->caption_color != 0xFF) { - GfxFillRect(r.left + 2, r.top + 2, r.right - 2, r.bottom - 2, _colour_gradient[_company_colours[this->caption_color]][4]); + if (this->owner != INVALID_OWNER) { + GfxFillRect(r.left + 2, r.top + 2, r.right - 2, r.bottom - 2, _colour_gradient[_company_colours[this->owner]][4]); } DrawStringCenteredTruncated(r.left + 2, r.right - 2, r.top + 2, wi->data, TC_FROMSTRING); |