forked from mirror/OpenTTD
(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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user