HoverRace  2.0
VideoSettingsScene.h
Go to the documentation of this file.
1 
2 // VideoSettingsScene.h
3 //
4 // Copyright (c) 2014, 2015 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/Display/RadioButton.h"
25 #include "../../engine/Util/Config.h"
26 
27 #include "SettingsScene.h"
28 
29 namespace HoverRace {
30  namespace Display {
31  class Button;
32  class Checkbox;
33  class Label;
34  class Slider;
35  }
36 }
37 
38 namespace HoverRace {
39 namespace Client {
40 
46 {
48 
49 public:
51  const std::string &parentTitle);
52  virtual ~VideoSettingsScene() { }
53 
54 protected:
55  void LoadFromConfig() override;
56  void ResetToDefaults() override;
57 
58  void UpdateDisplayButton();
59 
60  void OnOk() override;
61  void OnCancel() override;
62 
63  void OnDisplayClicked();
64 
65 private:
68 
69  std::shared_ptr<Display::Checkbox> fullscreenChk;
70  std::shared_ptr<Display::Button> displayBtn;
71  std::shared_ptr<Display::Slider> textScaleSlider;
72  std::shared_ptr<Display::Label> textScalePreviewLbl;
74 
75  boost::signals2::scoped_connection fullscreenConn;
76  boost::signals2::scoped_connection displayConn;
77  boost::signals2::scoped_connection textScaleConn;
78  boost::signals2::scoped_connection confirmOkConn;
79  boost::signals2::scoped_connection displaySelConn;
80 };
81 
82 } // namespace Client
83 } // namespace HoverRace
boost::signals2::scoped_connection fullscreenConn
Definition: VideoSettingsScene.h:75
Interface for game client shells.
Definition: GameDirector.h:57
std::shared_ptr< Display::Button > displayBtn
Definition: VideoSettingsScene.h:70
Video settings dialog.
Definition: VideoSettingsScene.h:45
GameDirector & director
Definition: TestLabScene.cpp:160
Util::Config::video_t origVideoCfg
Definition: VideoSettingsScene.h:67
virtual ~VideoSettingsScene()
Definition: VideoSettingsScene.h:52
std::shared_ptr< Display::Slider > textScaleSlider
Definition: VideoSettingsScene.h:71
Base class for display managers.
Definition: Display.h:73
boost::signals2::scoped_connection textScaleConn
Definition: VideoSettingsScene.h:77
Base class for full-scene menus and the like.
Definition: FormScene.h:48
std::shared_ptr< Display::Checkbox > fullscreenChk
Definition: VideoSettingsScene.h:69
boost::signals2::scoped_connection displaySelConn
Definition: VideoSettingsScene.h:79
Util::Config::video_t & videoCfg
Definition: VideoSettingsScene.h:66
boost::signals2::scoped_connection displayConn
Definition: VideoSettingsScene.h:76
Definition: Config.h:206
std::shared_ptr< Display::Label > textScalePreviewLbl
Definition: VideoSettingsScene.h:72
Definition: Announcement.h:24
boost::signals2::scoped_connection confirmOkConn
Definition: VideoSettingsScene.h:78
Base for settings pages.
Definition: SettingsScene.h:41
Display::RadioGroup< bool > splitModeGroup
Definition: VideoSettingsScene.h:73