summaryrefslogtreecommitdiff
path: root/src/interface/Engine.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-10-01 13:26:43 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-01 13:26:43 (GMT)
commit0e394ed62e4a369bb57fe62137878d255c558cb0 (patch)
treed1a25ceb7c31338f187a758de8454fe0b02467ad /src/interface/Engine.cpp
parent58763f090043be8709addc9a7ac33aeaab591d7c (diff)
downloadpowder-0e394ed62e4a369bb57fe62137878d255c558cb0.zip
powder-0e394ed62e4a369bb57fe62137878d255c558cb0.tar.gz
Don't highlight menus when the mouse button is down.
Diffstat (limited to 'src/interface/Engine.cpp')
-rw-r--r--src/interface/Engine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp
index aabbc62..643a023 100644
--- a/src/interface/Engine.cpp
+++ b/src/interface/Engine.cpp
@@ -16,6 +16,7 @@ Engine::Engine():
state_(NULL),
maxWidth(0),
maxHeight(0),
+ mouseb_(0),
mousex_(0),
mousey_(0),
mousexp_(0),
@@ -260,12 +261,14 @@ void Engine::onKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool
void Engine::onMouseClick(int x, int y, unsigned button)
{
+ mouseb_ |= button;
if(state_)
state_->DoMouseDown(x, y, button);
}
void Engine::onMouseUnclick(int x, int y, unsigned button)
{
+ mouseb_ &= ~button;
if(state_)
state_->DoMouseUp(x, y, button);
}