# HG changeset patch # User phoku@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1237486980 0 # Node ID 6d09d310943b765cedede7f6eb1577c9c70464aa # Parent 852da06fc922e426fdbc408ef6b8f88de7d47394 Pass mouseWheelMovedUp and mouseWheelMovedDown events to pychan. Fixed(?) dragging, mouse events are proceessed by the GUI if the last move was inside the gui. diff -r 852da06fc922 -r 6d09d310943b engine/core/gui/guilistener.i --- a/engine/core/gui/guilistener.i Thu Mar 19 17:56:59 2009 +0000 +++ b/engine/core/gui/guilistener.i Thu Mar 19 18:23:00 2009 +0000 @@ -46,7 +46,7 @@ MouseListener() { } }; - %feature("director") MouseListener; + %feature("director") KeyListener; class KeyListener { public: virtual ~KeyListener() { } diff -r 852da06fc922 -r 6d09d310943b engine/core/gui/guimanager.cpp --- a/engine/core/gui/guimanager.cpp Thu Mar 19 17:56:59 2009 +0000 +++ b/engine/core/gui/guimanager.cpp Thu Mar 19 18:23:00 2009 +0000 @@ -109,7 +109,6 @@ return true; } if( m_had_mouse ) { - m_had_mouse = false; input->pushInput(evt); return true; } diff -r 852da06fc922 -r 6d09d310943b engine/extensions/pychan/events.py --- a/engine/extensions/pychan/events.py Thu Mar 19 17:56:59 2009 +0000 +++ b/engine/extensions/pychan/events.py Thu Mar 19 18:23:00 2009 +0000 @@ -53,6 +53,8 @@ "mouseReleased", "mouseClicked", "mouseMoved", + "mouseWheelMovedUp", + "mouseWheelMovedDown", "mouseDragged", "action", "keyPressed", @@ -166,6 +168,8 @@ def mouseReleased(self,e): self._redirectEvent("mouseReleased",e) def mouseClicked(self,e): self._redirectEvent("mouseClicked",e) def mouseMoved(self,e): self._redirectEvent("mouseMoved",e) + def mouseWheelMovedUp(self,e): self._redirectEvent("mouseWheelMovedUp",e) + def mouseWheelMovedDown(self,e): self._redirectEvent("mouseWheelMovedDown",e) def mouseDragged(self,e): self._redirectEvent("mouseDragged",e) class _KeyEventListener(EventListenerBase,guichan.KeyListener):