def init(): globalVarDict.update({'render': render, 'camera': camera, 'hidden': hidden, 'aspect2d': aspect2d, 'localToon': base.localAvatar, 'laffMeter': base.localAvatar.laffMeter, 'inventory': base.localAvatar.inventory, 'bFriendsList': base.localAvatar.bFriendsList, 'book': base.localAvatar.book, 'bookPrevArrow': base.localAvatar.book.prevArrow, 'bookNextArrow': base.localAvatar.book.nextArrow, 'bookOpenButton': base.localAvatar.book.bookOpenButton, 'bookCloseButton': base.localAvatar.book.bookCloseButton, 'chatNormalButton': base.localAvatar.chatMgr.normalButton, 'chatScButton': base.localAvatar.chatMgr.scButton, 'arrows': BlinkingArrows.BlinkingArrows()})
def init(): inventoryOrigin = aspect2d.attachNewNode("quest_parser_inventory_origin") inventoryOrigin.setPos(.1, 0, -1) globalVarDict.update({'render': render, 'camera': camera, 'hidden': hidden, 'aspect2d': aspect2d, 'localToon': base.localAvatar, 'laffMeter': base.localAvatar.laffMeter, 'inventory': base.localAvatar.inventory, 'bFriendsList': base.localAvatar.bFriendsList, 'book': base.localAvatar.book, 'bookPrevArrow': base.localAvatar.book.prevArrow, 'bookNextArrow': base.localAvatar.book.nextArrow, 'bookOpenButton': base.localAvatar.book.bookOpenButton, 'bookCloseButton': base.localAvatar.book.bookCloseButton, 'chatNormalButton': base.localAvatar.chatMgr.normalButton, 'chatScButton': base.localAvatar.chatMgr.scButton, 'arrows': BlinkingArrows.BlinkingArrows(), 'a2dBottomLeft': base.a2dBottomLeft, 'a2dBottomRight': base.a2dBottomRight, 'inventoryOrigin': inventoryOrigin, })
def loadBattleFrame(self): battleModels = loader.loadModelOnce('phase_3.5/models/gui/battle_gui') self.battleFrame = DirectFrame( relief=None, image=battleModels.find('**/BATTLE_Menu'), image_scale=0.8, parent=self) self.runButton = DirectButton(parent=self.battleFrame, relief=None, pos=(0.68, 0, -0.396), text=Localizer.InventoryRun, text_scale=0.05, text_pos=(0, -0.02), text_fg=Vec4(1, 1, 1, 1), textMayChange=0, image=(self.upButton, self.downButton, self.rolloverButton), image_scale=1.05, image_color=(0, 0.6, 1, 1), command=self.__handleRun) self.sosButton = DirectButton(parent=self.battleFrame, relief=None, pos=(0.91, 0, -0.396), text=Localizer.InventorySOS, text_scale=0.05, text_pos=(0, -0.02), text_fg=Vec4(1, 1, 1, 1), textMayChange=0, image=(self.upButton, self.downButton, self.rolloverButton), image_scale=1.05, image_color=(0, 0.6, 1, 1), command=self.__handleSOS) self.passButton = DirectButton(parent=self.battleFrame, relief=None, pos=(0.91, 0, -0.237), text=Localizer.InventoryPass, text_scale=0.05, text_pos=(0, -0.02), text_fg=Vec4(1, 1, 1, 1), textMayChange=0, image=(self.upButton, self.downButton, self.rolloverButton), image_scale=1.05, image_color=(0, 0.6, 1, 1), command=self.__handlePass) self.tutText = DirectFrame( parent=self.battleFrame, relief=None, pos=(0.15, 0, -0.1133), scale=0.143, image=getDefaultDialogGeom(), image_scale=5.125, image_pos=(0, 0, -0.65), image_color=ToontownGlobals.GlobalDialogColor, text=Localizer.InventoryClickToAttack, textMayChange=0) self.tutText.hide() self.tutArrows = BlinkingArrows.BlinkingArrows(parent=self.battleFrame) battleModels.removeNode() self.battleFrame.hide() return return