dabo Commit
Revision 6378
Date: 2011-02-02 13:12:54 -0800 (Wed, 02 Feb 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6378

Changed:
U   trunk/dabo/ui/uiwx/__init__.py

Log:
Fix for the MouseState properties change in wx 2.9 and later.

Diff:
Modified: trunk/dabo/ui/uiwx/__init__.py
===================================================================
--- trunk/dabo/ui/uiwx/__init__.py      2011-02-02 18:40:34 UTC (rev 6377)
+++ trunk/dabo/ui/uiwx/__init__.py      2011-02-02 21:12:54 UTC (rev 6378)
@@ -713,17 +713,40 @@
 
 
 def isMouseLeftDown():
-       return wx.GetMouseState().leftDown
+       if wx.VERSION < (2, 9):
+               return wx.GetMouseState().leftDown
+       else:
+               return wx.GetMouseState().leftIsDown
 
 
 def isMouseRightDown():
-       return wx.GetMouseState().rightDown
+       if wx.VERSION < (2, 9):
+               return wx.GetMouseState().rightDown
+       else:
+               return wx.GetMouseState().rightIsDown
 
 
 def isMouseMiddleDown():
-       return wx.GetMouseState().middleDown
+       if wx.VERSION < (2, 9):
+               return wx.GetMouseState().middleDown
+       else:
+               return wx.GetMouseState().middleIsDown
 
 
+def isMouseAux1Down():
+       if wx.VERSION < (2, 9):
+               return False
+       else:
+               return wx.GetMouseState().aux1IsDown
+
+
+def isMouseAux2Down():
+       if wx.VERSION < (2, 9):
+               return False
+       else:
+               return wx.GetMouseState().aux2IsDown
+
+
 def getDisplaySize():
        """Returns the current display resolution in (width, height) format."""
        return wx.DisplaySize()



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to