Go to the documentation of this file.00001 '''
00002 Anoria (c) Gsk 2010
00003 '''
00004
00005 import BigWorld
00006 import GUI
00007
00008 from bwdebug import WARNING_MSG
00009
00010 _mouseModeRefCount = 0
00011
00012 def showCursor( show ):
00013 global _mouseModeRefCount
00014
00015 if show:
00016 _mouseModeRefCount += 1
00017 if _mouseModeRefCount > 0:
00018 BigWorld.setCursor( GUI.mcursor() )
00019 GUI.mcursor().visible = True
00020 GUI.mcursor().clipped = False
00021 else:
00022 _mouseModeRefCount -= 1
00023 if _mouseModeRefCount == 0:
00024 BigWorld.setCursor( BigWorld.dcursor() )
00025 GUI.mcursor().visible = False
00026 GUI.mcursor().clipped = True
00027
00028 if _mouseModeRefCount < 0:
00029 WARNING_MSG( "mouseModeRefCount is negative!" )
00030
00031
00032 def forceShowCursor( show ):
00033 if show:
00034 BigWorld.setCursor( GUI.mcursor() )
00035 GUI.mcursor().visible = True
00036 GUI.mcursor().clipped = False
00037 else:
00038 BigWorld.setCursor( BigWorld.dcursor() )
00039 GUI.mcursor().visible = False
00040 GUI.mcursor().clipped = True