diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-22 12:16:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-29 00:49:56 +0300 |
commit | 76c98ce0c8e78778f73d6a5728441897e134fb9e (patch) | |
tree | 63753c9b80004c2f66314d8ea883a9b378656a12 /src/gui/widgets/playerbox.h | |
parent | ecf7284930fc6b67db33146819bedf6ec0ed7e7b (diff) | |
download | ManaVerse-76c98ce0c8e78778f73d6a5728441897e134fb9e.tar.gz ManaVerse-76c98ce0c8e78778f73d6a5728441897e134fb9e.tar.bz2 ManaVerse-76c98ce0c8e78778f73d6a5728441897e134fb9e.tar.xz ManaVerse-76c98ce0c8e78778f73d6a5728441897e134fb9e.zip |
Improve a bit look in character selection window.
Add selection skin for playerbox.
New theme file: playerboxselected.xml
Diffstat (limited to 'src/gui/widgets/playerbox.h')
-rw-r--r-- | src/gui/widgets/playerbox.h | 16 |
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 |