HoverRace  2.0
Classes | Public Member Functions | Private Types | Private Attributes | List of all members
HoverRace::Display::Background Class Referenceabstract

Base class for views that fill the entire screen. More...

#include <Background.h>

+ Inheritance diagram for HoverRace::Display::Background:

Classes

struct  Props
 

Public Member Functions

 Background (double opacity=1.0)
 Constructor. More...
 
virtual ~Background ()=0
 
double GetOpacity () const
 
void SetOpacity (double opacity)
 Set the opacity of the overlay. More...
 
- Public Member Functions inherited from HoverRace::Display::ViewModel
 ViewModel ()
 
virtual ~ViewModel ()
 
virtual void AttachView (Display &disp)=0
 
ViewGetView () const
 
virtual Vec3 Measure ()
 Calculate the size of the component. More...
 
void PrepareRender ()
 
void Render ()
 
void SetView (std::unique_ptr< View > &&view)
 

Private Types

typedef ViewModel SUPER
 

Private Attributes

double opacity
 

Additional Inherited Members

- Protected Member Functions inherited from HoverRace::Display::ViewModel
template<class T >
void AttachViewDynamic (Display &disp, T *self)
 
virtual void FireModelUpdate (int prop)
 Indicate that a model property has changed. More...
 
virtual void Layout ()
 Adjust the size and position of any child elements. More...
 
void RequestLayout ()
 Indicate that the current layout is out-of-date and needs to be adjusted. More...
 

Detailed Description

Base class for views that fill the entire screen.

Author
Michael Imamura

Member Typedef Documentation

Constructor & Destructor Documentation

HoverRace::Display::Background::Background ( double  opacity = 1.0)

Constructor.

Parameters
opacityThe opacity (1.0 is fully-opaque, 0.0 is fully-transparent).
HoverRace::Display::Background::~Background ( )
pure virtual

Member Function Documentation

double HoverRace::Display::Background::GetOpacity ( ) const
inline
void HoverRace::Display::Background::SetOpacity ( double  opacity)

Set the opacity of the overlay.

The value will be clamped to the range 0.0 to 1.0 inclusive.

Parameters
opacityThe opacity (1.0 is fully-opaque, 0.0 is fully-transparent).

Member Data Documentation

double HoverRace::Display::Background::opacity
private

The documentation for this class was generated from the following files: