282 ShowRoadVehDetailsWindow(v); |
284 ShowRoadVehDetailsWindow(v); |
283 break; |
285 break; |
284 } |
286 } |
285 } break; |
287 } break; |
286 |
288 |
|
289 case WE_RESIZE: |
|
290 w->viewport->width += e->sizing.diff.x; |
|
291 w->viewport->height += e->sizing.diff.y; |
|
292 w->viewport->virtual_width += e->sizing.diff.x; |
|
293 w->viewport->virtual_height += e->sizing.diff.y; |
|
294 break; |
|
295 |
287 case WE_DESTROY: |
296 case WE_DESTROY: |
288 DeleteWindowById(WC_VEHICLE_ORDERS, w->window_number); |
297 DeleteWindowById(WC_VEHICLE_ORDERS, w->window_number); |
289 DeleteWindowById(WC_VEHICLE_DETAILS, w->window_number); |
298 DeleteWindowById(WC_VEHICLE_DETAILS, w->window_number); |
290 break; |
299 break; |
291 } |
300 } |
292 } |
301 } |
293 |
302 |
294 static const Widget _roadveh_view_widgets[] = { |
303 static const Widget _roadveh_view_widgets[] = { |
295 { WWT_TEXTBTN, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, |
304 { WWT_TEXTBTN, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, |
296 { WWT_CAPTION, RESIZE_NONE, 14, 11, 237, 0, 13, STR_9002, STR_018C_WINDOW_TITLE_DRAG_THIS}, |
305 { WWT_CAPTION, RESIZE_RIGHT, 14, 11, 237, 0, 13, STR_9002, STR_018C_WINDOW_TITLE_DRAG_THIS }, |
297 { WWT_STICKYBOX, RESIZE_NONE, 14, 238, 249, 0, 13, 0x0, STR_STICKY_BUTTON}, |
306 { WWT_STICKYBOX, RESIZE_LR, 14, 238, 249, 0, 13, 0x0, STR_STICKY_BUTTON }, |
298 { WWT_IMGBTN, RESIZE_NONE, 14, 0, 231, 14, 103, 0x0, STR_NULL}, |
307 { WWT_IMGBTN, RESIZE_RB, 14, 0, 231, 14, 103, 0x0, STR_NULL }, |
299 { WWT_6, RESIZE_NONE, 14, 2, 229, 16, 101, 0x0, STR_NULL}, |
308 { WWT_6, RESIZE_RB, 14, 2, 229, 16, 101, 0x0, STR_NULL }, |
300 { WWT_PUSHIMGBTN, RESIZE_NONE, 14, 0, 249, 104, 115, 0x0, STR_901C_CURRENT_VEHICLE_ACTION}, |
309 { WWT_PUSHIMGBTN, RESIZE_RTB, 14, 0, 237, 104, 115, 0x0, STR_901C_CURRENT_VEHICLE_ACTION }, |
301 { WWT_PUSHIMGBTN, RESIZE_NONE, 14, 232, 249, 14, 31, 0x2AB, STR_901E_CENTER_MAIN_VIEW_ON_VEHICLE}, |
310 { WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 14, 31, 0x2AB, STR_901E_CENTER_MAIN_VIEW_ON_VEHICLE }, |
302 { WWT_PUSHIMGBTN, RESIZE_NONE, 14, 232, 249, 32, 49, 0x2AE, STR_901F_SEND_VEHICLE_TO_DEPOT}, |
311 { WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, 0x2AE, STR_901F_SEND_VEHICLE_TO_DEPOT }, |
303 { WWT_PUSHIMGBTN, RESIZE_NONE, 14, 232, 249, 50, 67, 0x2CB, STR_9020_FORCE_VEHICLE_TO_TURN_AROUND}, |
312 { WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 50, 67, 0x2CB, STR_9020_FORCE_VEHICLE_TO_TURN_AROUND }, |
304 { WWT_PUSHIMGBTN, RESIZE_NONE, 14, 232, 249, 68, 85, 0x2B2, STR_901D_SHOW_VEHICLE_S_ORDERS}, |
313 { WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 68, 85, 0x2B2, STR_901D_SHOW_VEHICLE_S_ORDERS }, |
305 { WWT_PUSHIMGBTN, RESIZE_NONE, 14, 232, 249, 86, 103, 0x2B3, STR_9021_SHOW_ROAD_VEHICLE_DETAILS}, |
314 { WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 86, 103, 0x2B3, STR_9021_SHOW_ROAD_VEHICLE_DETAILS }, |
306 { WIDGETS_END}, |
315 { WWT_PANEL, RESIZE_LRB, 14, 232, 249, 104, 103, 0x0, STR_NULL }, |
|
316 { WWT_RESIZEBOX, RESIZE_LRTB, 14, 238, 249, 104, 115, 0x0, STR_NULL }, |
|
317 { WIDGETS_END } |
307 }; |
318 }; |
308 |
319 |
309 static const WindowDesc _roadveh_view_desc = { |
320 static const WindowDesc _roadveh_view_desc = { |
310 -1,-1, 250, 116, |
321 -1,-1, 250, 116, |
311 WC_VEHICLE_VIEW,0, |
322 WC_VEHICLE_VIEW,0, |
312 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON, |
323 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE, |
313 _roadveh_view_widgets, |
324 _roadveh_view_widgets, |
314 RoadVehViewWndProc, |
325 RoadVehViewWndProc, |
315 }; |
326 }; |
316 |
327 |
317 void ShowRoadVehViewWindow(Vehicle *v) |
328 void ShowRoadVehViewWindow(Vehicle *v) |