def __init__(self, position): surface.Surface.__init__(self, position + TeamSurface.SIZE) self.img_props = images.load_props() self.imgs = images.load_pix() self.font = pygame.font.Font(paths.get_font('font.ttf'), 12) self.font2 = pygame.font.Font(paths.get_font('font.ttf'), 10)
def __init__(self, screen_dim): dim = (HelpSurface.WIDTH, HelpSurface.HEIGHT) pos = ((screen_dim[0] - dim[0]) / 2, (screen_dim[1] - dim[1]) / 2) surface.Surface.__init__(self, pos + dim) self.font = pygame.font.Font(paths.get_font("font.ttf"), 13) self.update()
def __init__(self, position, width): surface.Surface.__init__(self, position + (width, get_height())) self.font = pygame.font.Font(paths.get_font('font.ttf'), 12) self.actions_surf = None self.cur = 0 self.max = 0 self.text_width = self.size[0] - 2 * ActionsSurface.PADDING self.text_height = self.size[1] - 2 * ActionsSurface.PADDING self.arrow_up = self.font.render(u'↑', True, (255, 255, 255)) self.arrow_down = self.font.render(u'↓', True, (255, 255, 255)) self.arrow_size = self.arrow_up.get_size()
def __init__(self, position, detail): self.img_props = imgp = images.load_props() vshift = imgp['vshift'] tile_size = imgp['tile_size'] size = (TAILLE_TERRAIN * tile_size[0], vshift + TAILLE_TERRAIN * tile_size[1]) surface.Surface.__init__(self, position + size) self.imgs = images.load_pix() self.grid_surface = self.get_grid() self.detail = detail self.detail_pos = None self.font = pygame.font.Font(paths.get_font('font.ttf'), 12)
def __init__(self, position, width): rect = position + (width, 3 * StateSurface.TEXT_HEIGHT) surface.Surface.__init__(self, rect) self.font = pygame.font.Font(paths.get_font('font.ttf'), StateSurface.TEXT_SIZE) self.last_turn = -1
def __init__(self, position, width): surface.Surface.__init__(self, position + (width, DetailSurface.HEIGHT)) self.imgs = images.load_pix() self.font = pygame.font.Font(paths.get_font('font.ttf'), 12)