annotate pyntnclick/widgets/overlay.py @ 639:fdc63049b08c pyntnclick

Add game_description to the widgets,, since it looks a useful thing to do
author Neil Muller <neil@dip.sun.ac.za>
date Sun, 12 Feb 2012 01:31:14 +0200
parents 1aac5a3b17e1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
558
f9f04cb35697 s/mamba/pyntnclick/
Stefano Rivera <stefano@rivera.za.net>
parents: 555
diff changeset
1 from pyntnclick.widgets.base import Button
555
c0474fe18b96 Copy in widgets from mamba (currently unused)
Stefano Rivera <stefano@rivera.za.net>
parents:
diff changeset
2
c0474fe18b96 Copy in widgets from mamba (currently unused)
Stefano Rivera <stefano@rivera.za.net>
parents:
diff changeset
3
c0474fe18b96 Copy in widgets from mamba (currently unused)
Stefano Rivera <stefano@rivera.za.net>
parents:
diff changeset
4 class OverlayButton(Button):
c0474fe18b96 Copy in widgets from mamba (currently unused)
Stefano Rivera <stefano@rivera.za.net>
parents:
diff changeset
5 """A non-visiable clickable area, that causes an overlay to be
c0474fe18b96 Copy in widgets from mamba (currently unused)
Stefano Rivera <stefano@rivera.za.net>
parents:
diff changeset
6 displayed. Doesn't really understand this focus thing."""
c0474fe18b96 Copy in widgets from mamba (currently unused)
Stefano Rivera <stefano@rivera.za.net>
parents:
diff changeset
7
639
fdc63049b08c Add game_description to the widgets,, since it looks a useful thing to do
Neil Muller <neil@dip.sun.ac.za>
parents: 602
diff changeset
8 def __init__(self, rect, gd, image):
555
c0474fe18b96 Copy in widgets from mamba (currently unused)
Stefano Rivera <stefano@rivera.za.net>
parents:
diff changeset
9 self.image = image
639
fdc63049b08c Add game_description to the widgets,, since it looks a useful thing to do
Neil Muller <neil@dip.sun.ac.za>
parents: 602
diff changeset
10 super(OverlayButton, self).__init__(rect, gd)
555
c0474fe18b96 Copy in widgets from mamba (currently unused)
Stefano Rivera <stefano@rivera.za.net>
parents:
diff changeset
11
c0474fe18b96 Copy in widgets from mamba (currently unused)
Stefano Rivera <stefano@rivera.za.net>
parents:
diff changeset
12 def draw(self, surface):
c0474fe18b96 Copy in widgets from mamba (currently unused)
Stefano Rivera <stefano@rivera.za.net>
parents:
diff changeset
13 if not self.disabled:
c0474fe18b96 Copy in widgets from mamba (currently unused)
Stefano Rivera <stefano@rivera.za.net>
parents:
diff changeset
14 surface.blit(self.image, surface.get_rect())