def display(self): if self.gameplay.paused: glutils.clearGL() glutils.drawString ("Press p or click when you're ready.") intf.glutSwapBuffers() return if intf.pyCaveOptions ['shadows'] and self.light.casts_shadows: self.light.shadowMap.genMap(self.drawShadowCasters) self.light.shadowMap.genMatrix(self.camera) self.render () self.renderText() intf.glutSwapBuffers ()
def display (self): glutils.clearGL() glutils.drawString('Congratulations! You made top 10.',translate=(0,0.2)) glutils.drawString("Please insert your name (or press Esc):") glutils.drawString(self.playerName,translate=(0,-0.2)) glutSwapBuffers()
def display(self): glutils.clearGL() if self.currscore != 0: glutils.drawString("Your score: "+str(int(self.currscore)), translate=(0,0.8), scale=1) glutils.drawString("Highscores: (Press Esc to continue)", translate=(0,0.6)) #glutSwapBuffers() def showElem (i,offset,elem): glPushMatrix() glutils.drawString(str(i) + '- ' + elem.name + ": " + str(int(elem.score)), translate=(0.4,offset), scale=0.8) glPopMatrix() offset = 0.4 i = 1 for elem in reversed(highscores.load()): showElem(i,offset,elem) offset-=0.1 i+=1 glutSwapBuffers()
def renderText (self): intf.glMatrixMode(intf.GL_MODELVIEW) intf.glLoadIdentity() intf.glMatrixMode(intf.GL_PROJECTION) intf.glLoadIdentity() glutils.drawString("Score: " + str(int(self.gameplay.score)), translate=(1.5,0.8)) if intf.pyCaveOptions['show_fps']: glutils.drawString("FPS: " + str(int(self.gameplay.fps)), translate=(1.5,0.6)) if self.gameplay.hardcore: glutils.drawString("HARDCORE MODE",translate=(0.45,-0.6), scale = 2)
def display(self): glutils.clearGL() glutils.drawString("Loading...") glutSwapBuffers()
def showElem (i,offset,elem): glPushMatrix() glutils.drawString(str(i) + '- ' + elem.name + ": " + str(int(elem.score)), translate=(0.4,offset), scale=0.8) glPopMatrix()
def display(self): glutils.clearGL() glutils.drawString("Entering HARDCORE MODE") intf.glutSwapBuffers() intf.glutPostRedisplay()