summaryrefslogtreecommitdiff
path: root/src/gui/widgets/playerbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-03 14:59:29 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-03 14:59:29 +0300
commitf555fdf0d99622ac0d52881ebf126377287f1d3e (patch)
treeec3648afe7a084488c78c6b61c425333aba7bc34 /src/gui/widgets/playerbox.cpp
parent56b3195a88c660ced1c19de77e13db1f630c5ecd (diff)
downloadplus-f555fdf0d99622ac0d52881ebf126377287f1d3e.tar.gz
plus-f555fdf0d99622ac0d52881ebf126377287f1d3e.tar.bz2
plus-f555fdf0d99622ac0d52881ebf126377287f1d3e.tar.xz
plus-f555fdf0d99622ac0d52881ebf126377287f1d3e.zip
remove scrollarea from playerbox base classes.
Diffstat (limited to 'src/gui/widgets/playerbox.cpp')
-rw-r--r--src/gui/widgets/playerbox.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp
index 7ef543511..2ba452620 100644
--- a/src/gui/widgets/playerbox.cpp
+++ b/src/gui/widgets/playerbox.cpp
@@ -36,7 +36,8 @@ PlayerBox::PlayerBox(Widget2 *const widget,
Being *const being,
const std::string &skin,
const std::string &selectedSkin) :
- ScrollArea(widget),
+ Widget(widget),
+ MouseListener(),
mBeing(being),
mAlpha(1.0),
mBackground(),
@@ -54,7 +55,8 @@ PlayerBox::PlayerBox(Widget2 *const widget,
PlayerBox::PlayerBox(Widget2 *const widget,
const std::string &skin,
const std::string &selectedSkin) :
- ScrollArea(widget),
+ Widget(widget),
+ MouseListener(),
mBeing(nullptr),
mAlpha(1.0),
mBackground(),
@@ -82,6 +84,7 @@ PlayerBox::~PlayerBox()
void PlayerBox::init(std::string name, std::string selectedName)
{
setFrameSize(2);
+ addMouseListener(this);
Theme *const theme = Theme::instance();
if (theme)
@@ -153,10 +156,10 @@ void PlayerBox::drawFrame(Graphics *graphics)
void PlayerBox::mouseReleased(MouseEvent& event)
{
- ScrollArea::mouseReleased(event);
if (event.getButton() == MouseEvent::LEFT)
{
if (!mActionEventId.empty())
distributeActionEvent();
+ event.consume();
}
}