Exemplo n.º 1
0
 def load(self):
     self.gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
     guiRArrowUp = self.gui.find('**/tt_t_gui_mat_arrowUp')
     guiRArrowDown = self.gui.find('**/tt_t_gui_mat_arrowDown')
     guiRArrowRollover = self.gui.find('**/tt_t_gui_mat_arrowUp')
     guiRArrowDisabled = self.gui.find('**/tt_t_gui_mat_arrowDisabled')
     shuffleFrame = self.gui.find('**/tt_t_gui_mat_shuffleFrame')
     shuffleArrowUp = self.gui.find('**/tt_t_gui_mat_shuffleArrowUp')
     shuffleArrowDown = self.gui.find('**/tt_t_gui_mat_shuffleArrowDown')
     shuffleArrowRollover = self.gui.find('**/tt_t_gui_mat_shuffleArrowUp')
     shuffleArrowDisabled = self.gui.find('**/tt_t_gui_mat_shuffleArrowDisabled')
     self.upsellModel = loader.loadModel('phase_3/models/gui/tt_m_gui_ups_mainGui')
     upsellTex = self.upsellModel.find('**/tt_t_gui_ups_banner')
     self.parentFrame = DirectFrame(relief=DGG.RAISED, pos=(0.98, 0, 0.416), frameColor=(1, 0, 0, 0))
     self.parentFrame.setPos(-0.36, 0, -0.5)
     self.parentFrame.reparentTo(base.a2dTopRight)
     self.createSpeciesButtons()
     self.headFrame = DirectFrame(parent=self.parentFrame, image=shuffleFrame, image_scale=halfButtonInvertScale, relief=None, pos=(0, 0, -0.3), hpr=(0, 0, 2), scale=0.9, frameColor=(1, 1, 1, 1), text=TTLocalizer.BodyShopHead, text_scale=0.0625, text_pos=(-0.001, -0.015), text_fg=(1, 1, 1, 1))
     self.headLButton = DirectButton(parent=self.headFrame, relief=None, image=(shuffleArrowUp,
      shuffleArrowDown,
      shuffleArrowRollover,
      shuffleArrowDisabled), image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, pos=(-0.2, 0, 0), command=self.__swapHead, extraArgs=[-1])
     self.headRButton = DirectButton(parent=self.headFrame, relief=None, image=(shuffleArrowUp,
      shuffleArrowDown,
      shuffleArrowRollover,
      shuffleArrowDisabled), image_scale=halfButtonInvertScale, image1_scale=halfButtonInvertHoverScale, image2_scale=halfButtonInvertHoverScale, pos=(0.2, 0, 0), command=self.__swapHead, extraArgs=[1])
     self.bodyFrame = DirectFrame(parent=self.parentFrame, image=shuffleFrame, image_scale=halfButtonScale, relief=None, pos=(0, 0, -0.5), hpr=(0, 0, -2), scale=0.9, frameColor=(1, 1, 1, 1), text=TTLocalizer.BodyShopBody, text_scale=0.0625, text_pos=(-0.001, -0.015), text_fg=(1, 1, 1, 1))
     self.torsoLButton = DirectButton(parent=self.bodyFrame, relief=None, image=(shuffleArrowUp,
      shuffleArrowDown,
      shuffleArrowRollover,
      shuffleArrowDisabled), image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, pos=(-0.2, 0, 0), command=self.__swapTorso, extraArgs=[-1])
     self.torsoRButton = DirectButton(parent=self.bodyFrame, relief=None, image=(shuffleArrowUp,
      shuffleArrowDown,
      shuffleArrowRollover,
      shuffleArrowDisabled), image_scale=halfButtonInvertScale, image1_scale=halfButtonInvertHoverScale, image2_scale=halfButtonInvertHoverScale, pos=(0.2, 0, 0), command=self.__swapTorso, extraArgs=[1])
     self.legsFrame = DirectFrame(parent=self.parentFrame, image=shuffleFrame, image_scale=halfButtonInvertScale, relief=None, pos=(0, 0, -0.7), hpr=(0, 0, 3), scale=0.9, frameColor=(1, 1, 1, 1), text=TTLocalizer.BodyShopLegs, text_scale=0.0625, text_pos=(-0.001, -0.015), text_fg=(1, 1, 1, 1))
     self.legLButton = DirectButton(parent=self.legsFrame, relief=None, image=(shuffleArrowUp,
      shuffleArrowDown,
      shuffleArrowRollover,
      shuffleArrowDisabled), image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, pos=(-0.2, 0, 0), command=self.__swapLegs, extraArgs=[-1])
     self.legRButton = DirectButton(parent=self.legsFrame, relief=None, image=(shuffleArrowUp,
      shuffleArrowDown,
      shuffleArrowRollover,
      shuffleArrowDisabled), image_scale=halfButtonInvertScale, image1_scale=halfButtonInvertHoverScale, image2_scale=halfButtonInvertHoverScale, pos=(0.2, 0, 0), command=self.__swapLegs, extraArgs=[1])
     self.memberButton = DirectButton(relief=None, image=(upsellTex,
      upsellTex,
      upsellTex,
      upsellTex), image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, scale=0.9, pos=(0, 0, -0.84), command=self.__restrictForward)
     self.parentFrame.hide()
     self.memberButton.hide()
     self.shuffleFetchMsg = 'BodyShopShuffle'
     self.shuffleButton = ShuffleButton.ShuffleButton(self, self.shuffleFetchMsg)
