self.cond = threading.Condition()
self.sleep_timeout = None
self.last_event = time.time()
+ self.blackout = False
#print "Test font"
pygame.font.Font(os.path.join(os.path.curdir, "data", "DejaVuSans.ttf"), 32).render("Hello", True,(0,0,0))
#print "Display pieces"
self.board.display_pieces(window = self.window, grid_sz = self.grid_sz) # Draw the board
+ self.blackout = False
- else:
+ elif pygame.mouse.get_focused() and not self.blackout:
+ os.system("xset dpms force off")
+ self.blackout = True
self.window.fill((0,0,0))
pygame.display.flip()
-
+
sys.exit(102)
# --- main.py --- #
-# EOF - created from make on Fri Mar 29 18:33:24 WST 2013
+# EOF - created from make on Tue Apr 2 15:05:07 WST 2013
self.cond = threading.Condition()
self.sleep_timeout = None
self.last_event = time.time()
+ self.blackout = False
#print "Test font"
pygame.font.Font(os.path.join(os.path.curdir, "data", "DejaVuSans.ttf"), 32).render("Hello", True,(0,0,0))
#print "Display pieces"
self.board.display_pieces(window = self.window, grid_sz = self.grid_sz) # Draw the board
+ self.blackout = False
- else:
+ elif pygame.mouse.get_focused() and not self.blackout:
+ os.system("xset dpms force off")
+ self.blackout = True
self.window.fill((0,0,0))
pygame.display.flip()
-
+