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

Method TextButton

src/Interface/TextButton.cpp:40–47  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

38 * @param y Y position in pixels.
39 */
40TextButton::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.

Callers

nothing calls this directly

Calls 4

setSmallMethod · 0.45
setAlignMethod · 0.45
setVerticalAlignMethod · 0.45
setWordWrapMethod · 0.45

Tested by

no test coverage detected