OpenXcom  1.0
Open-source clone of the original X-Com
OptionsAudioState.h
1 #pragma once
2 /*
3  * Copyright 2010-2016 OpenXcom Developers.
4  *
5  * This file is part of OpenXcom.
6  *
7  * OpenXcom is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * OpenXcom is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
19  */
20 #include <vector>
21 #include "OptionsBaseState.h"
22 
23 namespace OpenXcom
24 {
25 
26 class Text;
27 class ComboBox;
28 class Slider;
29 
35 {
36 private:
37  static const std::wstring musFormats[], sndFormats[];
38  Text *_txtMusicVolume, *_txtSoundVolume, *_txtUiVolume;
39  Slider *_slrMusicVolume, *_slrSoundVolume, *_slrUiVolume;
40  Text *_txtMusicFormat, *_txtCurrentMusic, *_txtSoundFormat, *_txtCurrentSound, *_txtVideoFormat;
41  ComboBox *_cbxMusicFormat, *_cbxSoundFormat, *_cbxVideoFormat;
42 public:
44  OptionsAudioState(OptionsOrigin origin);
48  void slrMusicVolumeChange(Action *action);
50  void slrSoundVolumeChange(Action *action);
52  void slrSoundVolumeRelease(Action *action);
54  void slrUiVolumeChange(Action *action);
56  void slrUiVolumeRelease(Action *action);
58  void cbxMusicFormatChange(Action *action);
60  void cbxSoundFormatChange(Action *action);
62  void cbxVideoFormatChange(Action *action);
63 };
64 
65 }
Screen that lets the user configure various Audio options.
Definition: OptionsAudioState.h:34
void slrMusicVolumeChange(Action *action)
Handler for changing the music slider.
Definition: OptionsAudioState.cpp:194
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:32
void cbxMusicFormatChange(Action *action)
Handler for changing the Music Format combobox.
Definition: OptionsAudioState.cpp:251
void slrUiVolumeRelease(Action *action)
Handler for sound slider button release.
Definition: OptionsAudioState.cpp:233
void slrUiVolumeChange(Action *action)
Handler for changing the sound slider.
Definition: OptionsAudioState.cpp:223
Horizontal slider control to select from a range of values.
Definition: Slider.h:34
Text string displayed on screen.
Definition: Text.h:40
void cbxSoundFormatChange(Action *action)
Handler for changing the Sound Format combobox.
Definition: OptionsAudioState.cpp:261
Text button with a list dropdown when pressed.
Definition: ComboBox.h:36
void cbxVideoFormatChange(Action *action)
Handler for changing the Video Format combobox.
Definition: OptionsAudioState.cpp:242
OptionsAudioState(OptionsOrigin origin)
Creates the Audio Options state.
Definition: OptionsAudioState.cpp:44
void slrSoundVolumeChange(Action *action)
Handler for changing the sound slider.
Definition: OptionsAudioState.cpp:204
void slrSoundVolumeRelease(Action *action)
Handler for sound slider button release.
Definition: OptionsAudioState.cpp:214
~OptionsAudioState()
Cleans up the Audio Options state.
Definition: OptionsAudioState.cpp:185
Definition: BaseInfoState.cpp:40
Options base state for common stuff across Options windows.
Definition: OptionsBaseState.h:41