* Initializes all the elements in the Battlescape Options screen. * @param game Pointer to the core game. * @param origin Game section that originated this state. */
| 40 | * @param origin Game section that originated this state. |
| 41 | */ |
| 42 | OptionsBattlescapeState::OptionsBattlescapeState(Game *game, OptionsOrigin origin) : OptionsBaseState(game, origin) |
| 43 | { |
| 44 | setCategory(_btnBattlescape); |
| 45 | |
| 46 | // Create objects |
| 47 | _txtEdgeScroll = new Text(114, 9, 94, 8); |
| 48 | _cbxEdgeScroll = new ComboBox(this, 104, 16, 94, 18); |
| 49 | |
| 50 | _txtDragScroll = new Text(114, 9, 206, 8); |
| 51 | _cbxDragScroll = new ComboBox(this, 104, 16, 206, 18); |
| 52 | |
| 53 | _txtScrollSpeed = new Text(114, 9, 94, 40); |
| 54 | _slrScrollSpeed = new Slider(104, 16, 94, 50); |
| 55 | |
| 56 | _txtFireSpeed = new Text(114, 9, 206, 40); |
| 57 | _slrFireSpeed = new Slider(104, 16, 206, 50); |
| 58 | |
| 59 | _txtXcomSpeed = new Text(114, 9, 94, 72); |
| 60 | _slrXcomSpeed = new Slider(104, 16, 94, 82); |
| 61 | |
| 62 | _txtAlienSpeed = new Text(114, 9, 206, 72); |
| 63 | _slrAlienSpeed = new Slider(104, 16, 206, 82); |
| 64 | |
| 65 | _txtPathPreview = new Text(114, 9, 94, 100); |
| 66 | _btnArrows = new ToggleTextButton(104, 16, 94, 110); |
| 67 | _btnTuCost = new ToggleTextButton(104, 16, 94, 128); |
| 68 | |
| 69 | _txtOptions = new Text(114, 9, 206, 100); |
| 70 | _btnTooltips = new ToggleTextButton(104, 16, 206, 110); |
| 71 | _btnDeaths = new ToggleTextButton(104, 16, 206, 128); |
| 72 | |
| 73 | add(_txtEdgeScroll); |
| 74 | add(_txtDragScroll); |
| 75 | |
| 76 | add(_txtScrollSpeed); |
| 77 | add(_slrScrollSpeed); |
| 78 | |
| 79 | add(_txtFireSpeed); |
| 80 | add(_slrFireSpeed); |
| 81 | |
| 82 | add(_txtXcomSpeed); |
| 83 | add(_slrXcomSpeed); |
| 84 | |
| 85 | add(_txtAlienSpeed); |
| 86 | add(_slrAlienSpeed); |
| 87 | |
| 88 | add(_txtPathPreview); |
| 89 | add(_btnArrows); |
| 90 | add(_btnTuCost); |
| 91 | |
| 92 | add(_txtOptions); |
| 93 | add(_btnTooltips); |
| 94 | add(_btnDeaths); |
| 95 | |
| 96 | add(_cbxEdgeScroll); |
| 97 | add(_cbxDragScroll); |
| 98 | |
| 99 | centerAllSurfaces(); |
nothing calls this directly
no test coverage detected