ButtonText Class Reference

#include <button_text.h>

Inheritance diagram for ButtonText:

Inheritance graph
[legend]
Collaboration diagram for ButtonText:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ButtonText (Point2i position, const Profile *res_profile, const std::string &resource_id, const std::string &new_text, Font *font)
 ~ButtonText ()
void Draw (const Point2i &mousePosition, Surface &surf) const

Private Attributes

Texttext

Detailed Description

Definition at line 28 of file button_text.h.


Constructor & Destructor Documentation

ButtonText::ButtonText ( Point2i  position,
const Profile res_profile,
const std::string &  resource_id,
const std::string &  new_text,
Font font 
)

Definition at line 29 of file button_text.cpp.

00032   : Button(position, res_profile, resource_id)
00033 {
00034   text = new Text(new_text, white_color, font);
00035 }

ButtonText::~ButtonText (  ) 

Definition at line 25 of file button_text.cpp.

00025                        {
00026   delete text;
00027 }


Member Function Documentation

void ButtonText::Draw ( const Point2i mousePosition,
Surface surf 
) const [virtual]

Reimplemented from Button.

Definition at line 37 of file button_text.cpp.

00038 {
00039   Point2i textPosition = position + size/2;
00040         
00041   Button::Draw(mousePosition, surf);
00042   text->DrawCenter(textPosition);
00043 }

Here is the call graph for this function:


Member Data Documentation

Text* ButtonText::text [private]

Definition at line 31 of file button_text.h.


The documentation for this class was generated from the following files:
Generated on Mon Jan 1 13:38:00 2007 for Wormux by  doxygen 1.4.7