HoverRace  2.0
Background.h
Go to the documentation of this file.
1 
2 // Background.h
3 //
4 // Copyright (c) 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 "ViewModel.h"
25 
26 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
27 # ifdef MR_ENGINE
28 # define MR_DllDeclare __declspec( dllexport )
29 # else
30 # define MR_DllDeclare __declspec( dllimport )
31 # endif
32 #else
33 # define MR_DllDeclare
34 #endif
35 
36 namespace HoverRace {
37 namespace Display {
38 
43 class Background : public ViewModel
44 {
45  typedef ViewModel SUPER;
46 
47  public:
48  struct Props
49  {
50  enum {
53  };
54  };
55 
56  public:
57  Background(double opacity = 1.0);
58  virtual ~Background() = 0;
59 
60  double GetOpacity() const { return opacity; }
61  void SetOpacity(double opacity);
62 
63  private:
64  double opacity;
65 };
66 
67 } // namespace Display
68 } // namespace HoverRace
69 
70 #undef MR_DllDeclare
virtual ~Background()=0
Definition: Background.cpp:47
Base class for renderable components.
Definition: ViewModel.h:55
double GetOpacity() const
Definition: Background.h:60
Background(double opacity=1.0)
Constructor.
Definition: Background.cpp:42
Base class for views that fill the entire screen.
Definition: Background.h:43
double opacity
Definition: Background.h:64
ViewModel SUPER
Definition: Background.h:45
Definition: Background.h:48
Definition: Announcement.h:24
void SetOpacity(double opacity)
Set the opacity of the overlay.
Definition: Background.cpp:56
First index for subclasses.
Definition: Background.h:52