aircraft_gui.c
changeset 2517 b90693227193
parent 2498 befad2fe53d2
child 2548 97ada3bd2702
equal deleted inserted replaced
2516:b11f1229cefd 2517:b90693227193
    67 	uint32 ormod = SPRITE_PALETTE(PLAYER_SPRITE_COLOR(v->owner));
    67 	uint32 ormod = SPRITE_PALETTE(PLAYER_SPRITE_COLOR(v->owner));
    68 	if (v->vehstatus & VS_CRASHED)
    68 	if (v->vehstatus & VS_CRASHED)
    69 		ormod = PALETTE_CRASH;
    69 		ormod = PALETTE_CRASH;
    70 	DrawSprite(image | ormod, x+25, y+10);
    70 	DrawSprite(image | ormod, x+25, y+10);
    71 	if (v->subtype == 0)
    71 	if (v->subtype == 0)
    72 		DrawSprite(0xF3D, x+25, y+5);
    72 		DrawSprite(SPR_ROTOR_STOPPED, x + 25, y + 5);
    73 	if (v->index == selection) {
    73 	if (v->index == selection) {
    74 		DrawFrameRect(x-1, y-1, x+58, y+21, 0xF, FR_BORDERONLY);
    74 		DrawFrameRect(x-1, y-1, x+58, y+21, 0xF, FR_BORDERONLY);
    75 	}
    75 	}
    76 }
    76 }
    77 
    77 
   563 				break;
   563 				break;
   564 			}
   564 			}
   565 		}
   565 		}
   566 
   566 
   567 		/* draw the flag plus orders */
   567 		/* draw the flag plus orders */
   568 		DrawSprite(v->vehstatus & VS_STOPPED ? 0xC12 : 0xC13, 2, w->widget[5].top + 1);
   568 		DrawSprite(v->vehstatus & VS_STOPPED ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, 2, w->widget[5].top + 1);
   569 		DrawStringCenteredTruncated(w->widget[5].left + 8, w->widget[5].right, w->widget[5].top + 1, str, 0);
   569 		DrawStringCenteredTruncated(w->widget[5].left + 8, w->widget[5].right, w->widget[5].top + 1, str, 0);
   570 		DrawWindowViewport(w);
   570 		DrawWindowViewport(w);
   571 	} break;
   571 	} break;
   572 
   572 
   573 	case WE_CLICK: {
   573 	case WE_CLICK: {
   688 			DrawAircraftImage(v, x+12, y, WP(w,traindepot_d).sel);
   688 			DrawAircraftImage(v, x+12, y, WP(w,traindepot_d).sel);
   689 
   689 
   690 			SetDParam(0, v->unitnumber);
   690 			SetDParam(0, v->unitnumber);
   691 			DrawString(x, y+2, (uint16)(v->max_age-366) >= v->age ? STR_00E2 : STR_00E3, 0);
   691 			DrawString(x, y+2, (uint16)(v->max_age-366) >= v->age ? STR_00E2 : STR_00E3, 0);
   692 
   692 
   693 			DrawSprite( (v->vehstatus & VS_STOPPED) ? 0xC12 : 0xC13, x, y+12);
   693 			DrawSprite((v->vehstatus & VS_STOPPED) ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, x, y + 12);
   694 
   694 
   695 			if ((x+=74) == 2 + 74 * w->hscroll.cap) {
   695 			if ((x+=74) == 2 + 74 * w->hscroll.cap) {
   696 				x = 2;
   696 				x = 2;
   697 				y += 24;
   697 				y += 24;
   698 			}
   698 			}