GG
GG::TextureCursor Class Reference

#include <Cursor.h>

Inheritance diagram for GG::TextureCursor:
GG::Cursor

List of all members.

 Cursor ()
virtual ~Cursor ()

Structors

 TextureCursor (const boost::shared_ptr< Texture > &texture, const Pt &hotspot=Pt())

Accessors

const boost::shared_ptr
< Texture > & 
GetTexture () const
const PtHotspot () const

Mutators

virtual void Render (const Pt &pt)

Additional Inherited Members


Detailed Description

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.

Definition at line 66 of file Cursor.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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 void GG::TextureCursor::Render ( const Pt pt)
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.


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