* Sets up a text button with the specified size and position. * The text is centered on the button. * @param width Width in pixels. * @param height Height in pixels. * @param x X position in pixels. * @param y Y position in pixels. */
| 38 | * @param y Y position in pixels. |
| 39 | */ |
| 40 | TextButton::TextButton(int width, int height, int x, int y) : InteractiveSurface(width, height, x, y), _color(0), _group(0), _contrast(false), _comboBox(0) |
| 41 | { |
| 42 | _text = new Text(width, height, 0, 0); |
| 43 | _text->setSmall(); |
| 44 | _text->setAlign(ALIGN_CENTER); |
| 45 | _text->setVerticalAlign(ALIGN_MIDDLE); |
| 46 | _text->setWordWrap(true); |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * Deletes the contained Text. |
nothing calls this directly
no test coverage detected