diff options
author | Alan Aguiar <alanjas@hotmail.com> | 2013-12-30 18:28:05 (GMT) |
---|---|---|
committer | Alan Aguiar <alanjas@hotmail.com> | 2013-12-30 18:28:05 (GMT) |
commit | c31228654df390e12ea7308e31af080005097893 (patch) | |
tree | 3f5b1a70a65f70a65ac9ae8eb385c9c12b91cbca | |
parent | b962afdf8d47acfb46c97d89c4e07608e37673c9 (diff) |
-rwxr-xr-x | gambiarra.py | 2 | ||||
-rw-r--r-- | gamemenu.py | 22 |
2 files changed, 15 insertions, 9 deletions
diff --git a/gambiarra.py b/gambiarra.py index 3e9dd9f..af54971 100755 --- a/gambiarra.py +++ b/gambiarra.py @@ -61,7 +61,7 @@ class Game(): if self.screen is None: self.screen = pygame.display.set_mode((1200, 900)) pygame.display.flip() - pygame.display.set_caption("Gambiarra") + pygame.display.set_caption(_('Gambiarra')) self.clock = pygame.time.Clock() self.levels = Levels.init_levels() self.menu = GameMenu() diff --git a/gamemenu.py b/gamemenu.py index 55d838e..71eaa53 100644 --- a/gamemenu.py +++ b/gamemenu.py @@ -23,6 +23,10 @@ import os import gtk import pygame +from gettext import gettext as _ + +MENU_COLOR = (255, 255, 255) + class GameMenu(object): screen = None background = None @@ -125,10 +129,11 @@ class LevelButton(object): clicked = None def __init__(self, position, levels_number = 1): - img = os.path.join("data", "images", "nivel_normal.png") - non_hover = pygame.image.load(img) - img = os.path.join("data", "images", "nivel_hover.png") - hover = pygame.image.load(img) + fuente = pygame.font.Font(None, 100) + non_hover = fuente.render(_('Level'), 1, MENU_COLOR) + fuente = pygame.font.Font(None, 120) + hover = fuente.render(_('Level'), 1, MENU_COLOR) + self.img = [non_hover, hover] self.position = [600 - non_hover.get_width()/2, position] self.level = 0 @@ -155,10 +160,11 @@ class StartButton(object): clicked = None def __init__(self, position): - img = os.path.join("data", "images", "iniciar_normal.png") - non_hover = pygame.image.load(img) - img = os.path.join("data", "images", "iniciar_hover.png") - hover = pygame.image.load(img) + fuente = pygame.font.Font(None, 100) + non_hover = fuente.render(_('Start'), 1, MENU_COLOR) + fuente = pygame.font.Font(None, 120) + hover = fuente.render(_('Start'), 1, MENU_COLOR) + self.img = [non_hover, hover] self.position = [600 - non_hover.get_width()/2 - 50, position] self.current = 0 |