Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/api/Game.py
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2013-08-12 20:41:30 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2013-08-12 20:41:30 (GMT)
commitaffb27b6ed933ab51cd1ef6e44d767f3cc40c66c (patch)
tree5907b311ab54e9f44cf1ec6b30a87ba2f38d06c2 /src/api/Game.py
parent4508a939d037888212edc3ae59edfcf9a437dc81 (diff)
add sugargame
Diffstat (limited to 'src/api/Game.py')
-rwxr-xr-xsrc/api/Game.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/api/Game.py b/src/api/Game.py
index c215166..071edb7 100755
--- a/src/api/Game.py
+++ b/src/api/Game.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
+import gtk
import pygame
#from pygame.locals import *
import pygame.font
@@ -102,9 +103,12 @@ class CGame(object):
print "start game loop here"
while not self.mQuit:
- self.mClock.tick(30)
+ self.mClock.tick(30)
#print ("FPS: %.0f" % self.mClock.get_fps())
+ while gtk.events_pending():
+ gtk.main_iteration()
+
for event in pygame.event.get():
if event.type == pygame.QUIT:
self.mQuit = True
@@ -112,7 +116,7 @@ class CGame(object):
if event.key == K_ESCAPE:
self.mQuit = True
- self.doEvents(event)
+ #self.doEvents(event)
self.mMouse.update()
self.mMousePointerSprite.setXY(self.mMouse.getX(), self.mMouse.getY())