summaryrefslogtreecommitdiff
path: root/src/widget.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-18 01:06:48 +0000
committerrubidium <rubidium@openttd.org>2009-03-18 01:06:48 +0000
commit35e4dc0f4bab5b7aca2ad6b1ec9914d88a576c06 (patch)
treee401e9db6202abee756661f34326d20ac3df4ca8 /src/widget.cpp
parentc0a44985180acc6c85c4e1f53a80d1f011bb4f7a (diff)
downloadopenttd-35e4dc0f4bab5b7aca2ad6b1ec9914d88a576c06.tar.xz
(svn r15760) -Codechange [FS#2704]: support that the resize box is at the left side of the window too (based on work by Alberth)
Diffstat (limited to 'src/widget.cpp')
-rw-r--r--src/widget.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index ce4f4f160..2643eb9e3 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -451,7 +451,11 @@ void Window::DrawWidgets() const
clicked = !!(this->flags4 & WF_SIZING);
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->colour, (clicked) ? FR_LOWERED : FR_NONE);
- DrawSprite(SPR_WINDOW_RESIZE, PAL_NONE, r.left + 3 + clicked, r.top + 3 + clicked);
+ if (wi->left < (this->width / 2)) {
+ DrawSprite(SPR_WINDOW_RESIZE_LEFT, PAL_NONE, r.left + 2, r.top + 3 + clicked);
+ } else {
+ DrawSprite(SPR_WINDOW_RESIZE_RIGHT, PAL_NONE, r.left + 3 + clicked, r.top + 3 + clicked);
+ }
break;
case WWT_CLOSEBOX: {