コード例 #1
0
 def createJellyBeanBox(self, beanIndex, xPos, zPos):
     geomColor = (1, 1, 1, 1)
     state = DGG.NORMAL
     command = None
     xAdj = 0.029999999999999999
     zAdj = 0.029999999999999999
     newBox = DirectButton(parent=self,
                           pos=(xPos + xAdj, 0, zPos + zAdj),
                           geom=DGG.getDefaultDialogGeom(),
                           geom_scale=(0.10000000000000001, 1.0,
                                       0.10000000000000001),
                           geom_color=geomColor,
                           scale=(0.5, 1, 0.5),
                           relief=None,
                           state=state,
                           command=command,
                           extraArgs=[beanIndex],
                           text=TTLocalizer.BeanColorWords[beanIndex],
                           text_pos=(0.0, 0.10000000000000001),
                           text_scale=0.070000000000000007,
                           text_fg=Vec4(0, 0, 0, 0),
                           text1_fg=Vec4(0, 0, 0, 1),
                           text2_fg=Vec4(0, 0, 0, 1),
                           text3_fg=Vec4(0, 0, 0, 0),
                           clickSound=None,
                           pressEffect=0)
     beanParent = newBox.attachNewNode('bean_%d' % beanIndex)
     PlantingGUI.loadJellyBean(beanParent, beanIndex)
     self.jellyBeanBoxList.append(newBox)
コード例 #2
0
 def createJellyBeanBox(self, beanIndex, xPos, zPos):
     geomColor = (1, 1, 1, 1)
     state = DGG.NORMAL
     command = None
     xAdj = 0.03
     zAdj = 0.03
     newBox = DirectButton(parent=self, pos=(xPos + xAdj, 0, zPos + zAdj), geom=DGG.getDefaultDialogGeom(), geom_scale=(0.1, 1.0, 0.1), geom_color=geomColor, scale=(0.5, 1, 0.5), relief=None, state=state, command=command, extraArgs=[beanIndex], text=TTLocalizer.BeanColorWords[beanIndex], text_pos=(0.0, 0.1), text_scale=0.07, text_fg=Vec4(0, 0, 0, 0), text1_fg=Vec4(0, 0, 0, 1), text2_fg=Vec4(0, 0, 0, 1), text3_fg=Vec4(0, 0, 0, 0), clickSound=None, pressEffect=0)
     beanParent = newBox.attachNewNode('bean_%d' % beanIndex)
     PlantingGUI.loadJellyBean(beanParent, beanIndex)
     self.jellyBeanBoxList.append(newBox)
     return
コード例 #3
0
 def popupFlowerPlantingGui(self):
     assert self.notify.debugStateCall(self)
     base.localAvatar.hideGardeningGui()
     self.acceptOnce(self.plantingGuiDoneEvent,
                     self.__handleFlowerPlantingDone)
     self.plantingGui = PlantingGUI.PlantingGUI(self.plantingGuiDoneEvent)
     self.accept('stoppedAsleep', self.__handleFlowerPlantingDone)
コード例 #4
0
 def popupFlowerPlantingGui(self):
     base.localAvatar.hideGardeningGui()
     self.acceptOnce(self.plantingGuiDoneEvent,
                     self._DistributedGardenPlot__handleFlowerPlantingDone)
     self.plantingGui = PlantingGUI.PlantingGUI(self.plantingGuiDoneEvent)
     self.accept('stoppedAsleep',
                 self._DistributedGardenPlot__handleFlowerPlantingDone)
コード例 #5
0
 def popupItemPlantingGui(self):
     base.localAvatar.hideGardeningGui()
     self.acceptOnce(self.plantingGuiDoneEvent,
                     self.__handleItemPlantingDone)
     self.plantingGui = PlantingGUI.PlantingGUI(self.plantingGuiDoneEvent,
                                                True)
     self.plantingGui.showFirstSpecial()
     self.accept('stoppedAsleep', self.__handleItemPlantingDone)