Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2013-05-19 11:02:41 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2013-05-19 11:02:41 (GMT)
commitead683c637ed8078deb00a8db8544e674694c55f (patch)
tree966d996767f2555b2cf639ad3e98bbd3aef23e93
parent3f81369e2f381dd4c929b75b366c5fdac817c81c (diff)
add sugar cursor
-rwxr-xr-xcells.py4
-rw-r--r--cursor.py35
2 files changed, 38 insertions, 1 deletions
diff --git a/cells.py b/cells.py
index af6367f..9e4cf94 100755
--- a/cells.py
+++ b/cells.py
@@ -24,6 +24,7 @@ from random import randint, shuffle
from pieces import EscapeArea, Cell, Hideout
from sprites import Text, Group, Guard
from colors import blue, yellow, black, white
+import cursor
from gettext import gettext as _
@@ -35,10 +36,11 @@ class Game():
def __init__(self, fps = 30):
self.fps = fps
+ self.cursor = pygame.cursors.compile(cursor.cursor_data)
def load_all(self):
pygame.init()
-
+ pygame.mouse.set_cursor((32,32), (1,1), *self.cursor)
self.screen = pygame.display.get_surface()
if not(self.screen):
self.screen = pygame.display.set_mode((1200, 800))
diff --git a/cursor.py b/cursor.py
new file mode 100644
index 0000000..7505ed4
--- /dev/null
+++ b/cursor.py
@@ -0,0 +1,35 @@
+# cursor
+cursor_data = (
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
+ "XXX.........................XXXX",
+ "XXX..........................XXX",
+ "XXX..........................XXX",
+ "XXX.........................XXXX",
+ "XXX.......XXXXXXXXXXXXXXXXXXXXX ",
+ "XXX........XXXXXXXXXXXXXXXXXXX ",
+ "XXX.........XXX ",
+ "XXX..........XXX ",
+ "XXX...........XXX ",
+ "XXX....X.......XXX ",
+ "XXX....XX.......XXX ",
+ "XXX....XXX.......XXX ",
+ "XXX....XXXX.......XXX ",
+ "XXX....XXXXX.......XXX ",
+ "XXX....XXXXXX.......XXX ",
+ "XXX....XXX XXX.......XXX ",
+ "XXX....XXX XXX.......XXX ",
+ "XXX....XXX XXX.......XXX ",
+ "XXX....XXX XXX.......XXX ",
+ "XXX....XXX XXX.......XXX ",
+ "XXX....XXX XXX.......XXX ",
+ "XXX....XXX XXX.......XXX ",
+ "XXX....XXX XXX.......XXX ",
+ "XXX....XXX XXX.......XXX",
+ "XXX....XXX XXX......XXX",
+ "XXX....XXX XXX.....XXX",
+ "XXX....XXX XXX...XXXX",
+ " XXX..XXX XXXXXXXX ",
+ " XXXXXX XXXXXX ",
+ " XXXX XXXX ")
+