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)
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
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)
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)
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)