* Initializes all the elements in the No Containment screen. * @param game Pointer to the core game. */
| 34 | * @param game Pointer to the core game. |
| 35 | */ |
| 36 | NoContainmentState::NoContainmentState(Game *game) : State(game) |
| 37 | { |
| 38 | // Create objects |
| 39 | _window = new Window(this, 320, 200, 0, 0); |
| 40 | _btnOk = new TextButton(120, 18, 100, 174); |
| 41 | _txtTitle = new Text(220, 64, 50, 8); |
| 42 | |
| 43 | // Set palette |
| 44 | setPalette("PAL_GEOSCAPE", 0); |
| 45 | |
| 46 | add(_window); |
| 47 | add(_btnOk); |
| 48 | add(_txtTitle); |
| 49 | |
| 50 | centerAllSurfaces(); |
| 51 | |
| 52 | // Set up objects |
| 53 | _window->setColor(Palette::blockOffset(15)-1); |
| 54 | _window->setBackground(_game->getResourcePack()->getSurface("BACK01.SCR")); |
| 55 | |
| 56 | _btnOk->setColor(Palette::blockOffset(8)+5); |
| 57 | _btnOk->setText(tr("STR_OK")); |
| 58 | _btnOk->onMouseClick((ActionHandler)&NoContainmentState::btnOkClick); |
| 59 | _btnOk->onKeyboardPress((ActionHandler)&NoContainmentState::btnOkClick, Options::keyOk); |
| 60 | _btnOk->onKeyboardPress((ActionHandler)&NoContainmentState::btnOkClick, Options::keyCancel); |
| 61 | |
| 62 | _txtTitle->setColor(Palette::blockOffset(8)+5); |
| 63 | _txtTitle->setText(tr("STR_ALIEN_DIES_NO_ALIEN_CONTAINMENT_FACILITY")); |
| 64 | _txtTitle->setAlign(ALIGN_CENTER); |
| 65 | _txtTitle->setBig(); |
| 66 | _txtTitle->setWordWrap(true); |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * |
nothing calls this directly
no test coverage detected