from ..constants import SCREEN_SIZE, FONTS
from ..widgets import ImageButton
from ..turnip import Turnip, TurnipInvalidPosition
+from ..transforms import Overlay
class DayScene(BaseScene):
self._tools = [
ImageButton('32', 'seed.png', name='seed',
pos=(50, SCREEN_SIZE[1] - 40)),
+ ImageButton('32', 'spotlight.png', name='blue_spotlight',
+ pos=(100, SCREEN_SIZE[1] - 40),
+ transform=Overlay(colour=(0, 0, 255, 128))),
+ ImageButton('32', 'spotlight.png', name='red_spotlight',
+ pos=(150, SCREEN_SIZE[1] - 40),
+ transform=Overlay(colour=(255, 0, 0, 128))),
ImageButton('32', 'default_cursor.png', name='reset tool',
pos=(SCREEN_SIZE[0] - 50, SCREEN_SIZE[1] - 40)),
]
self._tool = None
else:
self._tool = tool.name
- self._set_cursor(tool.name)
+ if self._tool == 'seed':
+ self._set_cursor(tool.name)
+ elif self._tool == 'red_spotlight':
+ self._set_cursor(
+ 'spotlight',
+ transform=Overlay(colour=(255, 0, 0, 128)))
+ elif self._tool == 'blue_spotlight':
+ self._set_cursor(
+ 'spotlight',
+ transform=Overlay(colour=(0, 0, 255, 128)))
return
if self._tool == "seed":
if self._seeds > 0:
# Not tool, so check lights
self._lights.toggle_nearest(ev.pos, surfpos=True)
print self._lights.lit_by(ev.pos, surfpos=True)
+ elif ev.button == 3 and self._tool:
+ self._tool = None
+ self._unset_cursor()
@debug_timer("day.tick")
def tick(self, gamestate):