From 0140be7ba18c26f7b5fd319207f2b8a39c0a2f26 Mon Sep 17 00:00:00 2001 From: jlew Date: Sun, 22 Aug 2010 02:31:16 +0000 Subject: Added window title --- diff --git a/MAFH2/MafhActivity.py b/MAFH2/MafhActivity.py index 4d53942..752c21a 100755 --- a/MAFH2/MafhActivity.py +++ b/MAFH2/MafhActivity.py @@ -7,7 +7,8 @@ from Comic import Comic from Profile import Profile from MafhGameManager import MafhGameManager -ge = GameEngine(width=1200, height=900, always_draw=True, fps_cap=24, version=True) +ge = GameEngine(width=1200, height=900, always_draw=True, fps_cap=24, + version=True, title="Mathematical Adventure: Fortune Hunter") def start_game(): ge.add_object('manager', MafhGameManager() ) diff --git a/MAFH2/fortuneengine/GameEngine.py b/MAFH2/fortuneengine/GameEngine.py index 09d1c4f..aa9ebd1 100644 --- a/MAFH2/fortuneengine/GameEngine.py +++ b/MAFH2/fortuneengine/GameEngine.py @@ -29,7 +29,8 @@ class GameEngine(object): """ instance = None - def __init__(self, width=1200, height=900, always_draw=False, fps_cap=15, version=False): + def __init__(self, width=1200, height=900, always_draw=False, + fps_cap=15, version=False, title="FortuneEngine"): """ Constructor for the game engine. @@ -41,6 +42,9 @@ class GameEngine(object): the cap. Warning: setting the cap to 0 when always draw = False will cause cpu 100% when not driving. + @param version: If true, use new rendering system, false uses + only the draw system + @param title: Window Title """ GameEngine.instance = self pygame.init() @@ -52,6 +56,7 @@ class GameEngine(object): self.height = height size = width, height self.screen = pygame.display.set_mode(size) + pygame.display.set_caption(title) self.__fps = DrawableFontObject("", pygame.font.Font(None, 17)) self.__fps.setPosition(0,0) self.__scene = Scene(self.__fps) -- cgit v0.9.1