HoverRace  2.0
LocaleSettingsScene.h
Go to the documentation of this file.
1 
2 // LocaleSettingsScene.h
3 //
4 // Copyright (c) 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/Util/Config.h"
25 
26 #include "SettingsScene.h"
27 
28 namespace HoverRace {
29  namespace Display {
30  class Button;
31  }
32  namespace Util {
33  class Locale;
34  }
35 }
36 
37 namespace HoverRace {
38 namespace Client {
39 
45 {
47 
48 public:
50  const std::string &parentTitle);
51  virtual ~LocaleSettingsScene() { }
52 
53 protected:
54  void LoadFromConfig() override;
55  void ResetToDefaults() override;
56 
57  void OnOk() override;
58  void OnCancel() override;
59 
60  void OnLangClicked();
61 
62 private:
66 
67  std::shared_ptr<Display::Button> langBtn;
68 
69  boost::signals2::scoped_connection langConn;
70  boost::signals2::scoped_connection langSelConn;
71  boost::signals2::scoped_connection confirmOkConn;
72 };
73 
74 } // namespace Client
75 } // namespace HoverRace
Interface for game client shells.
Definition: GameDirector.h:57
boost::signals2::scoped_connection langSelConn
Definition: LocaleSettingsScene.h:70
GameDirector & director
Definition: TestLabScene.cpp:160
Util::Config::i18n_t & i18nCfg
Definition: LocaleSettingsScene.h:64
Util::Locale & locale
Definition: LocaleSettingsScene.h:63
virtual ~LocaleSettingsScene()
Definition: LocaleSettingsScene.h:51
Base class for display managers.
Definition: Display.h:73
Base class for full-scene menus and the like.
Definition: FormScene.h:48
Util::Config::i18n_t origI18nCfg
Definition: LocaleSettingsScene.h:65
std::shared_ptr< Display::Button > langBtn
Definition: LocaleSettingsScene.h:67
boost::signals2::scoped_connection langConn
Definition: LocaleSettingsScene.h:69
Definition: Announcement.h:24
Definition: Config.h:240
boost::signals2::scoped_connection confirmOkConn
Definition: LocaleSettingsScene.h:71
Base for settings pages.
Definition: SettingsScene.h:41
Locale settings dialog.
Definition: LocaleSettingsScene.h:44
A library of available locales.
Definition: Locale.h:54