HoverRace
2.0
|
Base class for views that fill the entire screen. More...
#include <Background.h>
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... | |
![]() | |
ViewModel () | |
virtual | ~ViewModel () |
virtual void | AttachView (Display &disp)=0 |
View * | GetView () 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 | |
![]() | |
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... | |
Base class for views that fill the entire screen.
|
private |
HoverRace::Display::Background::Background | ( | double | opacity = 1.0 | ) |
Constructor.
opacity | The opacity (1.0 is fully-opaque, 0.0 is fully-transparent). |
|
pure virtual |
|
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.
opacity | The opacity (1.0 is fully-opaque, 0.0 is fully-transparent). |
|
private |