(svn r7094) -Codechange: Get rid of the window-specific code in DoZoomInOutWindow (enable, disable

buttons depending on calling window, game-mode); handle it by broadcasting messages
 to the calling window, because that knows how and what buttons to set.
This commit is contained in:
Darkvater
2006-11-07 13:06:02 +00:00
parent e90bc1681f
commit 65e051fe93
5 changed files with 42 additions and 40 deletions

View File

@@ -1070,6 +1070,13 @@ static void ExtraViewPortWndProc(Window *w, WindowEvent *e)
case WE_MOUSEWHEEL:
ZoomInOrOutToCursorWindow(e->we.wheel.wheel < 0, w);
break;
case WE_MESSAGE:
/* Only handle zoom message if intended for us (msg ZOOM_IN/ZOOM_OUT) */
if (e->we.message.wparam != w->window_number) break;
HandleZoomMessage(w, w->viewport, 5, 6);
break;
}
}