* Makes the facility selector blink. */
| 309 | * Makes the facility selector blink. |
| 310 | */ |
| 311 | void BaseView::blink() |
| 312 | { |
| 313 | _blink = !_blink; |
| 314 | |
| 315 | if (_selSize > 0) |
| 316 | { |
| 317 | SDL_Rect r; |
| 318 | if (_blink) |
| 319 | { |
| 320 | r.w = _selector->getWidth(); |
| 321 | r.h = _selector->getHeight(); |
| 322 | r.x = 0; |
| 323 | r.y = 0; |
| 324 | _selector->drawRect(&r, Palette::blockOffset(1)); |
| 325 | r.w -= 2; |
| 326 | r.h -= 2; |
| 327 | r.x++; |
| 328 | r.y++; |
| 329 | _selector->drawRect(&r, 0); |
| 330 | } |
| 331 | else |
| 332 | { |
| 333 | r.w = _selector->getWidth(); |
| 334 | r.h = _selector->getHeight(); |
| 335 | r.x = 0; |
| 336 | r.y = 0; |
| 337 | _selector->drawRect(&r, 0); |
| 338 | } |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | /** |
| 343 | * Draws the view of all the facilities in the base, connectors |