equal
deleted
inserted
replaced
20 #include "spritecache.h" |
20 #include "spritecache.h" |
21 #include "strings_func.h" |
21 #include "strings_func.h" |
22 #include "window_func.h" |
22 #include "window_func.h" |
23 #include "vehicle_func.h" |
23 #include "vehicle_func.h" |
24 #include "player_func.h" |
24 #include "player_func.h" |
|
25 #include "order_func.h" |
25 |
26 |
26 #include "table/strings.h" |
27 #include "table/strings.h" |
27 #include "table/sprites.h" |
28 #include "table/sprites.h" |
28 |
29 |
29 /* |
30 /* |
438 int image = v->GetImage(DIR_W); |
439 int image = v->GetImage(DIR_W); |
439 |
440 |
440 WP(w, depot_d).sel = v->index; |
441 WP(w, depot_d).sel = v->index; |
441 SetWindowDirty(w); |
442 SetWindowDirty(w); |
442 SetObjectToPlaceWnd(image, GetVehiclePalette(v), VHM_DRAG, w); |
443 SetObjectToPlaceWnd(image, GetVehiclePalette(v), VHM_DRAG, w); |
|
444 _cursor.vehchain = _ctrl_pressed; |
443 } |
445 } |
444 } |
446 } |
445 break; |
447 break; |
446 |
448 |
447 case MODE_SHOW_VEHICLE: // show info window |
449 case MODE_SHOW_VEHICLE: // show info window |
954 break; |
956 break; |
955 default: |
957 default: |
956 WP(w, depot_d).sel = INVALID_VEHICLE; |
958 WP(w, depot_d).sel = INVALID_VEHICLE; |
957 SetWindowDirty(w); |
959 SetWindowDirty(w); |
958 } |
960 } |
|
961 _cursor.vehchain = false; |
959 break; |
962 break; |
960 |
963 |
961 case WE_RESIZE: |
964 case WE_RESIZE: |
962 w->vscroll.cap += e->we.sizing.diff.y / (int)w->resize.step_height; |
965 w->vscroll.cap += e->we.sizing.diff.y / (int)w->resize.step_height; |
963 w->hscroll.cap += e->we.sizing.diff.x / (int)w->resize.step_width; |
966 w->hscroll.cap += e->we.sizing.diff.x / (int)w->resize.step_width; |
964 w->widget[DEPOT_WIDGET_MATRIX].data = (w->vscroll.cap << 8) + (WP(w, depot_d).type == VEH_TRAIN ? 1 : w->hscroll.cap); |
967 w->widget[DEPOT_WIDGET_MATRIX].data = (w->vscroll.cap << 8) + (WP(w, depot_d).type == VEH_TRAIN ? 1 : w->hscroll.cap); |
965 ResizeDepotButtons(w); |
968 ResizeDepotButtons(w); |
|
969 break; |
|
970 |
|
971 case WE_CTRL_CHANGED: |
|
972 if (WP(w, depot_d).sel != INVALID_VEHICLE) { |
|
973 _cursor.vehchain = _ctrl_pressed; |
|
974 w->InvalidateWidget(DEPOT_WIDGET_MATRIX); |
|
975 } |
966 break; |
976 break; |
967 } |
977 } |
968 } |
978 } |
969 |
979 |
970 /** Opens a depot window |
980 /** Opens a depot window |