| 271 | } |
| 272 | |
| 273 | void OptionsBaseState::btnGroupPress(Action *action) |
| 274 | { |
| 275 | Surface *sender = action->getSender(); |
| 276 | //if (sender != _group) |
| 277 | { |
| 278 | _game->popState(); |
| 279 | if (sender == _btnVideo) |
| 280 | { |
| 281 | _game->pushState(new OptionsVideoState(_game, _origin)); |
| 282 | } |
| 283 | else if (sender == _btnAudio) |
| 284 | { |
| 285 | if (!Options::mute) |
| 286 | { |
| 287 | _game->pushState(new OptionsAudioState(_game, _origin)); |
| 288 | } |
| 289 | else |
| 290 | { |
| 291 | _game->pushState(new OptionsNoAudioState(_game, _origin)); |
| 292 | } |
| 293 | } |
| 294 | else if (sender == _btnControls) |
| 295 | { |
| 296 | _game->pushState(new OptionsControlsState(_game, _origin)); |
| 297 | } |
| 298 | else if (sender == _btnGeoscape) |
| 299 | { |
| 300 | _game->pushState(new OptionsGeoscapeState(_game, _origin)); |
| 301 | } |
| 302 | else if (sender == _btnBattlescape) |
| 303 | { |
| 304 | _game->pushState(new OptionsBattlescapeState(_game, _origin)); |
| 305 | } |
| 306 | else if (sender == _btnAdvanced) |
| 307 | { |
| 308 | _game->pushState(new OptionsAdvancedState(_game, _origin)); |
| 309 | } |
| 310 | else if (sender == _btnMods) |
| 311 | { |
| 312 | _game->pushState(new OptionsModsState(_game, _origin)); |
| 313 | } |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | /** |
| 318 | * Shows a tooltip for the appropriate button. |