Example #1
0
    def __init__(self,geomnode=None):

        if geomnode is None:         
            scale = 0.024
            left,right,bottom,top = -3*scale,3*scale,-4*scale,4*scale
            cm = CardMaker('Box')            
            cm.setFrame(left,right,bottom,top)
            geomnode = cm.generate()
            
        ZNode.__init__(self,geomnode=geomnode,magnification=.8)
        Droppable.__init__(self)
        self.set_droppable(True)

        # Enable transparency and make the box invisible.
        self.np.setTransparency(TransparencyAttrib.MAlpha)
        self.np.setColor(.3,.3,.3,1)
        #self.np.setScale(scale)

        # Uncomment to apply a texture to the object.
        #tex = loader.loadTexture('card.png')
        #self.np.setTexture(tex)
        
        # The nodepath currently held by this box.
        self.contents = None
        
        # The boxlist that this box currently belongs to.
        self.boxlist = None       
Example #2
0
    def __init__(self):

        ZNode.__init__(self, geomnode=DemoItem.cm.generate())
        # FIXME. Currently highlightable only works when zoomable.
        self.set_zoomable(True)
        Highlightable.__init__(self)
        self.set_highlightable(True)
        Draggable.__init__(self)
        self.set_draggable(True)
Example #3
0
 def __init__(self):
 
     ZNode.__init__(self,geomnode = DemoItem.cm.generate())
     # FIXME. Currently highlightable only works when zoomable.
     self.set_zoomable(True)
     Highlightable.__init__(self)
     self.set_highlightable(True)
     Draggable.__init__(self)
     self.set_draggable(True)
Example #4
0
    def __init__(self):

        ZNode.__init__(self, geomnode=DemoItem.cm.generate())
        Draggable.__init__(self)
        self.set_draggable(True)
        Highlightable.__init__(self)
        self.set_highlightable(True)
        # FIXME. zoomable is required to make highlightable work because of the
        # collision mask. It shouldn't be.
        self.set_zoomable(True)
Example #5
0
 def __init__(self):
 
     ZNode.__init__(self,geomnode = DemoItem.cm.generate())
     Draggable.__init__(self)
     self.set_draggable(True)
     Highlightable.__init__(self)
     self.set_highlightable(True)
     # FIXME. zoomable is required to make highlightable work because of the
     # collision mask. It shouldn't be.
     self.set_zoomable(True)
Example #6
0
 def __init__(self,color):
     ZNode.__init__(self)
     FocusObserver.__init__(self)
     self.color = color
     self.setColor(*color)
Example #7
0
    def __init__(self):

        ZNode.__init__(self, geomnode=TestItem.cm.generate())
Example #8
0
 def __init__(self, geom=None):
     ZNode.__init__(self, geomnode=geom)
     Draggable.__init__(self)
     Highlightable.__init__(self)
     self.set_draggable(True)
     self.set_highlightable(True)
Example #9
0
 def __init__(self, color):
     ZNode.__init__(self)
     FocusObserver.__init__(self)
     self.color = color
     self.setColor(*color)
Example #10
0
 def __init__(self):
 
     ZNode.__init__(self,geomnode = TestItem.cm.generate())
Example #11
0
 def __init__(self):
     ZNode.__init__(self)
     Highlightable.__init__(self)
Example #12
0
 def __init__(self):
     ZNode.__init__(self)
     Highlightable.__init__(self)
Example #13
0
    def __init__(self):

        ZNode.__init__(self, geomnode=TestItem.cm.generate())
        Draggable.__init__(self)
        self.set_draggable(True)
Example #14
0
 def __init__(self):
 
     ZNode.__init__(self,geomnode = TestItem.cm.generate())
     Draggable.__init__(self)
     self.set_draggable(True)