MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / blink

Method blink

src/Basescape/BaseView.cpp:311–340  ·  view source on GitHub ↗

* Makes the facility selector blink. */

Source from the content-addressed store, hash-verified

309 * Makes the facility selector blink.
310 */
311void 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

Callers

nothing calls this directly

Calls 3

drawRectMethod · 0.80
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected