Пример #1
0
 def createFishPicker(self):
     if not hasattr(self, 'picker'):
         self.picker = FishPicker.FishPicker(self)
         self.picker.setPos(-0.555, 0, 0.1)
         self.picker.setScale(0.95)
         self.rod = DirectLabel(parent=self.picker, relief=None, text='', text_align=TextNode.ALeft, text_scale=0.06, pos=(0.9, 0, -0.65))
     return
Пример #2
0
 def __init__(self, doneEvent):
     DirectFrame.__init__(self,
                          relief=None,
                          state='normal',
                          geom=DGG.getDefaultDialogGeom(),
                          geom_color=ToontownGlobals.GlobalDialogColor,
                          geom_scale=(2.0, 1, 1.5),
                          frameSize=(-1, 1, -1, 1),
                          pos=(0, 0, 0),
                          text='',
                          text_wordwrap=26,
                          text_scale=0.06,
                          text_pos=(0, 0.65))
     self.initialiseoptions(FishSellGUI)
     self.doneEvent = doneEvent
     self.picker = FishPicker.FishPicker(self)
     self.picker.load()
     self.picker.setPos(-0.59, 0, 0.03)
     self.picker.setScale(0.93)
     newTankFish = base.localAvatar.fishTank.getFish()
     self.picker.update(newTankFish)
     self.picker.show()
     buttons = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui')
     okImageList = (buttons.find('**/ChtBx_OKBtn_UP'),
                    buttons.find('**/ChtBx_OKBtn_DN'),
                    buttons.find('**/ChtBx_OKBtn_Rllvr'))
     cancelImageList = (buttons.find('**/CloseBtn_UP'),
                        buttons.find('**/CloseBtn_DN'),
                        buttons.find('**/CloseBtn_Rllvr'))
     self.cancelButton = DirectButton(
         parent=self,
         relief=None,
         image=cancelImageList,
         pos=(0.3, 0, -0.58),
         text=TTLocalizer.FishGuiCancel,
         text_scale=TTLocalizer.FSGUIcancelButton,
         text_pos=(0, -0.1),
         command=self.__cancel)
     self.okButton = DirectButton(parent=self,
                                  relief=None,
                                  image=okImageList,
                                  pos=(0.6, 0, -0.58),
                                  text=TTLocalizer.FishGuiOk,
                                  text_scale=TTLocalizer.FSGUIokButton,
                                  text_pos=(0, -0.1),
                                  command=self.__sellFish)
     self.rewardDoubledJellybeanLabel = DirectLabel(text='',
                                                    text_fg=(1.0, 0.125,
                                                             0.125, 1.0),
                                                    relief=None,
                                                    pos=(0.45, 0, -0.48),
                                                    scale=0.07)
     buttons.removeNode()
     self.__updateFishValue()
Пример #3
0
 def createFishPicker(self):
     if not hasattr(self, 'picker'):
         self.picker = FishPicker.FishPicker(self)
         self.picker.setPos(-0.55500000000000005, 0, 0.10000000000000001)
         self.picker.setScale(0.94999999999999996)
         self.rod = DirectLabel(parent=self.picker,
                                relief=None,
                                text='',
                                text_align=TextNode.ALeft,
                                text_scale=0.059999999999999998,
                                pos=(0.90000000000000002, 0,
                                     -0.65000000000000002))
Пример #4
0
    def createFishPicker(self):
        """
        Tank/Bucket Tab
        """
        if not hasattr(self, "picker"):
            # create the various display elements
            self.picker = FishPicker.FishPicker(self)
            self.picker.setPos(-0.555, 0, 0.1)
            self.picker.setScale(0.95)

            # rod info
            self.rod = DirectLabel(
                parent=self.picker,
                relief=None,
                text="",
                text_align=TextNode.ALeft,
                text_scale=0.06,
                pos=(0.9, 0, -0.65),
            )