Mercurial > fife-parpg
changeset 220:6d09d310943b
Pass mouseWheelMovedUp and mouseWheelMovedDown events to pychan.
Fixed(?) dragging, mouse events are proceessed by the GUI if the last move was inside the gui.
author | phoku@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Thu, 19 Mar 2009 18:23:00 +0000 |
parents | 852da06fc922 |
children | e901bdec7578 |
files | engine/core/gui/guilistener.i engine/core/gui/guimanager.cpp engine/extensions/pychan/events.py |
diffstat | 3 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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() { }
--- 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; }
--- 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):