#include <SdlLabelView.h>
HoverRace::Display::SDL::SdlLabelView::SdlLabelView |
( |
SdlDisplay & |
disp, |
|
|
Label & |
model |
|
) |
| |
HoverRace::Display::SDL::SdlLabelView::~SdlLabelView |
( |
| ) |
|
|
virtual |
Vec3 HoverRace::Display::SDL::SdlLabelView::Measure |
( |
| ) |
|
|
overridevirtual |
void HoverRace::Display::SDL::SdlLabelView::OnModelUpdate |
( |
int |
prop | ) |
|
|
overridevirtual |
Called by the view model to indicate that a property has changed.
The view can use this to decide if view-specific resources need to be reloaded.
- Parameters
-
prop | The model-specific ID of the property that changed. |
Reimplemented from HoverRace::Display::View.
void HoverRace::Display::SDL::SdlLabelView::PrepareRender |
( |
| ) |
|
|
overridevirtual |
void HoverRace::Display::SDL::SdlLabelView::Render |
( |
| ) |
|
|
overridevirtual |
void HoverRace::Display::SDL::SdlLabelView::UpdateBlank |
( |
| ) |
|
|
private |
Update the state when the text is an empty string.
In this case, we measure the height of the string, and set the width to be 1 (to prevent accidental divisions by zero).
void HoverRace::Display::SDL::SdlLabelView::UpdateTexture |
( |
| ) |
|
|
private |
void HoverRace::Display::SDL::SdlLabelView::UpdateTextureColor |
( |
| ) |
|
|
private |
bool HoverRace::Display::SDL::SdlLabelView::colorChanged |
|
private |
int HoverRace::Display::SDL::SdlLabelView::height |
|
private |
int HoverRace::Display::SDL::SdlLabelView::realHeight |
|
private |
int HoverRace::Display::SDL::SdlLabelView::realWidth |
|
private |
std::unique_ptr<SdlTexture> HoverRace::Display::SDL::SdlLabelView::texture |
|
private |
boost::signals2::scoped_connection HoverRace::Display::SDL::SdlLabelView::uiScaleChangedConnection |
|
private |
double HoverRace::Display::SDL::SdlLabelView::unscaledHeight |
|
private |
double HoverRace::Display::SDL::SdlLabelView::unscaledWidth |
|
private |
int HoverRace::Display::SDL::SdlLabelView::width |
|
private |
The documentation for this class was generated from the following files: