예제 #1
0
 def drawBox(self, outerRect, frame, screen, gameMode):
     fgColor = Colors.getForegroundColor(Colors(), gameMode)
     bgColor = Colors.getBackgroundColor(Colors(), gameMode)
     innerRect = Rect((outerRect.left - frame, outerRect.top - frame),
                      (outerRect.width + frame*2, outerRect.height + frame*2))
     draw.rect(screen, fgColor, innerRect)
     draw.rect(screen, bgColor, outerRect)        
     return
예제 #2
0
 def getTextSurface(self, text, gameMode, language, fontSize):
     if( language == Languages.ROV ):
         font = self.getRovasFont(gameMode, fontSize)
     else:
         font = self.getFont(gameMode, fontSize)
     fgColor = Colors.getForegroundColor(Colors(), gameMode)
     bgColor = Colors.getBackgroundColor(Colors(), gameMode)
     normal_surface = font.render(text, True, fgColor, bgColor)
     inverse_surface = font.render(text, True, bgColor, fgColor)
     surface = {TextSurfaceTypes.NORMAL : normal_surface, TextSurfaceTypes.INVERSE : inverse_surface}
     return surface
예제 #3
0
 def fillWithBackgroundColor(self, screen, gameMode):
     bgColor = Colors.getBackgroundColor(Colors(), gameMode)
     screen.fill(bgColor)
     return