* Initializes all the elements in the Place Lift screen. * @param game Pointer to the core game. * @param base Pointer to the base to get info from. * @param globe Pointer to the Geoscape globe. * @param first Is this a custom starting base? */
| 45 | * @param first Is this a custom starting base? |
| 46 | */ |
| 47 | PlaceLiftState::PlaceLiftState(Game *game, Base *base, Globe *globe, bool first) : State(game), _base(base), _globe(globe), _first(first) |
| 48 | { |
| 49 | // Create objects |
| 50 | _view = new BaseView(192, 192, 0, 8); |
| 51 | _txtTitle = new Text(320, 9, 0, 0); |
| 52 | |
| 53 | // Set palette |
| 54 | setPalette("PAL_BASESCAPE"); |
| 55 | |
| 56 | add(_view); |
| 57 | add(_txtTitle); |
| 58 | |
| 59 | centerAllSurfaces(); |
| 60 | |
| 61 | // Set up objects |
| 62 | _view->setTexture(_game->getResourcePack()->getSurfaceSet("BASEBITS.PCK")); |
| 63 | _view->setBase(_base); |
| 64 | _view->setSelectable(_game->getRuleset()->getBaseFacility("STR_ACCESS_LIFT")->getSize()); |
| 65 | _view->onMouseClick((ActionHandler)&PlaceLiftState::viewClick); |
| 66 | |
| 67 | _txtTitle->setColor(Palette::blockOffset(13)+10); |
| 68 | _txtTitle->setText(tr("STR_SELECT_POSITION_FOR_ACCESS_LIFT")); |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * |
nothing calls this directly
no test coverage detected