GG
|
#include <Cursor.h>
Structors | |
TextureCursor (const boost::shared_ptr< Texture > &texture, const Pt &hotspot=Pt()) | |
Accessors | |
const boost::shared_ptr < Texture > & | GetTexture () const |
const Pt & | Hotspot () const |
Mutators | |
virtual void | Render (const Pt &pt) |
Additional Inherited Members | |
![]() | |
Cursor () | |
virtual | ~Cursor () |
TextureCursor is a very simple subclass of Cursor.
It renders a texture such that the point within the texture that represents the hotspot of the cursor is rendered at the click-point of the cursor.
GG::TextureCursor::TextureCursor | ( | const boost::shared_ptr< Texture > & | texture, |
const Pt & | hotspot = Pt() |
||
) |
Ctor. texture is the texture to render and hotspot is the offset within texture where the click-point is located. hotspot is clamped to texture's valid area.
const boost::shared_ptr<Texture>& GG::TextureCursor::GetTexture | ( | ) | const |
Returns the texture used to render this TextureCursor.
const Pt& GG::TextureCursor::Hotspot | ( | ) | const |
Returns the position within Texture() of the cursor hotspot.
|
virtual |
Renders the cursor at the specified location. Subclasses should take care to ensure that the cursor's "hotspot" is rendered at pt.
Implements GG::Cursor.