diff options
author | rubidium <rubidium@openttd.org> | 2009-03-22 14:39:20 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-03-22 14:39:20 +0000 |
commit | 9038733f1aa4f3203b229ac6350833f5af5b016a (patch) | |
tree | 297239fff1bd8ddcea1c5fc7722ebca4d3e9f3e0 /src/widget.cpp | |
parent | 22d4270ea8664975384198353c40f4fc859dd5f1 (diff) | |
download | openttd-9038733f1aa4f3203b229ac6350833f5af5b016a.tar.xz |
(svn r15812) -Codechange: use the new DrawString API in another set of GUIs
Diffstat (limited to 'src/widget.cpp')
-rw-r--r-- | src/widget.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widget.cpp b/src/widget.cpp index 876723882..23e36d5ba 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -409,7 +409,7 @@ void Window::DrawWidgets() const const StringID str = wi->data; int x2 = r.left; // by default the left side is the left side of the widget - if (str != STR_NULL) x2 = DrawString(r.left + 6, r.top, str, TC_FROMSTRING); + if (str != STR_NULL) x2 = DrawString(r.left + 6, r.right - 6, r.top, str, TC_FROMSTRING); int c1 = _colour_gradient[wi->colour][3]; int c2 = _colour_gradient[wi->colour][7]; @@ -465,7 +465,7 @@ void Window::DrawWidgets() const assert(r.right - r.left == 10); // To ensure the same sizes are used everywhere DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->colour, FR_NONE); - DrawString(r.left + 2, r.top + 2, str, TC_FROMSTRING); + DrawString(r.left + 2, r.right, r.top + 2, str, TC_FROMSTRING); break; } @@ -487,7 +487,7 @@ void Window::DrawWidgets() const StringID str = wi->data; DrawFrameRect(r.left, r.top, r.right - 12, r.bottom, wi->colour, FR_NONE); DrawFrameRect(r.right - 11, r.top, r.right, r.bottom, wi->colour, clicked ? FR_LOWERED : FR_NONE); - DrawString(r.right - (clicked ? 8 : 9), r.top + (clicked ? 2 : 1), STR_0225, TC_BLACK); + DrawString(r.right - (clicked ? 8 : 9), r.right, r.top + (clicked ? 2 : 1), STR_0225, TC_BLACK); if (str != STR_NULL) DrawString(r.left + 2, r.right - 14, r.top + 1, str, TC_BLACK); break; } @@ -498,7 +498,7 @@ void Window::DrawWidgets() const StringID str = wi->data; DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->colour, FR_LOWERED | FR_DARKENED); DrawFrameRect(r.right - 11, r.top + 1, r.right - 1, r.bottom - 1, wi->colour, clicked ? FR_LOWERED : FR_NONE); - DrawString(r.right - (clicked ? 8 : 9), r.top + (clicked ? 2 : 1), STR_0225, TC_BLACK); + DrawString(r.right - (clicked ? 8 : 9), r.right, r.top + (clicked ? 2 : 1), STR_0225, TC_BLACK); if (str != STR_NULL) DrawString(r.left + 2, r.right - 13, r.top + 2, str, TC_BLACK); break; } |