| 32 | { |
| 33 | |
| 34 | ArticleStateTextImage::ArticleStateTextImage(Game *game, ArticleDefinitionTextImage *defs) : ArticleState(game, defs->id) |
| 35 | { |
| 36 | // add screen elements |
| 37 | _txtTitle = new Text(defs->text_width, 48, 5, 22); |
| 38 | |
| 39 | // Set palette |
| 40 | setPalette("PAL_UFOPAEDIA"); |
| 41 | |
| 42 | ArticleState::initLayout(); |
| 43 | |
| 44 | // add other elements |
| 45 | add(_txtTitle); |
| 46 | |
| 47 | // Set up objects |
| 48 | _game->getResourcePack()->getSurface(defs->image_id)->blit(_bg); |
| 49 | _btnOk->setColor(Palette::blockOffset(5)+3); |
| 50 | _btnPrev->setColor(Palette::blockOffset(5)+3); |
| 51 | _btnNext->setColor(Palette::blockOffset(5)+3); |
| 52 | |
| 53 | _txtTitle->setColor(Palette::blockOffset(15)+4); |
| 54 | _txtTitle->setBig(); |
| 55 | _txtTitle->setWordWrap(true); |
| 56 | _txtTitle->setText(tr(defs->title)); |
| 57 | |
| 58 | int text_height = _txtTitle->getTextHeight(); |
| 59 | |
| 60 | _txtInfo = new Text(defs->text_width, 162, 5, 23 + text_height); |
| 61 | add(_txtInfo); |
| 62 | |
| 63 | _txtInfo->setColor(Palette::blockOffset(15)-1); |
| 64 | _txtInfo->setWordWrap(true); |
| 65 | _txtInfo->setText(tr(defs->text)); |
| 66 | |
| 67 | centerAllSurfaces(); |
| 68 | } |
| 69 | |
| 70 | ArticleStateTextImage::~ArticleStateTextImage() |
| 71 | {} |
nothing calls this directly
no test coverage detected