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

Method PlaceLiftState

src/Basescape/PlaceLiftState.cpp:47–69  ·  view source on GitHub ↗

* 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? */

Source from the content-addressed store, hash-verified

45 * @param first Is this a custom starting base?
46 */
47PlaceLiftState::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 *

Callers

nothing calls this directly

Calls 11

getSurfaceSetMethod · 0.80
getBaseFacilityMethod · 0.80
onMouseClickMethod · 0.80
setTextureMethod · 0.45
getResourcePackMethod · 0.45
setBaseMethod · 0.45
setSelectableMethod · 0.45
getSizeMethod · 0.45
getRulesetMethod · 0.45
setColorMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected