diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-29 18:45:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-29 18:45:55 +0300 |
commit | 866f239c150226bbf6108980be41c52f5490fd57 (patch) | |
tree | 8032132ae55b45455237c91b47b8d81737a12519 /src/gui | |
parent | 4f05b4daf4a9ce699a7165c40ca9092da8f1852d (diff) | |
download | manaverse-866f239c150226bbf6108980be41c52f5490fd57.tar.gz manaverse-866f239c150226bbf6108980be41c52f5490fd57.tar.bz2 manaverse-866f239c150226bbf6108980be41c52f5490fd57.tar.xz manaverse-866f239c150226bbf6108980be41c52f5490fd57.zip |
improve avatarlistbox
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/avatarlistbox.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp index 964a2ab82..3792906d2 100644 --- a/src/gui/widgets/avatarlistbox.cpp +++ b/src/gui/widgets/avatarlistbox.cpp @@ -102,7 +102,6 @@ void AvatarListBox::draw(gcn::Graphics *gcnGraphics) updateAlpha(); Graphics *const graphics = static_cast<Graphics *const>(gcnGraphics); -// mHighlightColor.a = static_cast<int>(mAlpha * 255.0f); gcn::Font *const font = getFont(); const int fontHeight = getFont()->getHeight(); @@ -318,7 +317,8 @@ void AvatarListBox::mousePressed(gcn::MouseEvent &event) if (!ava) return; - if (event.getButton() == gcn::MouseEvent::LEFT) + const unsigned int eventButton = event.getButton(); + if (eventButton == gcn::MouseEvent::LEFT) { if (ava->getType() == AVATAR_PLAYER) { @@ -332,7 +332,7 @@ void AvatarListBox::mousePressed(gcn::MouseEvent &event) player_node->navigateTo(ava->getX(), ava->getY()); } } - else if (event.getButton() == gcn::MouseEvent::RIGHT) + else if (eventButton == gcn::MouseEvent::RIGHT) { switch (ava->getType()) { @@ -390,7 +390,7 @@ void AvatarListBox::mousePressed(gcn::MouseEvent &event) } } } - else if (event.getButton() == gcn::MouseEvent::MIDDLE) + else if (eventButton == gcn::MouseEvent::MIDDLE) { if (ava->getType() == AVATAR_PLAYER && chatWindow) { |