Exemplo n.º 2
0
 def load(self):
     self.gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
     guiRArrowUp = self.gui.find('**/tt_t_gui_mat_arrowUp')
     guiRArrowRollover = self.gui.find('**/tt_t_gui_mat_arrowUp')
     guiRArrowDown = self.gui.find('**/tt_t_gui_mat_arrowDown')
     guiRArrowDisabled = self.gui.find('**/tt_t_gui_mat_arrowDisabled')
     shuffleFrame = self.gui.find('**/tt_t_gui_mat_shuffleFrame')
     shuffleUp = self.gui.find('**/tt_t_gui_mat_shuffleUp')
     shuffleDown = self.gui.find('**/tt_t_gui_mat_shuffleDown')
     shuffleImage = (self.gui.find('**/tt_t_gui_mat_shuffleArrowUp'),
      self.gui.find('**/tt_t_gui_mat_shuffleArrowDown'),
      self.gui.find('**/tt_t_gui_mat_shuffleArrowUp'),
      self.gui.find('**/tt_t_gui_mat_shuffleArrowDisabled'))
     self.parentFrame = self.getNewFrame()
     self.pickerFrame = self.getNewFrame()
     self.pickerFrame['image'] = 'phase_3/maps/stat_board.png'
     self.pickerFrame.setScale(0.75)
     self.pickerFrame.setPos(-0.7, 0, -0.7)
     self.pickerFrame.setTransparency(TransparencyAttrib.MAlpha)
     self.toonFrame = DirectFrame(parent=self.parentFrame, image=shuffleFrame, image_scale=halfButtonInvertScale, relief=None, pos=(0, 0, -0.073), hpr=(0, 0, 0), scale=1.3, frameColor=(1, 1, 1, 1), text=TTLocalizer.ColorShopToon, text_scale=TTLocalizer.CStoonFrame, text_pos=(-0.001, -0.015), text_fg=(1, 1, 1, 1))
     self.allLButton = DirectButton(parent=self.toonFrame, relief=None, image=shuffleImage, image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, pos=(-0.2, 0, 0), command=self.__swapAllColor, extraArgs=[-1])
     self.allRButton = DirectButton(parent=self.toonFrame, relief=None, image=shuffleImage, image_scale=halfButtonInvertScale, image1_scale=halfButtonInvertHoverScale, image2_scale=halfButtonInvertHoverScale, pos=(0.2, 0, 0), command=self.__swapAllColor, extraArgs=[1])
     self.headFrame = DirectFrame(parent=self.parentFrame, image=shuffleFrame, image_scale=halfButtonInvertScale, relief=None, pos=(0, 0, -0.3), hpr=(0, 0, 2), scale=0.9, frameColor=(1, 1, 1, 1), text=TTLocalizer.ColorShopHead, text_scale=0.0625, text_pos=(-0.001, -0.015), text_fg=(1, 1, 1, 1))
     self.headLButton = DirectButton(parent=self.headFrame, relief=None, image=shuffleImage, image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, pos=(-0.2, 0, 0), command=self.__swapHeadColor, extraArgs=[-1])
     self.headRButton = DirectButton(parent=self.headFrame, relief=None, image=shuffleImage, image_scale=halfButtonInvertScale, image1_scale=halfButtonInvertHoverScale, image2_scale=halfButtonInvertHoverScale, pos=(0.2, 0, 0), command=self.__swapHeadColor, extraArgs=[1])
     self.bodyFrame = DirectFrame(parent=self.parentFrame, image=shuffleFrame, image_scale=halfButtonScale, relief=None, pos=(0, 0, -0.5), hpr=(0, 0, -2), scale=0.9, frameColor=(1, 1, 1, 1), text=TTLocalizer.ColorShopBody, text_scale=0.0625, text_pos=(-0.001, -0.015), text_fg=(1, 1, 1, 1))
     self.armLButton = DirectButton(parent=self.bodyFrame, relief=None, image=shuffleImage, image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, pos=(-0.2, 0, 0), command=self.__swapArmColor, extraArgs=[-1])
     self.armRButton = DirectButton(parent=self.bodyFrame, relief=None, image=shuffleImage, image_scale=halfButtonInvertScale, image1_scale=halfButtonInvertHoverScale, image2_scale=halfButtonInvertHoverScale, pos=(0.2, 0, 0), command=self.__swapArmColor, extraArgs=[1])
     self.legsFrame = DirectFrame(parent=self.parentFrame, image=shuffleFrame, image_scale=halfButtonInvertScale, relief=None, pos=(0, 0, -0.7), hpr=(0, 0, 3), scale=0.9, frameColor=(1, 1, 1, 1), text=TTLocalizer.ColorShopLegs, text_scale=0.0625, text_pos=(-0.001, -0.015), text_fg=(1, 1, 1, 1))
     self.legLButton = DirectButton(parent=self.legsFrame, relief=None, image=shuffleImage, image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, pos=(-0.2, 0, 0), command=self.__swapLegColor, extraArgs=[-1])
     self.legRButton = DirectButton(parent=self.legsFrame, relief=None, image=shuffleImage, image_scale=halfButtonInvertScale, image1_scale=halfButtonInvertHoverScale, image2_scale=halfButtonInvertHoverScale, pos=(0.2, 0, 0), command=self.__swapLegColor, extraArgs=[1])
     self.pickerButton = DirectButton(parent=self.parentFrame, relief=None, image=(shuffleUp, shuffleDown, shuffleUp), image_scale=(-0.8, 0.6, 0.6), image1_scale=(-0.83, 0.6, 0.6), image2_scale=(-0.83, 0.6, 0.6), text=TTLocalizer.ColorShopPicker, text_font=ToontownGlobals.getInterfaceFont(), text_scale=TTLocalizer.SBshuffleBtn, text_pos=(0, -0.02), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), pos=(0, 0, -1.15), command=self.popupPickerMenu)
     self.basicButton = DirectButton(parent=self.pickerFrame, relief=None, image=(shuffleUp, shuffleDown, shuffleUp), image_scale=(-0.8, 0.6, 0.6), image1_scale=(-0.83, 0.6, 0.6), image2_scale=(-0.83, 0.6, 0.6), text=TTLocalizer.ColorShopBasic, text_font=ToontownGlobals.getInterfaceFont(), text_scale=TTLocalizer.SBshuffleBtn, text_pos=(0, -0.02), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), pos=(0, 0, -1.15), command=self.popupBasicMenu)
     self.pickImage = PNMImage(int(80.0), int(70.0))
     self.hueSlider = DirectSlider(parent=self.pickerFrame, relief=None, image='phase_3/maps/picker_hue.jpg', thumb_relief=None, scale=0.3, pos=(0, 0, -0.6), image_scale=(1.0, 1.0, 0.1), pageSize=5, orientation=DGG.HORIZONTAL, command=self.__chooseHue)
     self.pickButton = DirectButton(parent=self.pickerFrame, relief=None, image='phase_3/maps/picker_invisible.png', scale=0.5, pos=(0, 0, 0), frameColor=(1, 1, 1, 0.1), pressEffect=0)
     self.pickButton.bind(DGG.B1PRESS, self.__startPickColor)
     self.pickButton.bind(DGG.B1RELEASE, self.__stopPickColor)
     self.pickSelector = OnscreenImage(parent=self.pickerFrame, image='phase_3/maps/picker_selector.png', scale=0.05)
     self.pickSelector.setTransparency(TransparencyAttrib.MAlpha)
     self.rgbDisplay = OnscreenText(parent=self.pickerFrame, pos=(0, 0.6), scale=0.1, style=3, align=TextNode.ACenter)
     self.partsFrame = DirectFrame(parent=self.pickerFrame, image=shuffleFrame, image_scale=halfButtonInvertScale, relief=None, pos=(0, 0, -0.75), hpr=(0, 0, -2), scale=0.9, frameColor=(1, 1, 1, 1), text=TTLocalizer.ColorShopToon, text_scale=0.0625, text_pos=(-0.001, -0.015), text_fg=(1, 1, 1, 1))
     self.partLButton = DirectButton(parent=self.partsFrame, relief=None, image=shuffleImage, image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, pos=(-0.2, 0, 0), state=DGG.DISABLED, command=self.__swapPart, extraArgs=[-1])
     self.partRButton = DirectButton(parent=self.partsFrame, relief=None, image=shuffleImage, image_scale=halfButtonInvertScale, image1_scale=halfButtonInvertHoverScale, image2_scale=halfButtonInvertHoverScale, pos=(0.2, 0, 0), command=self.__swapPart, extraArgs=[1])
     self.parentFrame.hide()
     self.pickerFrame.hide()
     self.shuffleFetchMsg = 'ColorShopShuffle'
     self.shuffleButton = ShuffleButton.ShuffleButton(self, self.shuffleFetchMsg)
    def load(self):
        self.gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
        guiRArrowUp = self.gui.find('**/tt_t_gui_mat_arrowUp')
        guiRArrowRollover = self.gui.find('**/tt_t_gui_mat_arrowUp')
        guiRArrowDown = self.gui.find('**/tt_t_gui_mat_arrowDown')
        guiRArrowDisabled = self.gui.find('**/tt_t_gui_mat_arrowDisabled')
        guiArrowRotateUp = self.gui.find('**/tt_t_gui_mat_arrowRotateUp')
        guiArrowRotateDown = self.gui.find('**/tt_t_gui_mat_arrowRotateDown')
        shuffleFrame = self.gui.find('**/tt_t_gui_mat_shuffleFrame')
        shuffleArrowUp = self.gui.find('**/tt_t_gui_mat_shuffleArrowUp')
        shuffleArrowDown = self.gui.find('**/tt_t_gui_mat_shuffleArrowDown')
        shuffleArrowRollover = self.gui.find('**/tt_t_gui_mat_shuffleArrowUp')
        shuffleArrowDisabled = self.gui.find('**/tt_t_gui_mat_shuffleArrowDisabled')
        self.parentFrame = DirectFrame(relief=DGG.RAISED, pos=(0.98, 0, 0.416), frameColor=(1, 0, 0, 0))

        def addFrame(posZ, text):
            return DirectFrame(parent=self.parentFrame, image=shuffleFrame, image_scale=halfButtonInvertScale, relief=None, pos=(0, 0, posZ), hpr=(0, 0, 3), scale=1.2, frameColor=(1, 1, 1, 1), text=text, text_scale=0.0575, text_pos=(-0.001, -0.015), text_fg=(1, 1, 1, 1))

        def addButton(parent, scale, hoverScale, posX, command, extraArg):
            return DirectButton(parent=parent, relief=None, image=(shuffleArrowUp,
             shuffleArrowDown,
             shuffleArrowRollover,
             shuffleArrowDisabled), image_scale=scale, image1_scale=hoverScale, image2_scale=hoverScale, pos=(posX, 0, 0), command=command, extraArgs=[extraArg])

        self.hatFrame = addFrame(0.1, TTLocalizer.TrunkHatGUI)
        self.hatLButton = addButton(self.hatFrame, halfButtonScale, halfButtonHoverScale, -0.2, self.swapHat, -1)
        self.hatRButton = addButton(self.hatFrame, halfButtonInvertScale, halfButtonInvertHoverScale, 0.2, self.swapHat, 1)
        self.glassesFrame = addFrame(-0.15, TTLocalizer.TrunkGlassesGUI)
        self.glassesLButton = addButton(self.glassesFrame, halfButtonScale, halfButtonHoverScale, -0.2, self.swapGlasses, -1)
        self.glassesRButton = addButton(self.glassesFrame, halfButtonInvertScale, halfButtonInvertHoverScale, 0.2, self.swapGlasses, 1)
        self.backpackFrame = addFrame(-0.4, TTLocalizer.TrunkBackpackGUI)
        self.backpackLButton = addButton(self.backpackFrame, halfButtonScale, halfButtonHoverScale, -0.2, self.swapBackpack, -1)
        self.backpackRButton = addButton(self.backpackFrame, halfButtonInvertScale, halfButtonInvertHoverScale, 0.2, self.swapBackpack, 1)
        self.shoesFrame = addFrame(-0.65, TTLocalizer.TrunkShoesGUI)
        self.shoesLButton = addButton(self.shoesFrame, halfButtonScale, halfButtonHoverScale, -0.2, self.swapShoes, -1)
        self.shoesRButton = addButton(self.shoesFrame, halfButtonInvertScale, halfButtonInvertHoverScale, 0.2, self.swapShoes, 1)
        self.parentFrame.hide()
        self.shuffleFetchMsg = 'TrunkShuffle'
        self.shuffleButton = ShuffleButton.ShuffleButton(self, self.shuffleFetchMsg)
        self.gui = loader.loadModel('phase_3/models/gui/create_a_toon_gui')
        self.cancelButton = DirectButton(relief=None, image=(self.gui.find('**/CrtAtoon_Btn2_UP'), self.gui.find('**/CrtAtoon_Btn2_DOWN'), self.gui.find('**/CrtAtoon_Btn2_RLLVR')), pos=(0.15, 0, -0.85), command=self.__handleCancel, text=('', TTLocalizer.MakeAToonCancel, TTLocalizer.MakeAToonCancel), text_font=ToontownGlobals.getInterfaceFont(), text_scale=0.08, text_pos=(0, -0.03), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1))
        self.cancelButton.hide()
        self.rotateL = DirectButton(relief=None, pos=(-0.15, 0, 0.85), image=(guiArrowRotateUp,
         guiArrowRotateDown,
         guiArrowRotateUp,
         guiArrowRotateDown), image_scale=(-0.7, 0.7, 0.7), image1_scale=(-0.8, 0.8, 0.8), image2_scale=(-0.8, 0.8, 0.8))
        self.rotateL.hide()
        self.rotateL.bind(DGG.B1PRESS, self.__rotateLDown)
        self.rotateL.bind(DGG.B1RELEASE, self.__rotateLUp)
        self.rotateR = DirectButton(relief=None, pos=(0.15, 0, 0.85), image=(guiArrowRotateUp,
         guiArrowRotateDown,
         guiArrowRotateUp,
         guiArrowRotateDown), image_scale=(0.7, 0.7, 0.7), image1_scale=(0.8, 0.8, 0.8), image2_scale=(0.8, 0.8, 0.8))
        self.rotateR.hide()
        self.rotateR.bind(DGG.B1PRESS, self.__rotateRDown)
        self.rotateR.bind(DGG.B1RELEASE, self.__rotateRUp)
        if self.isOwner:
            trashcanGui = loader.loadModel('phase_3/models/gui/trashcan_gui')
            trashImage = (trashcanGui.find('**/TrashCan_CLSD'), trashcanGui.find('**/TrashCan_OPEN'), trashcanGui.find('**/TrashCan_RLVR'))
            self.trashPanel = DirectFrame(parent=aspect2d, image=DGG.getDefaultDialogGeom(), image_color=(1, 1, 0.75, 0.8), image_scale=(0.36, 0, 1.2), pos=(-.86, 0, 0.1), relief=None)

            def addTrashButton(posZ, text, extraArg):
                return DirectButton(parent=self.trashPanel, image=trashImage, relief=None, pos=(-0.09, 0, posZ), command=self.__handleDelete, text=text, extraArgs=[extraArg], scale=(0.5, 0.5, 0.5), text_font=ToontownGlobals.getInterfaceFont(), text_scale=0.12, text_pos=(0.3, 0), text_fg=(0.8, 0.2, 0.2, 1), text_shadow=(0, 0, 0, 1), textMayChange=0)

            self.hatTrashButton = addTrashButton(0.5, TTLocalizer.TrunkDeleteHat, ToonDNA.HAT)
            self.glassesTrashButton = addTrashButton(0.2, TTLocalizer.TrunkDeleteGlasses, ToonDNA.GLASSES)
            self.backpackTrashButton = addTrashButton(-0.1, TTLocalizer.TrunkDeleteBackpack, ToonDNA.BACKPACK)
            self.shoesTrashButton = addTrashButton(-0.4, TTLocalizer.TrunkDeleteShoes, ToonDNA.SHOES)
            self.button = DirectButton(relief=None, image=(self.gui.find('**/CrtAtoon_Btn1_UP'), self.gui.find('**/CrtAtoon_Btn1_DOWN'), self.gui.find('**/CrtAtoon_Btn1_RLLVR')), pos=(-0.15, 0, -0.85), command=self.__handleButton, text=('', TTLocalizer.MakeAToonDone, TTLocalizer.MakeAToonDone), text_font=ToontownGlobals.getInterfaceFont(), text_scale=0.08, text_pos=(0, -0.03), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1))
            trashcanGui.removeNode()
        return
