diff options
Diffstat (limited to 'src/gui/playerbox.h')
-rw-r--r-- | src/gui/playerbox.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/gui/playerbox.h b/src/gui/playerbox.h index 79f7c2aa..6bba1b51 100644 --- a/src/gui/playerbox.h +++ b/src/gui/playerbox.h @@ -27,10 +27,10 @@ #include <guichan/widgets/scrollarea.hpp> class ImageRect; +class Player; /** - * A box showing a player. Draws the various hair styles a player can have - * currently. + * A box showing a player character. * * \ingroup GUI */ @@ -38,9 +38,10 @@ class PlayerBox : public gcn::ScrollArea { public: /** - * Constructor. + * Constructor. Takes the initial player character that this box should + * display, which defaults to <code>NULL</code>. */ - PlayerBox(unsigned char sex); + PlayerBox(const Player *player = NULL); /** * Destructor. @@ -48,6 +49,14 @@ class PlayerBox : public gcn::ScrollArea ~PlayerBox(); /** + * Sets a new player character to be displayed by this box. Setting the + * player to <code>NULL</code> causes the box not to draw any + * character. + */ + void + setPlayer(const Player *player) { mPlayer = player; } + + /** * Draws the scroll area. */ void draw(gcn::Graphics *graphics); @@ -57,12 +66,9 @@ class PlayerBox : public gcn::ScrollArea */ void drawBorder(gcn::Graphics *graphics); - int mHairColor; /**< The hair color index */ - int mHairStyle; /**< The hair style index */ - unsigned char mSex; /**< Sex */ - bool mShowPlayer; /**< Wether to show the player or not */ - private: + const Player *mPlayer; /**< The character used for display */ + static int instances; static ImageRect background; }; |