src/train_gui.cpp
changeset 9324 bf9cc84b889d
parent 9282 2bb9703aeb39
child 9346 6ef92fad565e
equal deleted inserted replaced
9323:9bc423363f6a 9324:bf9cc84b889d
    96 				DrawSprite(v->GetImage(DIR_W), pal, 16 + WagonLengthToPixels(dx), 7 + (is_custom_sprite(RailVehInfo(v->engine_type)->image_index) ? _traininfo_vehicle_pitch : 0));
    96 				DrawSprite(v->GetImage(DIR_W), pal, 16 + WagonLengthToPixels(dx), 7 + (is_custom_sprite(RailVehInfo(v->engine_type)->image_index) ? _traininfo_vehicle_pitch : 0));
    97 				if (v->index == selection) {
    97 				if (v->index == selection) {
    98 					/* Set the highlight position */
    98 					/* Set the highlight position */
    99 					highlight_l = WagonLengthToPixels(dx) + 1;
    99 					highlight_l = WagonLengthToPixels(dx) + 1;
   100 					highlight_r = WagonLengthToPixels(dx + width) + 1;
   100 					highlight_r = WagonLengthToPixels(dx + width) + 1;
       
   101 				} else if (_cursor.vehchain && highlight_r != 0) {
       
   102 					highlight_r += WagonLengthToPixels(width);
   101 				}
   103 				}
   102 			}
   104 			}
   103 		}
   105 		}
   104 		dx += width;
   106 		dx += width;
   105 
   107