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

Method TextEdit

src/Interface/TextEdit.cpp:37–45  ·  view source on GitHub ↗

* Sets up a blank text edit with the specified size and position. * @param state Pointer to state the text edit belongs to. * @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

35 * @param y Y position in pixels.
36 */
37TextEdit::TextEdit(State *state, int width, int height, int x, int y) : InteractiveSurface(width, height, x, y), _value(L""), _blink(true), _modal(true), _ascii(L'A'), _caretPos(0), _numerical(false), _change(0), _state(state)
38{
39 _isFocused = false;
40 _text = new Text(width, height, 0, 0);
41 _timer = new Timer(100);
42 _timer->onTimer((SurfaceHandler)&TextEdit::blink);
43 _caret = new Text(16, 17, 0, 0);
44 _caret->setText(L"|");
45}
46
47/**
48 * Deletes contents.

Callers

nothing calls this directly

Calls 2

onTimerMethod · 0.80
setTextMethod · 0.45

Tested by

no test coverage detected