Exemplo n.º 4
0
 def load(self):
     self.gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
     guiRArrowUp = self.gui.find('**/tt_t_gui_mat_arrowUp')
     guiRArrowRollover = self.gui.find('**/tt_t_gui_mat_arrowUp')
     guiRArrowDown = self.gui.find('**/tt_t_gui_mat_arrowDown')
     guiRArrowDisabled = self.gui.find('**/tt_t_gui_mat_arrowDisabled')
     shuffleFrame = self.gui.find('**/tt_t_gui_mat_shuffleFrame')
     shuffleFrame2 = self.gui.find('**/tt_t_gui_mat_shuffleFrame')
     shuffleFrame2.setColor(0, 100, 30)
     shuffleArrowUp = self.gui.find('**/tt_t_gui_mat_shuffleArrowUp')
     shuffleArrowDown = self.gui.find('**/tt_t_gui_mat_shuffleArrowDown')
     shuffleArrowRollover = self.gui.find('**/tt_t_gui_mat_shuffleArrowUp')
     shuffleArrowDisabled = self.gui.find(
         '**/tt_t_gui_mat_shuffleArrowDisabled')
     self.parentFrame = DirectFrame(relief=DGG.RAISED,
                                    pos=(0.98, 0, 0.416),
                                    frameColor=(1, 0, 0, 0))
     self.parentFrame.setPos(-0.36, 0, -0.5)
     self.parentFrame.reparentTo(base.a2dTopRight)
     if self.type == CLOTHES_CLOSET:
         self.shirtFrame = DirectFrame(parent=self.parentFrame,
                                       image=shuffleFrame,
                                       image_scale=halfButtonInvertScale,
                                       relief=None,
                                       pos=(0, 0, -0.4),
                                       hpr=(0, 0, 3),
                                       scale=1.2,
                                       frameColor=(1, 1, 1, 1),
                                       text=TTLocalizer.ClothesShopShirt,
                                       text_scale=0.0575,
                                       text_pos=(-0.001, -0.015),
                                       text_fg=(1, 1, 1, 1))
         self.topLButton = DirectButton(
             parent=self.shirtFrame,
             relief=None,
             image=(shuffleArrowUp, shuffleArrowDown, shuffleArrowRollover,
                    shuffleArrowDisabled),
             image_scale=halfButtonScale,
             image1_scale=halfButtonHoverScale,
             image2_scale=halfButtonHoverScale,
             pos=(-0.2, 0, 0),
             command=self.swapTop,
             extraArgs=[-1])
         self.topRButton = DirectButton(
             parent=self.shirtFrame,
             relief=None,
             image=(shuffleArrowUp, shuffleArrowDown, shuffleArrowRollover,
                    shuffleArrowDisabled),
             image_scale=halfButtonInvertScale,
             image1_scale=halfButtonInvertHoverScale,
             image2_scale=halfButtonInvertHoverScale,
             pos=(0.2, 0, 0),
             command=self.swapTop,
             extraArgs=[1])
         self.bottomFrame = DirectFrame(parent=self.parentFrame,
                                        image=shuffleFrame,
                                        image_scale=halfButtonInvertScale,
                                        relief=None,
                                        pos=(0, 0, -0.65),
                                        hpr=(0, 0, -2),
                                        scale=1.2,
                                        frameColor=(1, 1, 1, 1),
                                        text=TTLocalizer.ColorShopToon,
                                        text_scale=0.0575,
                                        text_pos=(-0.001, -0.015),
                                        text_fg=(1, 1, 1, 1))
         self.bottomLButton = DirectButton(
             parent=self.bottomFrame,
             relief=None,
             image=(shuffleArrowUp, shuffleArrowDown, shuffleArrowRollover,
                    shuffleArrowDisabled),
             image_scale=halfButtonScale,
             image1_scale=halfButtonHoverScale,
             image2_scale=halfButtonHoverScale,
             pos=(-0.2, 0, 0),
             command=self.swapBottom,
             extraArgs=[-1])
         self.bottomRButton = DirectButton(
             parent=self.bottomFrame,
             relief=None,
             image=(shuffleArrowUp, shuffleArrowDown, shuffleArrowRollover,
                    shuffleArrowDisabled),
             image_scale=halfButtonInvertScale,
             image1_scale=halfButtonInvertHoverScale,
             image2_scale=halfButtonInvertHoverScale,
             pos=(0.2, 0, 0),
             command=self.swapBottom,
             extraArgs=[1])
         self.parentFrame.hide()
         self.shuffleFetchMsg = 'ClothesShopShuffle'
         self.shuffleButton = ShuffleButton.ShuffleButton(
             self, self.shuffleFetchMsg)
         return
     self.shirtStyleFrame = DirectFrame(
         parent=self.parentFrame,
         image=shuffleFrame2,
         image_scale=halfButtonInvertScale,
         relief=None,
         pos=(0, 0, 0.2),
         hpr=(0, 0, 3),
         scale=1.2,
         frameColor=(1, 1, 1, 1),
         text=TTLocalizer.ClothesShopShirtsStyle,
         text_scale=0.0575,
         text_pos=(-0.001, -0.015),
         text_fg=(1, 1, 1, 1))
     self.shirtStyleLButton = DirectButton(
         parent=self.shirtStyleFrame,
         relief=None,
         image=(shuffleArrowUp, shuffleArrowDown, shuffleArrowRollover,
                shuffleArrowDisabled),
         image_scale=halfButtonScale,
         image1_scale=halfButtonHoverScale,
         image2_scale=halfButtonHoverScale,
         pos=(-0.2, 0, 0),
         command=self.swapTopStyle,
         extraArgs=[-1])
     self.shirtStyleRButton = DirectButton(
         parent=self.shirtStyleFrame,
         relief=None,
         image=(shuffleArrowUp, shuffleArrowDown, shuffleArrowRollover,
                shuffleArrowDisabled),
         image_scale=halfButtonInvertScale,
         image1_scale=halfButtonInvertHoverScale,
         image2_scale=halfButtonInvertHoverScale,
         pos=(0.2, 0, 0),
         command=self.swapTopStyle,
         extraArgs=[1])
     self.shirtFrame = DirectFrame(parent=self.parentFrame,
                                   image=shuffleFrame,
                                   image_scale=halfButtonInvertScale,
                                   relief=None,
                                   pos=(0, 0, -0.1),
                                   hpr=(0, 0, 3),
                                   scale=1.2,
                                   frameColor=(1, 1, 1, 1),
                                   text=TTLocalizer.ClothesShopShirtsColor,
                                   text_scale=0.0575,
                                   text_pos=(-0.001, -0.015),
                                   text_fg=(1, 1, 1, 1))
     self.topLButton = DirectButton(parent=self.shirtFrame,
                                    relief=None,
                                    image=(shuffleArrowUp, shuffleArrowDown,
                                           shuffleArrowRollover,
                                           shuffleArrowDisabled),
                                    image_scale=halfButtonScale,
                                    image1_scale=halfButtonHoverScale,
                                    image2_scale=halfButtonHoverScale,
                                    pos=(-0.2, 0, 0),
                                    command=self.swapTopColor,
                                    extraArgs=[-1])
     self.topRButton = DirectButton(parent=self.shirtFrame,
                                    relief=None,
                                    image=(shuffleArrowUp, shuffleArrowDown,
                                           shuffleArrowRollover,
                                           shuffleArrowDisabled),
                                    image_scale=halfButtonInvertScale,
                                    image1_scale=halfButtonInvertHoverScale,
                                    image2_scale=halfButtonInvertHoverScale,
                                    pos=(0.2, 0, 0),
                                    command=self.swapTopColor,
                                    extraArgs=[1])
     self.bottomStyleFrame = DirectFrame(parent=self.parentFrame,
                                         image=shuffleFrame,
                                         image_scale=halfButtonInvertScale,
                                         relief=None,
                                         pos=(0, 0, -0.4),
                                         hpr=(0, 0, -2),
                                         scale=1.2,
                                         frameColor=(1, 1, 1, 1),
                                         text='',
                                         text_scale=0.0575,
                                         text_pos=(-0.001, -0.015),
                                         text_fg=(1, 1, 1, 1))
     self.bottomStyleLButton = DirectButton(
         parent=self.bottomStyleFrame,
         relief=None,
         image=(shuffleArrowUp, shuffleArrowDown, shuffleArrowRollover,
                shuffleArrowDisabled),
         image_scale=halfButtonScale,
         image1_scale=halfButtonHoverScale,
         image2_scale=halfButtonHoverScale,
         pos=(-0.2, 0, 0),
         command=self.swapBottomStyle,
         extraArgs=[-1])
     self.bottomStyleRButton = DirectButton(
         parent=self.bottomStyleFrame,
         relief=None,
         image=(shuffleArrowUp, shuffleArrowDown, shuffleArrowRollover,
                shuffleArrowDisabled),
         image_scale=halfButtonInvertScale,
         image1_scale=halfButtonInvertHoverScale,
         image2_scale=halfButtonInvertHoverScale,
         pos=(0.2, 0, 0),
         command=self.swapBottomStyle,
         extraArgs=[1])
     self.bottomFrame = DirectFrame(parent=self.parentFrame,
                                    image=shuffleFrame,
                                    image_scale=halfButtonInvertScale,
                                    relief=None,
                                    pos=(0, 0, -0.65),
                                    hpr=(0, 0, -2),
                                    scale=1.2,
                                    frameColor=(1, 1, 1, 1),
                                    text='',
                                    text_scale=0.0575,
                                    text_pos=(-0.001, -0.015),
                                    text_fg=(1, 1, 1, 1))
     self.bottomLButton = DirectButton(
         parent=self.bottomFrame,
         relief=None,
         image=(shuffleArrowUp, shuffleArrowDown, shuffleArrowRollover,
                shuffleArrowDisabled),
         image_scale=halfButtonScale,
         image1_scale=halfButtonHoverScale,
         image2_scale=halfButtonHoverScale,
         pos=(-0.2, 0, 0),
         command=self.swapBottomColor,
         extraArgs=[-1])
     self.bottomRButton = DirectButton(
         parent=self.bottomFrame,
         relief=None,
         image=(shuffleArrowUp, shuffleArrowDown, shuffleArrowRollover,
                shuffleArrowDisabled),
         image_scale=halfButtonInvertScale,
         image1_scale=halfButtonInvertHoverScale,
         image2_scale=halfButtonInvertHoverScale,
         pos=(0.2, 0, 0),
         command=self.swapBottomColor,
         extraArgs=[1])
     self.parentFrame.hide()
     self.shuffleFetchMsg = 'ClothesShopShuffle'
     self.shuffleButton = ShuffleButton.ShuffleButton(
         self, self.shuffleFetchMsg)
 def load(self):
     self.gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
     guiRArrowUp = self.gui.find('**/tt_t_gui_mat_arrowUp')
     guiRArrowRollover = self.gui.find('**/tt_t_gui_mat_arrowUp')
     guiRArrowDown = self.gui.find('**/tt_t_gui_mat_arrowDown')
     guiRArrowDisabled = self.gui.find('**/tt_t_gui_mat_arrowDisabled')
     shuffleFrame = self.gui.find('**/tt_t_gui_mat_shuffleFrame')
     shuffleArrowUp = self.gui.find('**/tt_t_gui_mat_shuffleArrowUp')
     shuffleArrowDown = self.gui.find('**/tt_t_gui_mat_shuffleArrowDown')
     shuffleArrowRollover = self.gui.find('**/tt_t_gui_mat_shuffleArrowUp')
     shuffleArrowDisabled = self.gui.find(
         '**/tt_t_gui_mat_shuffleArrowDisabled')
     self.parentFrame = DirectFrame(relief=DGG.RAISED,
                                    pos=(0.98, 0, 0.416),
                                    frameColor=(1, 0, 0, 0))
     self.parentFrame.setPos(-0.36, 0, -0.5)
     self.parentFrame.reparentTo(base.a2dTopRight)
     self.toonFrame = DirectFrame(parent=self.parentFrame,
                                  image=shuffleFrame,
                                  image_scale=halfButtonInvertScale,
                                  relief=None,
                                  pos=(0, 0, -0.073),
                                  hpr=(0, 0, 0),
                                  scale=1.3,
                                  frameColor=(1, 1, 1, 1),
                                  text=TTLocalizer.ColorShopToon,
                                  text_scale=TTLocalizer.CStoonFrame,
                                  text_pos=(-0.001, -0.015),
                                  text_fg=(1, 1, 1, 1))
     self.allLButton = DirectButton(parent=self.toonFrame,
                                    relief=None,
                                    image=(shuffleArrowUp, shuffleArrowDown,
                                           shuffleArrowRollover,
                                           shuffleArrowDisabled),
                                    image_scale=halfButtonScale,
                                    image1_scale=halfButtonHoverScale,
                                    image2_scale=halfButtonHoverScale,
                                    pos=(-0.2, 0, 0),
                                    command=self.__swapAllColor,
                                    extraArgs=[-1])
     self.allRButton = DirectButton(parent=self.toonFrame,
                                    relief=None,
                                    image=(shuffleArrowUp, shuffleArrowDown,
                                           shuffleArrowRollover,
                                           shuffleArrowDisabled),
                                    image_scale=halfButtonInvertScale,
                                    image1_scale=halfButtonInvertHoverScale,
                                    image2_scale=halfButtonInvertHoverScale,
                                    pos=(0.2, 0, 0),
                                    command=self.__swapAllColor,
                                    extraArgs=[1])
     self.headFrame = DirectFrame(parent=self.parentFrame,
                                  image=shuffleFrame,
                                  image_scale=halfButtonInvertScale,
                                  relief=None,
                                  pos=(0, 0, -0.3),
                                  hpr=(0, 0, 2),
                                  scale=0.9,
                                  frameColor=(1, 1, 1, 1),
                                  text=TTLocalizer.ColorShopHead,
                                  text_scale=0.0625,
                                  text_pos=(-0.001, -0.015),
                                  text_fg=(1, 1, 1, 1))
     self.headLButton = DirectButton(
         parent=self.headFrame,
         relief=None,
         image=(shuffleArrowUp, shuffleArrowDown, shuffleArrowRollover,
                shuffleArrowDisabled),
         image_scale=halfButtonScale,
         image1_scale=halfButtonHoverScale,
         image2_scale=halfButtonHoverScale,
         pos=(-0.2, 0, 0),
         command=self.__swapHeadColor,
         extraArgs=[-1])
     self.headRButton = DirectButton(
         parent=self.headFrame,
         relief=None,
         image=(shuffleArrowUp, shuffleArrowDown, shuffleArrowRollover,
                shuffleArrowDisabled),
         image_scale=halfButtonInvertScale,
         image1_scale=halfButtonInvertHoverScale,
         image2_scale=halfButtonInvertHoverScale,
         pos=(0.2, 0, 0),
         command=self.__swapHeadColor,
         extraArgs=[1])
     self.bodyFrame = DirectFrame(parent=self.parentFrame,
                                  image=shuffleFrame,
                                  image_scale=halfButtonScale,
                                  relief=None,
                                  pos=(0, 0, -0.5),
                                  hpr=(0, 0, -2),
                                  scale=0.9,
                                  frameColor=(1, 1, 1, 1),
                                  text=TTLocalizer.ColorShopBody,
                                  text_scale=0.0625,
                                  text_pos=(-0.001, -0.015),
                                  text_fg=(1, 1, 1, 1))
     self.armLButton = DirectButton(parent=self.bodyFrame,
                                    relief=None,
                                    image=(shuffleArrowUp, shuffleArrowDown,
                                           shuffleArrowRollover,
                                           shuffleArrowDisabled),
                                    image_scale=halfButtonScale,
                                    image1_scale=halfButtonHoverScale,
                                    image2_scale=halfButtonHoverScale,
                                    pos=(-0.2, 0, 0),
                                    command=self.__swapArmColor,
                                    extraArgs=[-1])
     self.armRButton = DirectButton(parent=self.bodyFrame,
                                    relief=None,
                                    image=(shuffleArrowUp, shuffleArrowDown,
                                           shuffleArrowRollover,
                                           shuffleArrowDisabled),
                                    image_scale=halfButtonInvertScale,
                                    image1_scale=halfButtonInvertHoverScale,
                                    image2_scale=halfButtonInvertHoverScale,
                                    pos=(0.2, 0, 0),
                                    command=self.__swapArmColor,
                                    extraArgs=[1])
     self.legsFrame = DirectFrame(parent=self.parentFrame,
                                  image=shuffleFrame,
                                  image_scale=halfButtonInvertScale,
                                  relief=None,
                                  pos=(0, 0, -0.7),
                                  hpr=(0, 0, 3),
                                  scale=0.9,
                                  frameColor=(1, 1, 1, 1),
                                  text=TTLocalizer.ColorShopLegs,
                                  text_scale=0.0625,
                                  text_pos=(-0.001, -0.015),
                                  text_fg=(1, 1, 1, 1))
     self.legLButton = DirectButton(parent=self.legsFrame,
                                    relief=None,
                                    image=(shuffleArrowUp, shuffleArrowDown,
                                           shuffleArrowRollover,
                                           shuffleArrowDisabled),
                                    image_scale=halfButtonScale,
                                    image1_scale=halfButtonHoverScale,
                                    image2_scale=halfButtonHoverScale,
                                    pos=(-0.2, 0, 0),
                                    command=self.__swapLegColor,
                                    extraArgs=[-1])
     self.legRButton = DirectButton(parent=self.legsFrame,
                                    relief=None,
                                    image=(shuffleArrowUp, shuffleArrowDown,
                                           shuffleArrowRollover,
                                           shuffleArrowDisabled),
                                    image_scale=halfButtonInvertScale,
                                    image1_scale=halfButtonInvertHoverScale,
                                    image2_scale=halfButtonInvertHoverScale,
                                    pos=(0.2, 0, 0),
                                    command=self.__swapLegColor,
                                    extraArgs=[1])
     self.parentFrame.hide()
     self.shuffleFetchMsg = 'ColorShopShuffle'
     self.shuffleButton = ShuffleButton.ShuffleButton(
         self, self.shuffleFetchMsg)