# HG changeset patch # User Jeremy Thurgood # Date 1283023815 -7200 # Node ID 92029c76b687f7db3289cb03f0aa2795f8dc0c53 # Parent 0fd5796a15620481d85e8dfbabd8c00da286322e Different toolbar colour and remove highlighted cursor outside scene widget. diff -r 0fd5796a1562 -r 92029c76b687 gamelib/cursor.py --- a/gamelib/cursor.py Sat Aug 28 21:28:37 2010 +0200 +++ b/gamelib/cursor.py Sat Aug 28 21:30:15 2010 +0200 @@ -5,11 +5,15 @@ from albow.resource import get_image from albow.widget import Widget from pygame.sprite import Sprite, RenderUpdates +from pygame.rect import Rect import pygame import pygame.color import pygame.cursors import pygame.mouse +from gamelib.constants import SCENE_SIZE + + class CursorSprite(Sprite): "A Sprite that follows the Cursor" @@ -102,6 +106,8 @@ cls._cursor_group.add(cls.cursor) def cursor_highlight(self): + if not Rect((0, 0), SCENE_SIZE).collidepoint(pygame.mouse.get_pos()): + return False if self.screen.state.highlight_override: return True current_thing = self.screen.state.current_thing diff -r 0fd5796a1562 -r 92029c76b687 gamelib/gamescreen.py --- a/gamelib/gamescreen.py Sat Aug 28 21:28:37 2010 +0200 +++ b/gamelib/gamescreen.py Sat Aug 28 21:30:15 2010 +0200 @@ -171,6 +171,7 @@ for item in items: item.height = BUTTON_SIZE Row.__init__(self, items, spacing=0, width=SCREEN[0]) + self.bg_color = (127, 127, 127) class GameScreen(Screen, CursorWidget):