#include <xrb_widgetbackground.hpp>

Public Member Functions | |
| WidgetBackgroundTextured (std::string const &texture_path) | |
| Constructs the background using the specified texture. | |
| WidgetBackgroundTextured (Resource< GLTexture > const &texture) | |
| Constructs the background using the specified texture. | |
| virtual | ~WidgetBackgroundTextured () |
| Destructor. | |
| virtual WidgetBackground * | CreateClone () const |
| WidgetBackgroundTextured implementation of CreateClone. | |
| virtual void | Draw (RenderContext const &render_context, ScreenCoordRect const &widget_screen_rect, ScreenCoordVector2 const &frame_margins) const |
| Draws this widget background. | |
A single texture resource is necessary for this background.
Definition at line 102 of file xrb_widgetbackground.hpp.
| Xrb::WidgetBackgroundTextured::WidgetBackgroundTextured | ( | std::string const & | texture_path | ) |
Constructs the background using the specified texture.
| texture_path | Path of the desired texture. |
Definition at line 44 of file xrb_widgetbackground.cpp.
References Xrb::GLTexture::Create(), Xrb::ResourceLibrary::LoadPath(), and Xrb::Singleton::ResourceLibrary().
Referenced by CreateClone().
Constructs the background using the specified texture.
| texture | Directly specifies the GLTexture object to use. |
Definition at line 58 of file xrb_widgetbackground.cpp.
| Xrb::WidgetBackgroundTextured::~WidgetBackgroundTextured | ( | ) | [virtual] |
Destructor.
m_texture is automatically deleted because it goes out of scope here.
Definition at line 66 of file xrb_widgetbackground.cpp.
| WidgetBackground * Xrb::WidgetBackgroundTextured::CreateClone | ( | ) | const [virtual] |
WidgetBackgroundTextured implementation of CreateClone.
See Xrb::WidgetBackground::CreateClone for more details.
Implements Xrb::WidgetBackground.
Definition at line 70 of file xrb_widgetbackground.cpp.
References WidgetBackgroundTextured().
| void Xrb::WidgetBackgroundTextured::Draw | ( | RenderContext const & | render_context, | |
| ScreenCoordRect const & | widget_screen_rect, | |||
| ScreenCoordVector2 const & | frame_margins | |||
| ) | const [virtual] |
Draws this widget background.
Simply draws the stored texture stretched to fill the given widget screen rect.
See Xrb::WidgetBackground::Draw for more info.
Implements Xrb::WidgetBackground.
Definition at line 75 of file xrb_widgetbackground.cpp.
References Xrb::Render::DrawScreenRectTexture(), and Xrb::Resource< T >::IsValid().
1.5.8