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

Method NumberText

src/Interface/NumberText.cpp:33–180  ·  view source on GitHub ↗

* Sets up a blank number text. * @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

31 * @param y Y position in pixels.
32 */
33NumberText::NumberText(int width, int height, int x, int y) : Surface(width, height, x, y), _value(0), _color(0)
34{
35 _chars[0] = new Surface(3, 5);
36 _chars[0]->lock();
37 _chars[0]->setPixel(0, 0, 1);
38 _chars[0]->setPixel(1, 0, 1);
39 _chars[0]->setPixel(2, 0, 1);
40 _chars[0]->setPixel(0, 1, 1);
41 _chars[0]->setPixel(0, 2, 1);
42 _chars[0]->setPixel(0, 3, 1);
43 _chars[0]->setPixel(2, 1, 1);
44 _chars[0]->setPixel(2, 2, 1);
45 _chars[0]->setPixel(2, 3, 1);
46 _chars[0]->setPixel(0, 4, 1);
47 _chars[0]->setPixel(1, 4, 1);
48 _chars[0]->setPixel(2, 4, 1);
49 _chars[0]->unlock();
50
51 _chars[1] = new Surface(3, 5);
52 _chars[1]->lock();
53 _chars[1]->setPixel(1, 0, 1);
54 _chars[1]->setPixel(1, 1, 1);
55 _chars[1]->setPixel(1, 2, 1);
56 _chars[1]->setPixel(1, 3, 1);
57 _chars[1]->setPixel(0, 4, 1);
58 _chars[1]->setPixel(1, 4, 1);
59 _chars[1]->setPixel(2, 4, 1);
60 _chars[1]->setPixel(0, 1, 1);
61 _chars[1]->unlock();
62
63 _chars[2] = new Surface(3, 5);
64 _chars[2]->lock();
65 _chars[2]->setPixel(0, 0, 1);
66 _chars[2]->setPixel(1, 0, 1);
67 _chars[2]->setPixel(2, 0, 1);
68 _chars[2]->setPixel(2, 1, 1);
69 _chars[2]->setPixel(0, 2, 1);
70 _chars[2]->setPixel(1, 2, 1);
71 _chars[2]->setPixel(2, 2, 1);
72 _chars[2]->setPixel(0, 3, 1);
73 _chars[2]->setPixel(0, 4, 1);
74 _chars[2]->setPixel(1, 4, 1);
75 _chars[2]->setPixel(2, 4, 1);
76 _chars[2]->unlock();
77
78 _chars[3] = new Surface(3, 5);
79 _chars[3]->lock();
80 _chars[3]->setPixel(0, 0, 1);
81 _chars[3]->setPixel(1, 0, 1);
82 _chars[3]->setPixel(2, 0, 1);
83 _chars[3]->setPixel(2, 1, 1);
84 _chars[3]->setPixel(2, 2, 1);
85 _chars[3]->setPixel(2, 3, 1);
86 _chars[3]->setPixel(0, 2, 1);
87 _chars[3]->setPixel(1, 2, 1);
88 _chars[3]->setPixel(0, 4, 1);
89 _chars[3]->setPixel(1, 4, 1);
90 _chars[3]->setPixel(2, 4, 1);

Callers

nothing calls this directly

Calls 3

setPixelMethod · 0.80
unlockMethod · 0.80
lockMethod · 0.45

Tested by

no test coverage detected