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

Paints a texture across the entire screen. More...

#include <Wallpaper.h>

+ Inheritance diagram for HoverRace::Display::Wallpaper:

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...
 
- Public Member Functions inherited from HoverRace::Display::Background
 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 ()
 
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 Background SUPER
 

Private Attributes

Color color
 
Fill fill
 
std::shared_ptr< Res< Texture > > texture
 

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

Paints a texture across the entire screen.

Author
Michael Imamura

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
ZOOM 

Zoom to fill, maintaining the original aspect ratio.

STRETCH 

Stretch to fit, ignoring the original aspect ratio.

Constructor & Destructor Documentation

HoverRace::Display::Wallpaper::Wallpaper ( std::shared_ptr< Res< Texture >>  texture,
Fill  fill = Fill::ZOOM,
double  opacity = 1.0,
const Color  color = COLOR_WHITE 
)

Constructor.

Parameters
textureThe texture.
fillThe fill mode.
opacityThe initial opacity (default is fully-opaque).
colorThe color modulation (default is white, i.e., no modulation).
HoverRace::Display::Wallpaper::~Wallpaper ( )
virtual

Member Function Documentation

virtual void HoverRace::Display::Wallpaper::AttachView ( Display disp)
inlinevirtual
const Color HoverRace::Display::Wallpaper::GetColor ( ) const
inline
Fill HoverRace::Display::Wallpaper::GetFill ( ) const
inline
std::shared_ptr<Res<Texture> > HoverRace::Display::Wallpaper::GetTexture ( ) const
inline
void HoverRace::Display::Wallpaper::SetColor ( const Color  color)

Set the color modulation of the texture.

Parameters
colorThe modulation color (including alpha).
void HoverRace::Display::Wallpaper::SetFill ( Fill  fill)

Sets the fill mode.

Parameters
fillThe fill mode.

Member Data Documentation

Color HoverRace::Display::Wallpaper::color
private
Fill HoverRace::Display::Wallpaper::fill
private
std::shared_ptr<Res<Texture> > HoverRace::Display::Wallpaper::texture
private

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