projects
/
tabakrolletjie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add reset tool button
[tabakrolletjie.git]
/
tabakrolletjie
/
scenes
/
day.py
diff --git
a/tabakrolletjie/scenes/day.py
b/tabakrolletjie/scenes/day.py
index e3c5f727756303372def9c5927c8b0cfd7691f23..8ac0ed170ac40368bc77705a071ad8bfd7d07e61 100644
(file)
--- a/
tabakrolletjie/scenes/day.py
+++ b/
tabakrolletjie/scenes/day.py
@@
-24,6
+24,8
@@
class DayScene(BaseScene):
self._tools = [
ImageButton('32', 'seed.png', name='seed',
pos=(50, SCREEN_SIZE[1] - 40)),
self._tools = [
ImageButton('32', 'seed.png', name='seed',
pos=(50, SCREEN_SIZE[1] - 40)),
+ ImageButton('32', 'default_cursor.png', name='reset tool',
+ pos=(SCREEN_SIZE[0] - 50, SCREEN_SIZE[1] - 40)),
]
def exit(self, gamestate):
]
def exit(self, gamestate):
@@
-53,7
+55,10
@@
class DayScene(BaseScene):
for tool in self._tools:
if tool.pressed(ev):
print 'tool', tool.name
for tool in self._tools:
if tool.pressed(ev):
print 'tool', tool.name
- self._set_cursor(tool.name)
+ if tool.name == 'reset tool':
+ self._unset_cursor()
+ else:
+ self._set_cursor(tool.name)
return
# Not tool, so check lights
self._lights.toggle_nearest(ev.pos, surfpos=True)
return
# Not tool, so check lights
self._lights.toggle_nearest(ev.pos, surfpos=True)