def generateBuildDataBoard(self, parent): self.buildData = hidden.attachNewNode('buildData') self.buildData.setPosHprScale(0.0, 0, 4.5, 90, 0, 0, 0.9, 0.9, 0.9) self.buildData.setDepthOffset(1) self.logoNode, self.logoImg = CIGlobals.getLogoImage( self.buildData, 12, (0, 0, -3.15)) # Let's generate the Toontown Time textnode. _, self.ttTimePath = self.__generateTextNodeAndNodePath( 'toontownTimeText', 'Toontown Time: Disabled') self.ttTimePath.reparentTo(self.buildData) self.ttTimePath.setScale(0.85) self.ttTimePath.setZ(-8.0) # Let's generate the Build Version text node. _, self.currentBuild = self.__generateTextNodeAndNodePath( 'currentBuildVersion', 'Current Build: {0} v{1}'.format(metadata.BUILD_NUMBER, metadata.VERSION)) self.currentBuild.reparentTo(self.buildData) self.currentBuild.setScale(0.75) self.currentBuild.setZ(-9.25) # Let's generate the Build Date text node _, self.buildDate = self.__generateTextNodeAndNodePath( 'currentBuildDate', 'Build Date: {0}'.format(metadata.BUILD_DATE)) self.buildDate.reparentTo(self.buildData) self.buildDate.setScale(0.75) self.buildDate.setZ(-10.25) self.buildData.reparentTo(parent) # Let's begin our clock task. """
def __init__(self): self.defaultLogoScale = 1 self.defaultLogoZ = 0.65 self.bgm = loader.loadModel( "phase_3/models/gui/progress-background.bam") self.bgm.find('**/logo').stash() self.barShadow = OnscreenImage(image=self.bgm.find("**/bar_shadow"), parent=hidden) self.bgm.find("**/bar_shadow").removeNode() self.bg = self.bgm.find('**/bg') self.defaultBgTexture = self.bg.findTexture('*') self.logoNode, self.logoImg = CIGlobals.getLogoImage( hidden, self.defaultLogoScale, (0, 0, self.defaultLogoZ)) self.bg_img = OnscreenImage(image=self.bg, parent=hidden) self.bg_img.setSx(1.35) self.bg_img.hide() self.progress_bar = DirectWaitBar(value=0, pos=(0, 0, -0.85), parent=hidden, text_pos=(0, 0, 0.2)) self.progress_bar.setSx(1.064) self.progress_bar.setSz(0.38) toontipgui = loader.loadModel( 'phase_3.5/models/gui/stickerbook_gui.bam') poster = toontipgui.find('**/questCard') self.toontipFrame = DirectFrame(image=poster, image_scale=(1.4, 1, 1), parent=hidden, relief=None, pos=(0, 0, -0.1), scale=0.85) self.toontipLbl = OnscreenText(text="", parent=self.toontipFrame, fg=(89.0 / 255, 95.0 / 255, 98.0 / 255, 1), font=CIGlobals.getToonFont(), wordwrap=13, pos=(-0.59, 0.25), align=TextNode.ALeft, scale=0.08) self.loading_lbl = DirectLabel(text="", relief=None, scale=0.08, pos=(-1.0725, 0, -0.79), text_align=TextNode.ALeft, sortOrder=100, text_fg=(1, 1, 1, 1), text_font=CIGlobals.getMinnieLogoFont(), parent=hidden, text_shadow=(0, 0, 0, 0)) # This is useful when the user has chosen to hide aspect2d before the loading screen. # However, we want to show the loading screen all the time, so we need to restore the # previous state after the loading screen ends. self.mustRestoreHiddenAspect2d = False
def __init__(self, page): OptionsCategory.__init__(self, page) DirectObject.__init__(self) self.logoNode, self.logoImg = CIGlobals.getLogoImage( self.page.book, 0.75, (0, 0, 0.48)) self.creditsScreen = None self.exitConfirmDlg = None font = CIGlobals.getToonLogoFont() self.gVersionText = OnscreenText(metadata.getBuildInformation(), parent=self.page.book, pos=(0, 0.15, 0.15), font=font, fg=(1, 1, 1, 1)) self.gBuildDate = OnscreenText(text=metadata.BUILD_DATE, parent=self.page.book, pos=(0, 0.085, 0.085), scale=0.06, font=font, fg=(1, 1, 1, 1)) self.eVersionText = OnscreenText(text="Engine Version {0}".format( PandaSystem.getVersionString()), parent=self.page.book, pos=(0, -0.05), font=font, fg=(1, 1, 1, 1)) self.eBuildDate = OnscreenText(text=PandaSystem.getBuildDate(), parent=self.page.book, pos=(0, -0.115), scale=0.06, font=font, fg=(1, 1, 1, 1)) self.exitToontown = CIGlobals.makeDefaultBtn( "Exit Toontown", pos=(-0.62, -0.62, -0.62), parent=self.page.book, scale=1.2, command=self.showConfirmDlg, geom_scale=(0.8, 0.8, 0.8)) self.credits = CIGlobals.makeDefaultBtn("Credits", pos=(0.0, 0.5, -0.62), parent=self.page.book, scale=1.2, command=self.rollCredits, geom_scale=(0.8, 0.8, 0.8))