summaryrefslogtreecommitdiff
path: root/src/gui/playerbox.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-09 01:44:18 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-09 01:44:18 +0000
commit3c214ff26a33555e3744608d7047286eb9eb5780 (patch)
tree46f5dce9cee082509cfa588b4cf93e7eb937e931 /src/gui/playerbox.h
parent4408659ea0f7c25e1d73718576822b562a29d0b4 (diff)
downloadmana-3c214ff26a33555e3744608d7047286eb9eb5780.tar.gz
mana-3c214ff26a33555e3744608d7047286eb9eb5780.tar.bz2
mana-3c214ff26a33555e3744608d7047286eb9eb5780.tar.xz
mana-3c214ff26a33555e3744608d7047286eb9eb5780.zip
Use new animation system in character selection/creation. Shows equipment and
allowed for some cleanup. Had a bit of help from the patch by VictorSan.
Diffstat (limited to 'src/gui/playerbox.h')
-rw-r--r--src/gui/playerbox.h24
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;
};