summaryrefslogtreecommitdiff
path: root/src/gui/widgets/playerbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/playerbox.h')
-rw-r--r--src/gui/widgets/playerbox.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h
index 61ad7dae4..f2b0a0616 100644
--- a/src/gui/widgets/playerbox.h
+++ b/src/gui/widgets/playerbox.h
@@ -46,9 +46,11 @@ class PlayerBox final : public Widget2,
* Constructor. Takes the initial player character that this box should
* display, which defaults to <code>NULL</code>.
*/
- PlayerBox(Being *const being, const std::string &skin = "");
+ PlayerBox(Being *const being, const std::string &skin = "",
+ const std::string &selectedSkin = "");
- explicit PlayerBox(std::string skin = "");
+ PlayerBox(const std::string &skin = "",
+ const std::string &selectedSkin = "");
A_DELETE_COPY(PlayerBox)
@@ -57,7 +59,7 @@ class PlayerBox final : public Widget2,
*/
~PlayerBox();
- void init(std::string skin);
+ void init(std::string name, std::string selectedName);
/**
* Sets a new player character to be displayed by this box. Setting the
@@ -80,6 +82,9 @@ class PlayerBox final : public Widget2,
Being *getBeing() A_WARN_UNUSED
{ return mBeing; }
+ void setSelected(bool b)
+ { mSelected = b; }
+
void mouseReleased(gcn::MouseEvent& event);
private:
@@ -87,10 +92,13 @@ class PlayerBox final : public Widget2,
float mAlpha;
ImageRect mBackground;
+ ImageRect mSelectedBackground;
Skin *mSkin;
- bool mDrawBackground;
+ Skin *mSelectedSkin;
int mOffsetX;
int mOffsetY;
+ bool mDrawBackground;
+ bool mSelected;
};
#endif