HoverRace  2.0
AudioSettingsScene.h
Go to the documentation of this file.
1 
2 // AudioSettingsScene.h
3 //
4 // Copyright (c) 2014, 2016 Michael Imamura.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 
22 #pragma once
23 
24 #include "../../engine/Util/Config.h"
25 
26 #include "SettingsScene.h"
27 
28 namespace HoverRace {
29  namespace Display {
30  class Slider;
31  }
32  namespace VideoServices {
33  class ShortSound;
34  }
35 }
36 
37 namespace HoverRace {
38 namespace Client {
39 
45 {
47 
48 public:
50  const std::string &parentTitle);
51  virtual ~AudioSettingsScene() { }
52 
53 protected:
54  void LoadFromConfig() override;
55  void ResetToDefaults() override;
56 
57 private:
58  static VideoServices::ShortSound *LoadSound(int id);
59 
60 protected:
61  void OnOk() override;
62  void OnCancel() override;
63 
64 private:
67 
70 
71  std::shared_ptr<Display::Slider> sfxVolumeSlider;
72 
73  boost::signals2::scoped_connection sfxVolumeConn;
74 };
75 
76 } // namespace Client
77 } // namespace HoverRace
Util::Config::audio_t & audioCfg
Definition: AudioSettingsScene.h:65
boost::signals2::scoped_connection sfxVolumeConn
Definition: AudioSettingsScene.h:73
Interface for game client shells.
Definition: GameDirector.h:57
VideoServices::ShortSound * testSound
Definition: AudioSettingsScene.h:69
bool skipSoundTest
Definition: AudioSettingsScene.h:68
std::shared_ptr< Display::Slider > sfxVolumeSlider
Definition: AudioSettingsScene.h:71
GameDirector & director
Definition: TestLabScene.cpp:160
Audio settings dialog.
Definition: AudioSettingsScene.h:44
Base class for display managers.
Definition: Display.h:73
Util::Config::audio_t origAudioCfg
Definition: AudioSettingsScene.h:66
Definition: SoundServer.cpp:135
virtual ~AudioSettingsScene()
Definition: AudioSettingsScene.h:51
Definition: Announcement.h:24
Definition: Config.h:231
Base for settings pages.
Definition: SettingsScene.h:41