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

Method WarningMessage

src/Battlescape/WarningMessage.cpp:35–47  ·  view source on GitHub ↗

* Sets up a blank warning message with the specified size and position. * @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

33 * @param y Y position in pixels.
34 */
35WarningMessage::WarningMessage(int width, int height, int x, int y) : Surface(width, height, x, y), _color(0), _fade(0)
36{
37 _text = new Text(width, height, 0, 0);
38 _text->setHighContrast(true);
39 _text->setAlign(ALIGN_CENTER);
40 _text->setVerticalAlign(ALIGN_MIDDLE);
41 _text->setWordWrap(true);
42
43 _timer = new Timer(50);
44 _timer->onTimer((SurfaceHandler)&WarningMessage::fade);
45
46 setVisible(false);
47}
48
49/**
50 * Deletes timers.

Callers

nothing calls this directly

Calls 5

onTimerMethod · 0.80
setHighContrastMethod · 0.45
setAlignMethod · 0.45
setVerticalAlignMethod · 0.45
setWordWrapMethod · 0.45

Tested by

no test coverage detected