diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-03-03 14:59:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-03-03 14:59:29 +0300 |
commit | f555fdf0d99622ac0d52881ebf126377287f1d3e (patch) | |
tree | ec3648afe7a084488c78c6b61c425333aba7bc34 /src/gui/widgets/playerbox.cpp | |
parent | 56b3195a88c660ced1c19de77e13db1f630c5ecd (diff) | |
download | manaplus-f555fdf0d99622ac0d52881ebf126377287f1d3e.tar.gz manaplus-f555fdf0d99622ac0d52881ebf126377287f1d3e.tar.bz2 manaplus-f555fdf0d99622ac0d52881ebf126377287f1d3e.tar.xz manaplus-f555fdf0d99622ac0d52881ebf126377287f1d3e.zip |
remove scrollarea from playerbox base classes.
Diffstat (limited to 'src/gui/widgets/playerbox.cpp')
-rw-r--r-- | src/gui/widgets/playerbox.cpp | 9 |
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(); } } |