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

Method ArticleStateText

src/Ufopaedia/ArticleStateText.cpp:34–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32{
33
34 ArticleStateText::ArticleStateText(Game *game, ArticleDefinitionText *defs) : ArticleState(game, defs->id)
35 {
36 // add screen elements
37 _txtTitle = new Text(296, 17, 5, 23);
38 _txtInfo = new Text(296, 150, 10, 48);
39
40 // Set palette
41 setPalette("PAL_UFOPAEDIA");
42
43 ArticleState::initLayout();
44
45 // add other elements
46 add(_txtTitle);
47 add(_txtInfo);
48
49 centerAllSurfaces();
50
51 // Set up objects
52 _game->getResourcePack()->getSurface("BACK10.SCR")->blit(_bg);
53 _btnOk->setColor(Palette::blockOffset(5));
54 _btnPrev->setColor(Palette::blockOffset(5));
55 _btnNext->setColor(Palette::blockOffset(5));
56
57 _txtTitle->setColor(Palette::blockOffset(15)+4);
58 _txtTitle->setBig();
59 _txtTitle->setText(tr(defs->title));
60
61 _txtInfo->setColor(Palette::blockOffset(15)-1);
62 _txtInfo->setWordWrap(true);
63 _txtInfo->setText(tr(defs->text));
64 }
65
66 ArticleStateText::~ArticleStateText()
67 {}

Callers

nothing calls this directly

Calls 7

blitMethod · 0.45
getSurfaceMethod · 0.45
getResourcePackMethod · 0.45
setColorMethod · 0.45
setBigMethod · 0.45
setTextMethod · 0.45
setWordWrapMethod · 0.45

Tested by

no test coverage detected