def __init__(self, parent = None, type = PiratesGuiGlobals.REWARD_PANEL_BLACK_PEARL, doneCallback = None, **kw): optiondefs = (('pad', (0.55000000000000004, 0.47499999999999998), self.resetFrameSize), ('pos', (0.40000000000000002, 0, 0), None)) self.defineoptions(kw, optiondefs) PDialog.__init__(self, parent) self.type = type if doneCallback: self.doneCallback = doneCallback else: self.doneCallback = self.cleanup self.showWeaponsTrack = None skillIcons = loader.loadModel('models/textureCards/skillIcons') weaponIcons = loader.loadModel('models/gui/gui_icons_weapon') isWeapon = TextDict[type]['isWeapon'] if isWeapon: background = skillIcons.find('**/box_base_over') background.setTransparency(0.5) icon = weaponIcons.find('**/' + TextDict[type]['icon']) icon.setScale(0.75) else: background = skillIcons.find('**/base_over') icon = skillIcons.find('**/' + TextDict[type]['icon']) icon.reparentTo(background) self.congratsText = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, textMayChange = 1, text = PLocalizer.RewardCongratulations, text_font = PiratesGlobals.getInterfaceOutlineFont(), text_align = TextNode.ACenter, text_scale = 0.12, text_fg = PiratesGuiGlobals.TextFG1, pos = (0.0, 0, 0.34000000000000002)) self.completeText = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, textMayChange = 1, text = TextDict[type]['title'], text_font = PiratesGlobals.getInterfaceOutlineFont(), text_align = TextNode.ACenter, text_scale = 0.050000000000000003, text_fg = PiratesGuiGlobals.TextFG2, pos = (0, 0, 0.26000000000000001)) self.iconLabel = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, geom = background, geom_scale = 0.29999999999999999, text = TextDict[type]['summary'], text_font = PiratesGlobals.getInterfaceFont(), text_align = TextNode.ACenter, text_scale = 0.040000000000000001, text_fg = PiratesGuiGlobals.TextFG1, text_pos = (0, 0.20000000000000001), pos = (0, 0, -0.029999999999999999)) self.descriptionText = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, textMayChange = 1, text = TextDict[type]['description'], text_font = PiratesGlobals.getInterfaceFont(), text_align = TextNode.ACenter, text_scale = 0.037999999999999999, text_fg = PiratesGuiGlobals.TextFG1, pos = (0, 0, -0.26000000000000001)) self.nextButton = GuiButton.GuiButton(parent = self, state = DGG.NORMAL, text = PLocalizer.lOk, textMayChange = 1, text_scale = PiratesGuiGlobals.TextScaleMed, text_pos = (0, -0.01), pos = (0, 0, -0.5), command = self.doneCallback) self.borderFrame['borderScale'] = 1 self.setupCustomReward() self.initialiseoptions(RewardPanel) self.setScale(1.25)