def drawStateBoard(self, grid, players, lvlTime, localRecord, worldRecord): """ Prints data on state board """ scr = self.screens['STATEBOARD'] posX = MENU_SPACE_S posY = MENU_SPACE_M ### LEVEL METADATA ### # Level label posY = scr.drawText(text=MENU_LEVEL_LBL, color=GLOBAL_LABEL_COLOR, size=MENU_LBL_SZ_S, posX=posX, posY=posY, bold=1) # Level title posY = scr.drawText(text=grid.lvlName, color=GLOBAL_MENU_COLOR, size=MENU_LBL_SZ_S, posX=posX, posY=posY, bold=1) # Author label posY += MENU_SPACE_M posY = scr.drawText(text=MENU_AUTHOR_LBL, color=GLOBAL_LABEL_COLOR, size=MENU_LBL_SZ_S, posX=posX, posY=posY, bold=1) # Level author posY = scr.drawText(text=grid.lvlAuthor, color=GLOBAL_MENU_COLOR, size=MENU_LBL_SZ_S, posX=posX, posY=posY, bold=1) ### PLAYER INFO ### posY += MENU_SPACE_M*2 for p in players: # Name posY += MENU_SPACE_M posY = scr.drawText(text=p.name, color=p.color, size=MENU_LBL_SZ_S, posX=posX, posY=posY, bold=1) # Lives icons posY += MENU_SPACE_S for i in range (p.lives): obj = Bunch(posX=scr.width-MENU_SPACE_S-(BALL_RADIUS+i*(BALL_RADIUS*2+MENU_SPACE_S)), posY=posY+BALL_RADIUS, radius=BALL_RADIUS, color=p.color, border=False) scr.drawObject(obj, SHAPE['CIRCLE']) # Lives label posY = scr.drawText(text=MENU_LIVES_LBL, color=GLOBAL_MENU_COLOR, size=MENU_LBL_SZ_XS, posX=posX, posY=posY, bold=1) # Level score value posY += MENU_SPACE_S scr.drawText(text=str(p.scores[0].value), color=p.color, size=MENU_LBL_SZ_XS, posX=posX, posY=posY, bold=1, alignH=TEXT_ALIGN['H']['RIGHT']) # Level score label posY = scr.drawText(text=SCORE_LVL_LBL, color=GLOBAL_MENU_COLOR, size=MENU_LBL_SZ_XS, posX=posX, posY=posY, bold=1) # Total score value posY += MENU_SPACE_S scr.drawText(text=str(p.totalScore), color=p.color, size=MENU_LBL_SZ_XS, posX=posX, posY=posY, bold=1, alignH=TEXT_ALIGN['H']['RIGHT']) # Level score label posY = scr.drawText(text=SCORE_TOTAL_LBL, color=GLOBAL_MENU_COLOR, size=MENU_LBL_SZ_XS, posX=posX, posY=posY, bold=1) ### TIME ### posY += MENU_SPACE_M*4 # Time value scr.drawText(text=str(lvlTime.formatCounter(2)), color=GLOBAL_MENU_COLOR, size=MENU_LBL_SZ_S, posX=posX, posY=posY, bold=1, alignH=TEXT_ALIGN['H']['RIGHT']) # Time label scr.drawText(text=MENU_TIME_LBL, color=GLOBAL_LABEL_COLOR, size=MENU_LBL_SZ_S, posX=posX, posY=posY, bold=1) # Local Record if localRecord: posY += MENU_SPACE_M*2 scr.drawText(text=str(Counter.staticFormat(localRecord, 2)), color=GLOBAL_MENU_COLOR, size=MENU_LBL_SZ_S, posX=posX, posY=posY, bold=1, alignH=TEXT_ALIGN['H']['RIGHT']) scr.drawText(text=MENU_LOCAL_TIME_LBL, color=GLOBAL_LABEL_COLOR, size=MENU_LBL_SZ_S, posX=posX, posY=posY, bold=1) # World Record if worldRecord: posY += MENU_SPACE_M*2 scr.drawText(text=str(Counter.staticFormat(worldRecord, 2)), color=GLOBAL_MENU_COLOR, size=MENU_LBL_SZ_S, posX=posX, posY=posY, bold=1, alignH=TEXT_ALIGN['H']['RIGHT']) scr.drawText(text=MENU_WORLD_TIME_LBL, color=GLOBAL_LABEL_COLOR, size=MENU_LBL_SZ_S, posX=posX, posY=posY, bold=1)