* Initializes all the elements in the Geoscape Options screen. * @param game Pointer to the core game. * @param origin Game section that originated this state. */
| 41 | * @param origin Game section that originated this state. |
| 42 | */ |
| 43 | OptionsGeoscapeState::OptionsGeoscapeState(Game *game, OptionsOrigin origin) : OptionsBaseState(game, origin) |
| 44 | { |
| 45 | setCategory(_btnGeoscape); |
| 46 | |
| 47 | // Create objects |
| 48 | _txtDragScroll = new Text(114, 9, 206, 8); |
| 49 | _cbxDragScroll = new ComboBox(this, 104, 16, 206, 18); |
| 50 | |
| 51 | _txtScrollSpeed = new Text(114, 9, 94, 8); |
| 52 | _slrScrollSpeed = new Slider(104, 16, 94, 18); |
| 53 | |
| 54 | _txtDogfightSpeed = new Text(114, 9, 206, 40); |
| 55 | _slrDogfightSpeed = new Slider(104, 16, 206, 50); |
| 56 | |
| 57 | _txtClockSpeed = new Text(114, 9, 94, 40); |
| 58 | _slrClockSpeed = new Slider(104, 16, 94, 50); |
| 59 | |
| 60 | _txtGlobeDetails = new Text(114, 9, 94, 82); |
| 61 | _btnGlobeCountries = new ToggleTextButton(104, 16, 94, 92); |
| 62 | _btnGlobeRadars = new ToggleTextButton(104, 16, 94, 110); |
| 63 | _btnGlobePaths = new ToggleTextButton(104, 16, 94, 128); |
| 64 | |
| 65 | _txtOptions = new Text(114, 9, 206, 82); |
| 66 | _btnShowFunds = new ToggleTextButton(104, 16, 206, 92); |
| 67 | |
| 68 | add(_txtScrollSpeed); |
| 69 | add(_slrScrollSpeed); |
| 70 | |
| 71 | add(_txtDogfightSpeed); |
| 72 | add(_slrDogfightSpeed); |
| 73 | |
| 74 | add(_txtClockSpeed); |
| 75 | add(_slrClockSpeed); |
| 76 | |
| 77 | add(_txtGlobeDetails); |
| 78 | add(_btnGlobeCountries); |
| 79 | add(_btnGlobeRadars); |
| 80 | add(_btnGlobePaths); |
| 81 | |
| 82 | add(_txtOptions); |
| 83 | add(_btnShowFunds); |
| 84 | |
| 85 | add(_txtDragScroll); |
| 86 | add(_cbxDragScroll); |
| 87 | |
| 88 | centerAllSurfaces(); |
| 89 | |
| 90 | // Set up objects |
| 91 | _txtDragScroll->setColor(Palette::blockOffset(8)+10); |
| 92 | _txtDragScroll->setText(tr("STR_DRAG_SCROLL")); |
| 93 | |
| 94 | std::vector<std::string> dragScrolls; |
| 95 | dragScrolls.push_back("STR_DISABLED"); |
| 96 | dragScrolls.push_back("STR_LEFT_MOUSE_BUTTON"); |
| 97 | dragScrolls.push_back("STR_MIDDLE_MOUSE_BUTTON"); |
| 98 | dragScrolls.push_back("STR_RIGHT_MOUSE_BUTTON"); |
| 99 | |
| 100 | _cbxDragScroll->setColor(Palette::blockOffset(15)-1); |
nothing calls this directly
no test coverage detected