Mercurial > rinkhals
comparison gamelib/cursors.py @ 162:fa57868123d7
Basic cursor support
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Thu, 03 Sep 2009 22:19:34 +0000 |
parents | |
children | bca2f4396de8 |
comparison
equal
deleted
inserted
replaced
161:9b4213f6ea7f | 162:fa57868123d7 |
---|---|
1 """Data for the in game cursors""" | |
2 | |
3 import pygame | |
4 | |
5 import data | |
6 | |
7 | |
8 cursors = { | |
9 'arrow' : pygame.cursors.arrow, | |
10 'select' : pygame.cursors.broken_x, | |
11 } | |
12 | |
13 for tag, filename in [ | |
14 ('chicken', 'cursors/chkn.xbm'), | |
15 ('rifle', 'cursors/equip_rifle.xbm'), | |
16 ('knife', 'cursors/equip_knife.xbm'), | |
17 ]: | |
18 path = data.filepath(filename) | |
19 # pygame 1.8 needs the file twice to do the right thing | |
20 # XXX: check behaviour with pygame 1.9 | |
21 cursors[tag] = pygame.cursors.load_xbm(path, path) | |
22 | |
23 |