Go to the documentation of this file.00001 '''
00002 Anoria (c) Gsk 2010
00003 '''
00004
00005 import BigWorld
00006 import GUI
00007
00008 import AnGUI
00009
00010
00011
00012
00013 class Base():
00014
00015 factoryString = "AnGUI.Base"
00016
00017 def __init__(self, component):
00018 self.component = component
00019 component.script = self
00020 self.name = None
00021 self.fx = None
00022
00023
00024 def handleMouseClickEvent(self, comp):
00025 try:
00026 fx = self.fx["onMouseClick"]
00027 fx.doFx()
00028 except:
00029 pass
00030
00031 AnGUI.service.dispatchGuiEvent(AnGUI.GuiEvent(self.name, "ACTIVATE"))
00032 return True
00033
00034 def handleMouseEnterEvent(self, comp):
00035
00036 try:
00037 fx = self.fx["onMouseEnter"]
00038 fx.doFx()
00039 except:
00040 pass
00041
00042 return True
00043
00044 def handleMouseLeaveEvent(self, comp):
00045
00046 try:
00047 fx = self.fx["onMouseLeave"]
00048 fx.doFx()
00049 except:
00050 pass
00051
00052 return True
00053
00054
00055
00056
00057
00058
00059 def handleKeyEvent( self, isDown, key, modifiers ):
00060 return False
00061 def handleCharEvent( self, char, key, mods ):
00062 return False
00063 def handleAxisEvent( self, axis, value, dTime ):
00064 return False
00065 def handleMouseButtonEvent( self, comp, key, down, modifiers ):
00066 return False
00067
00068
00069
00070
00071 def handleMouseEvent( self, comp, dx, dy, dz ):
00072 return False
00073 def handleDragStartEvent( self, comp ):
00074 return False
00075 def handleDragStopEvent( self, comp ):
00076 return False
00077 def handleDragEnterEvent( self, comp ):
00078 return False
00079 def handleDragLeaveEvent( self, comp ):
00080 return False
00081 def handleDropEvent( self, comp, dropped ):
00082 return False
00083 def focus( self, state ):
00084 pass
00085 def crossFocus( self, state ):
00086 pass
00087 def moveFocus( self, state ):
00088 pass
00089 def dragFocus( self, state ):
00090 pass
00091 def dropFocus( self, state ):
00092 pass
00093 def onLoad( self, dataSection ):
00094 pass
00095 def onSave( self, dataSection ):
00096 pass
00097 def onBound(self):
00098 pass
00099
00100
00101 @staticmethod
00102 def create(texture):
00103 c = GUI.Simple(texture)
00104 c.materialFX = "BLEND"
00105 b = Base(c)
00106 return b.component