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

Method OptionsGeoscapeState

src/Menu/OptionsGeoscapeState.cpp:43–178  ·  view source on GitHub ↗

* Initializes all the elements in the Geoscape Options screen. * @param game Pointer to the core game. * @param origin Game section that originated this state. */

Source from the content-addressed store, hash-verified

41 * @param origin Game section that originated this state.
42 */
43OptionsGeoscapeState::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);

Callers

nothing calls this directly

Calls 12

setOptionsMethod · 0.80
setSelectedMethod · 0.80
setTooltipMethod · 0.80
onMouseInMethod · 0.80
onMouseOutMethod · 0.80
setPressedMethod · 0.80
onMouseClickMethod · 0.80
setColorMethod · 0.45
setTextMethod · 0.45
onChangeMethod · 0.45
setRangeMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected