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

Method FpsCounter

src/Interface/FpsCounter.cpp:38–48  ·  view source on GitHub ↗

* Creates a FPS counter of the specified size. * @param width Width in pixels. * @param height Height in pixels. * @param x X position in pixels. * @param y Y position in pixels. */

Source from the content-addressed store, hash-verified

36 * @param y Y position in pixels.
37 */
38FpsCounter::FpsCounter(int width, int height, int x, int y) : Surface(width, height, x, y), _frames(0)
39{
40 _visible = Options::fpsCounter;
41
42 _timer = new Timer(1000);
43 _timer->onTimer((SurfaceHandler)&FpsCounter::update);
44 _timer->start();
45
46 _text = new NumberText(width, height, x, y);
47 setColor(Palette::blockOffset(15)+12);
48}
49
50/**
51 * Deletes FPS counter content.

Callers

nothing calls this directly

Calls 2

onTimerMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected