| 511 | bool VEquipScreen::isTransition() { return false; } |
| 512 | |
| 513 | void VEquipScreen::setSelectedVehicle(sp<Vehicle> vehicle) |
| 514 | { |
| 515 | if (!vehicle) |
| 516 | { |
| 517 | LogError("Trying to set invalid selected vehicle"); |
| 518 | return; |
| 519 | } |
| 520 | LogInfo("Selecting vehicle \"%s\"", vehicle->name); |
| 521 | this->selected = vehicle; |
| 522 | auto backgroundImage = vehicle->type->equipment_screen; |
| 523 | if (!backgroundImage) |
| 524 | { |
| 525 | LogError("Trying to view equipment screen of vehicle \"%s\" which has no equipment screen " |
| 526 | "background", |
| 527 | vehicle->type->name); |
| 528 | } |
| 529 | |
| 530 | auto backgroundControl = form->findControlTyped<Graphic>("BACKGROUND"); |
| 531 | backgroundControl->setImage(backgroundImage); |
| 532 | |
| 533 | this->paperDoll->setObject(vehicle); |
| 534 | } |
| 535 | |
| 536 | void VEquipScreen::setHighlightedSlotType(EquipmentSlotType type) |
| 537 | { |
no test coverage detected