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 "OptionsBaseState.h"
21 
22 namespace OpenXcom
23 {
24 
25 class Text;
26 class ComboBox;
27 class Slider;
28 
34 {
35 private:
36  static const std::string musFormats[], sndFormats[];
37  Text *_txtMusicVolume, *_txtSoundVolume, *_txtUiVolume;
38  Slider *_slrMusicVolume, *_slrSoundVolume, *_slrUiVolume;
39  Text *_txtMusicFormat, *_txtCurrentMusic, *_txtSoundFormat, *_txtCurrentSound, *_txtVideoFormat;
40  ComboBox *_cbxMusicFormat, *_cbxSoundFormat, *_cbxVideoFormat;
41 public:
43  OptionsAudioState(OptionsOrigin origin);
47  void slrMusicVolumeChange(Action *action);
49  void slrSoundVolumeChange(Action *action);
51  void slrSoundVolumeRelease(Action *action);
53  void slrUiVolumeChange(Action *action);
55  void slrUiVolumeRelease(Action *action);
57  void cbxMusicFormatChange(Action *action);
59  void cbxSoundFormatChange(Action *action);
61  void cbxVideoFormatChange(Action *action);
62 };
63 
64 }
Screen that lets the user configure various Audio options.
Definition: OptionsAudioState.h:33
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:43
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