summaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-07-08 22:25:24 +0000
committertron <tron@openttd.org>2005-07-08 22:25:24 +0000
commit1b4a0897b6944910edaeb8f34769a092110c0a0c (patch)
tree7b435600d289220b369f3d759ca520553f411357 /window.c
parent83f72f696a3ce82eea4cfcbbbdbf35b0823492e3 (diff)
downloadopenttd-1b4a0897b6944910edaeb8f34769a092110c0a0c.tar.xz
(svn r2535) Tabs
Diffstat (limited to 'window.c')
-rw-r--r--window.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/window.c b/window.c
index e069cbedf..51e36ffdf 100644
--- a/window.c
+++ b/window.c
@@ -155,7 +155,7 @@ void DrawOverlappedWindow(Window *w, int left, int top, int right, int bottom)
while (++v != _last_window) {
if (right > v->left &&
- bottom > v->top &&
+ bottom > v->top &&
left < v->left + v->width &&
top < v->top + v->height) {
@@ -660,13 +660,13 @@ Window *AllocateWindowDesc(const WindowDesc *desc)
if (pt.x > _screen.width + 10 - desc->width)
pt.x = (_screen.width + 10 - desc->width) - 20;
pt.y = w->top + 10;
- } else if (desc->cls == WC_BUILD_TOOLBAR) { // open Build Toolbars aligned
+ } else if (desc->cls == WC_BUILD_TOOLBAR) { // open Build Toolbars aligned
/* Override the position if a toolbar is opened according to the place of the maintoolbar
* The main toolbar (WC_MAIN_TOOLBAR) is 640px in width */
switch (_patches.toolbar_pos) {
- case 1: pt.x = ((_screen.width + 640) >> 1) - desc->width; break;
- case 2: pt.x = _screen.width - desc->width; break;
- default: pt.x = 640 - desc->width;
+ case 1: pt.x = ((_screen.width + 640) >> 1) - desc->width; break;
+ case 2: pt.x = _screen.width - desc->width; break;
+ default: pt.x = 640 - desc->width;
}
pt.y = desc->top;
} else {
@@ -1641,9 +1641,9 @@ int PositionMainToolbar(Window *w)
w = FindWindowById(WC_MAIN_TOOLBAR, 0);
switch (_patches.toolbar_pos) {
- case 1: w->left = (_screen.width - w->width) >> 1; break;
- case 2: w->left = _screen.width - w->width; break;
- default: w->left = 0;
+ case 1: w->left = (_screen.width - w->width) >> 1; break;
+ case 2: w->left = _screen.width - w->width; break;
+ default: w->left = 0;
}
SetDirtyBlocks(0, 0, _screen.width, w->height); // invalidate the whole top part
return w->left;