Esempio n. 1
0
 def _set_text(self, text):
   tx = FontTheme.Dance_score_display.size(text)[0] + 2
   txt = fontfx.embfade(text, FontTheme.Dance_score_display, 2, (tx, 24), colors.color[_("gray")])
   basemode = pygame.transform.scale(txt, (tx, 48))
   self.baseimage = pygame.surface.Surface((128, 48))
   self.baseimage.blit(basemode, (64 - (tx / 2), 0))
   self.oldscore = -1 # Force a refresh
Esempio n. 2
0
  def __init__(self, playernum, theme, songconf, game):
    LifeBarDisp.__init__(self, playernum, theme, songconf, game)

    self.wontext = fontfx.embfade("WON",FontTheme.Dance_lifebar_text,3,(80,32),(224,32,32))
    self.wontext.set_colorkey(self.failtext.get_at((0,0)), RLEACCEL)
    self.deltas = {"V": 0.02, "P": 0.02, "G": 0.01, "B": -0.01, "M": -0.02 }

    # If we're player 1, it's a new game, so delete the old lifebars.
    if playernum == 0: TugLifeBarDisp.active_bars = [self]
    else: TugLifeBarDisp.active_bars.append(self)
Esempio n. 3
0
    def __init__(self, playernum, theme, songconf, game):
        LifeBarDisp.__init__(self, playernum, theme, songconf, game)

        self.wontext = fontfx.embfade("WON", FontTheme.Dance_lifebar_text, 3,
                                      (80, 32), (224, 32, 32))
        self.wontext.set_colorkey(self.failtext.get_at((0, 0)), RLEACCEL)
        self.deltas = {"V": 0.02, "P": 0.02, "G": 0.01, "B": -0.01, "M": -0.02}

        # If we're player 1, it's a new game, so delete the old lifebars.
        if playernum == 0: TugLifeBarDisp.active_bars = [self]
        else: TugLifeBarDisp.active_bars.append(self)
Esempio n. 4
0
  def __init__(self, playernum, maxlife, songconf, game):
    pygame.sprite.Sprite.__init__(self)
    self.gameover = LIVING
    self.maxlife = maxlife * songconf["life"]
    self.image = pygame.Surface([204, 28])
    self.deltas = {}
    self.record = []
    self.last_record_update = 0

    self.failtext = fontfx.embfade(_("FAILED"), FontTheme.Dance_lifebar_text, 3, [80, 32], [224, 32, 32])
    self.failtext.set_colorkey(self.failtext.get_at([0, 0]), RLEACCEL)

    self.rect = self.image.get_rect()
    self.rect.top = 30
    self.rect.centerx = game.sprite_center + playernum * game.player_offset
Esempio n. 5
0
    def __init__(self, playernum, maxlife, songconf, game):
        pygame.sprite.Sprite.__init__(self)
        self.gameover = LIVING
        self.maxlife = maxlife * songconf["life"]
        self.image = pygame.Surface([204, 28])
        self.deltas = {}
        self.record = []
        self.last_record_update = 0

        self.failtext = fontfx.embfade(_("FAILED"),
                                       FontTheme.Dance_lifebar_text, 3,
                                       [80, 32], [224, 32, 32])
        self.failtext.set_colorkey(self.failtext.get_at([0, 0]), RLEACCEL)

        self.rect = self.image.get_rect()
        self.rect.top = 30
        self.rect.centerx = game.sprite_center + playernum * game.player_offset