* Minimizes the dogfight window. * @param action Pointer to an action. */
| 1272 | * @param action Pointer to an action. |
| 1273 | */ |
| 1274 | void DogfightState::btnMinimizeClick(Action *) |
| 1275 | { |
| 1276 | if (!_ufo->isCrashed() && !_craft->isDestroyed() && !_ufoBreakingOff) |
| 1277 | { |
| 1278 | if (_currentDist >= STANDOFF_DIST) |
| 1279 | { |
| 1280 | setMinimized(true); |
| 1281 | _window->setVisible(false); |
| 1282 | _preview->setVisible(false); |
| 1283 | _btnStandoff->setVisible(false); |
| 1284 | _btnCautious->setVisible(false); |
| 1285 | _btnStandard->setVisible(false); |
| 1286 | _btnAggressive->setVisible(false); |
| 1287 | _btnDisengage->setVisible(false); |
| 1288 | _btnUfo->setVisible(false); |
| 1289 | _btnMinimize->setVisible(false); |
| 1290 | _battle->setVisible(false); |
| 1291 | _weapon1->setVisible(false); |
| 1292 | _range1->setVisible(false); |
| 1293 | _weapon2->setVisible(false); |
| 1294 | _range2->setVisible(false); |
| 1295 | _damage->setVisible(false); |
| 1296 | _txtAmmo1->setVisible(false); |
| 1297 | _txtAmmo2->setVisible(false); |
| 1298 | _txtDistance->setVisible(false); |
| 1299 | _preview->setVisible(false); |
| 1300 | _txtStatus->setVisible(false); |
| 1301 | _btnMinimizedIcon->setVisible(true); |
| 1302 | _txtInterceptionNumber->setVisible(true); |
| 1303 | _ufoEscapeTimer->stop(); |
| 1304 | } |
| 1305 | else |
| 1306 | { |
| 1307 | setStatus("STR_MINIMISE_AT_STANDOFF_RANGE_ONLY"); |
| 1308 | } |
| 1309 | } |
| 1310 | } |
| 1311 | |
| 1312 | /** |
| 1313 | * Switches to Standoff mode (maximum range). |
nothing calls this directly
no test coverage detected