* 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. */
| 33 | * @param y Y position in pixels. |
| 34 | */ |
| 35 | WarningMessage::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. |
nothing calls this directly
no test coverage detected