Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjlew <jlew.blackout@gmail.com>2010-08-22 02:31:16 (GMT)
committer jlew <jlew.blackout@gmail.com>2010-08-22 02:31:16 (GMT)
commit0140be7ba18c26f7b5fd319207f2b8a39c0a2f26 (patch)
tree66717648265e40619e3cbccb37c03e0e76470d46
parenta9f890daea0c9f04b51dfd226c39835a6999b480 (diff)
Added window title
-rwxr-xr-xMAFH2/MafhActivity.py3
-rw-r--r--MAFH2/fortuneengine/GameEngine.py7
2 files changed, 8 insertions, 2 deletions
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)