HoverRace  2.0
ScreenFade.h
Go to the documentation of this file.
1 
2 // ScreenFade.h
3 //
4 // Copyright (c) 2013, 2014 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 "Color.h"
25 
26 #include "Background.h"
27 
28 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
29 # ifdef MR_ENGINE
30 # define MR_DllDeclare __declspec( dllexport )
31 # else
32 # define MR_DllDeclare __declspec( dllimport )
33 # endif
34 #else
35 # define MR_DllDeclare
36 #endif
37 
38 namespace HoverRace {
39  namespace Display {
40  class Display;
41  }
42 }
43 
44 namespace HoverRace {
45 namespace Display {
46 
52 {
53  typedef Background SUPER;
54 
55  public:
56  struct Props
57  {
58  enum {
59  COLOR = SUPER::Props::NEXT_,
61  };
62  };
63 
64  public:
65  ScreenFade(const Color color, double opacity);
66  virtual ~ScreenFade();
67 
68  public:
69  virtual void AttachView(Display &disp) { AttachViewDynamic(disp, this); }
70 
71  public:
72  const Color GetColor() const { return color; }
73  void SetColor(const Color color);
74 
75  private:
77 };
78 
79 } // namespace Display
80 } // namespace HoverRace
81 
82 #undef MR_DllDeclare
Definition: Color.h:40
virtual void AttachView(Display &disp)
Definition: ScreenFade.h:69
Background SUPER
Definition: ScreenFade.h:53
const Color GetColor() const
Definition: ScreenFade.h:72
Color color
Definition: ScreenFade.h:76
Base class for views that fill the entire screen.
Definition: Background.h:43
Paints a solid color over the whole screen with adjustable opacity.
Definition: ScreenFade.h:51
Base class for display managers.
Definition: Display.h:73
#define MR_DllDeclare
Definition: ScreenFade.h:35
Definition: ScreenFade.h:56
Definition: Announcement.h:24
First index for subclasses.
Definition: ScreenFade.h:60