OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
OptionsAudioState.h
1 /*
2  * Copyright 2010-2014 OpenXcom Developers.
3  *
4  * This file is part of OpenXcom.
5  *
6  * OpenXcom is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * OpenXcom is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef OPENXCOM_OPTIONSAUDIOSTATE_H
20 #define OPENXCOM_OPTIONSAUDIOSTATE_H
21 
22 #include <vector>
23 #include "OptionsBaseState.h"
24 
25 namespace OpenXcom
26 {
27 
28 class Text;
29 class ComboBox;
30 class Slider;
31 
37 {
38 private:
39  static const std::wstring musFormats[], sndFormats[];
40  Text *_txtMusicVolume, *_txtSoundVolume, *_txtUiVolume;
41  Slider *_slrMusicVolume, *_slrSoundVolume, *_slrUiVolume;
42  Text *_txtSampleRate;
43  ComboBox *_cbxSampleRate;
44  Text *_txtMusicFormat, *_txtCurrentMusic, *_txtSoundFormat, *_txtCurrentSound;
45  ComboBox *_cbxMusicFormat, *_cbxSoundFormat;
46  std::vector<int> _sampleRates;
47 public:
49  OptionsAudioState(Game *game, OptionsOrigin origin);
53  void slrMusicVolumeChange(Action *action);
55  void slrSoundVolumeChange(Action *action);
57  void slrSoundVolumeRelease(Action *action);
59  void slrUiVolumeChange(Action *action);
61  void slrUiVolumeRelease(Action *action);
63  void cbxSampleRateChange(Action *action);
65  void cbxMusicFormatChange(Action *action);
67  void cbxSoundFormatChange(Action *action);
68 };
69 
70 }
71 
72 #endif
Screen that lets the user configure various Audio options.
Definition: OptionsAudioState.h:36
void slrMusicVolumeChange(Action *action)
Handler for changing the music slider.
Definition: OptionsAudioState.cpp:223
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:34
void cbxMusicFormatChange(Action *action)
Handler for changing the Music Format combobox.
Definition: OptionsAudioState.cpp:281
void slrUiVolumeRelease(Action *action)
Handler for sound slider button release.
Definition: OptionsAudioState.cpp:262
void slrUiVolumeChange(Action *action)
Handler for changing the sound slider.
Definition: OptionsAudioState.cpp:252
Horizontal slider control to select from a range of values.
Definition: Slider.h:36
Text string displayed on screen.
Definition: Text.h:41
void cbxSoundFormatChange(Action *action)
Handler for changing the Sound Format combobox.
Definition: OptionsAudioState.cpp:291
Text button with a list dropdown when pressed.
Definition: ComboBox.h:38
void cbxSampleRateChange(Action *action)
Handler for changing the Sample Rate combobox.
Definition: OptionsAudioState.cpp:271
void slrSoundVolumeChange(Action *action)
Handler for changing the sound slider.
Definition: OptionsAudioState.cpp:233
void slrSoundVolumeRelease(Action *action)
Handler for sound slider button release.
Definition: OptionsAudioState.cpp:243
~OptionsAudioState()
Cleans up the Audio Options state.
Definition: OptionsAudioState.cpp:214
The core of the game engine, manages the game's entire contents and structure.
Definition: Game.h:44
OptionsAudioState(Game *game, OptionsOrigin origin)
Creates the Audio Options state.
Definition: OptionsAudioState.cpp:45
Options base state for common stuff across Options windows.
Definition: OptionsBaseState.h:43