HoverRace
2.0
|
Paints a texture across the entire screen. More...
#include <Wallpaper.h>
Classes | |
struct | Props |
Public Types | |
enum | Fill { Fill::ZOOM, Fill::STRETCH } |
Public Member Functions | |
Wallpaper (std::shared_ptr< Res< Texture >> texture, Fill fill=Fill::ZOOM, double opacity=1.0, const Color color=COLOR_WHITE) | |
Constructor. More... | |
virtual | ~Wallpaper () |
virtual void | AttachView (Display &disp) |
const Color | GetColor () const |
Fill | GetFill () const |
std::shared_ptr< Res< Texture > > | GetTexture () const |
void | SetColor (const Color color) |
Set the color modulation of the texture. More... | |
void | SetFill (Fill fill) |
Sets the fill mode. More... | |
![]() | |
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 () |
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 Background | SUPER |
Private Attributes | |
Color | color |
Fill | fill |
std::shared_ptr< Res< Texture > > | texture |
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... | |
Paints a texture across the entire screen.
|
private |
|
strong |
HoverRace::Display::Wallpaper::Wallpaper | ( | std::shared_ptr< Res< Texture >> | texture, |
Fill | fill = Fill::ZOOM , |
||
double | opacity = 1.0 , |
||
const Color | color = COLOR_WHITE |
||
) |
Constructor.
texture | The texture. |
fill | The fill mode. |
opacity | The initial opacity (default is fully-opaque). |
color | The color modulation (default is white, i.e., no modulation). |
|
virtual |
|
inlinevirtual |
Implements HoverRace::Display::ViewModel.
|
inline |
|
inline |
void HoverRace::Display::Wallpaper::SetColor | ( | const Color | color | ) |
Set the color modulation of the texture.
color | The modulation color (including alpha). |
void HoverRace::Display::Wallpaper::SetFill | ( | Fill | fill | ) |
Sets the fill mode.
fill | The fill mode. |
|
private |
|
private |