HoverRace  2.0
PauseMenuScene.h
Go to the documentation of this file.
1 
2 // PauseMenuScene.h
3 //
4 // Copyright (c) 2013, 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 "GameDirector.h"
27 
28 #include "FormScene.h"
29 
30 namespace HoverRace {
31  namespace Display {
32  class Button;
33  class Display;
34  class Label;
35  class ScreenFade;
36  }
37 }
38 
39 namespace HoverRace {
40 namespace Client {
41 
46 class PauseMenuScene : public FormScene
47 {
48  using SUPER = FormScene;
49 
50 public:
52  virtual ~PauseMenuScene();
53 
54 private:
55  std::shared_ptr<Display::Button> AddButton(const std::string &text, double &y);
56 
57 private:
58  void OnCancel();
59  void OnQuitToMainMenu();
60  void OnQuitToDesktop();
61 
62 public:
63  // Scene
64  void AttachController(Control::InputEventController &controller,
65  ConnList &conns) override;
66  void PrepareRender() override;
67  void Render() override;
68 
69 private:
72 
73  std::unique_ptr<Display::ScreenFade> fader;
74 };
75 
76 } // namespace Client
77 } // namespace HoverRace
Menu displayed when the game is paused.
Definition: PauseMenuScene.h:46
std::unique_ptr< Display::ScreenFade > fader
Definition: PauseMenuScene.h:73
Interface for game client shells.
Definition: GameDirector.h:57
Base class for UI-centric scenes.
Definition: UiScene.h:42
GameDirector & director
Definition: TestLabScene.cpp:160
std::array< boost::signals2::scoped_connection, 2 > conns
Definition: ProfileEditScene.cpp:152
Base class for display managers.
Definition: Display.h:73
Base class for full-scene menus and the like.
Definition: FormScene.h:48
Display::Display & display
Definition: PauseMenuScene.h:70
GameDirector & director
Definition: PauseMenuScene.h:71
Tracks connections as a group.
Definition: Scene.h:69
Definition: Announcement.h:24
Translates input events into actions.
Definition: Controller.h:106