Esempio n. 1
0
 def __showFishItem(self, code, fish):
     self.fishPanel = FishPanel.FishPanel(fish)
     self.__setFishItemPos()
     self.fishPanel.setSwimBounds(-0.3, 0.3, -0.235, 0.25)
     self.fishPanel.setSwimColor(1.0, 1.0, 0.74901, 1.0)
     self.fishPanel.load()
     self.fishPanel.show(code)
     self.__updateFishTankGui()
 def __init__(self, parent=aspect2d, **kw):
     self.fishList = []
     self.shown = 0
     gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui')
     optiondefs = (('parent', parent, None), ('relief', None, None),
                   ('incButton_image',
                    (gui.find('**/FndsLst_ScrollUp'),
                     gui.find('**/FndsLst_ScrollDN'),
                     gui.find('**/FndsLst_ScrollUp_Rllvr'),
                     gui.find('**/FndsLst_ScrollUp')),
                    None), ('incButton_relief', None, None),
                   ('incButton_scale', (1.6, 1.6, -1.6),
                    None), ('incButton_pos', (0.16, 0, -0.47), None),
                   ('incButton_image3_color', Vec4(0.7, 0.7, 0.7, 0.75),
                    None), ('decButton_image',
                            (gui.find('**/FndsLst_ScrollUp'),
                             gui.find('**/FndsLst_ScrollDN'),
                             gui.find('**/FndsLst_ScrollUp_Rllvr'),
                             gui.find('**/FndsLst_ScrollUp')), None),
                   ('decButton_relief', None,
                    None), ('decButton_scale', (1.6, 1.6, 1.6),
                            None), ('decButton_pos', (0.16, 0, 0.09), None),
                   ('decButton_image3_color', Vec4(0.7, 0.7, 0.7, 0.75),
                    None), ('itemFrame_pos', (-0.025, 0, 0),
                            None), ('itemFrame_scale', 0.54,
                                    None), ('itemFrame_relief', None, None),
                   ('itemFrame_frameSize', (-0.05, 0.75, -0.75, 0.05),
                    None), ('numItemsVisible', 10, None), ('items', [],
                                                           None))
     self.defineoptions(kw, optiondefs)
     DirectScrolledList.__init__(self, parent)
     self.initialiseoptions(FishPicker)
     self.fishGui = loader.loadModel(
         'phase_3.5/models/gui/fishingBook').find('**/bucket')
     self.fishGui.find('**/fram1').removeNode()
     self.fishGui.find('**/bubble').removeNode()
     self.fishGui.reparentTo(self, -1)
     self.fishGui.setPos(0.63, 0.1, -0.1)
     self.fishGui.setScale(0.035)
     self.info = DirectLabel(parent=self,
                             relief=None,
                             text='',
                             text_scale=0.055,
                             pos=(0.18, 0, -0.67))
     self.fishPanel = FishPanel.FishPanel(parent=self)
     self.fishPanel.setSwimBounds(-0.3, 0.3, -0.235, 0.25)
     self.fishPanel.setSwimColor(1.0, 1.0, 0.74901, 1.0)
     gui.removeNode()