Example #1
0
 def init(self,parent,**kwargs):      
     CWidget.initattrs(self,**kwargs)
      
     self.suffix = ""
     try:
         if self.style is None:            
             self.style = parent.desktop.style['default']['vertbutton']
         else:
             self.style = parent.desktop.style[self.style]['vertbutton']
     except:
         raise GuiException("Unable to load button style")
     CWidget.init(self,self.position,self.size,parent,self.style,self.enabled)
Example #2
0
 def init(self,parent,**kwargs):      
     CWidget.initattrs(self,**kwargs)
      
     self.suffix = ""
     try:
         if self.style is None:            
             self.style = parent.desktop.style['default']['menuitem']
         else:
             self.style = parent.desktop.style[self.style]['menuitem']
     except:
         raise GuiException("Unable to load menuitem style")
     
     self.has_childs=False
     CWidget.init(self,self.position,self.size,parent,self.style,self.enabled)
Example #3
0
    def init(self,parent,**kwargs):    

        CWidget.initattrs(self,**kwargs) 
        CWidget.init(self,self.position,self.size,parent,self.style,self.enabled)
            
        self.clock = pygame.time.Clock()     
    
        # Camera transform matrix
        self.camera_matrix = Matrix44()
        self.camera_matrix.translate = (10.0, .6, 10.0)

        # Initialize speeds and directions
        self.rotation_direction = Vector3()
        self.rotation_speed = radians(90.0)
        self.movement_direction = Vector3()
        self.movement_speed = 5.0  
        self.opengl_widget=True
        self.first_render=True