Mercurial > boomslang
annotate pyntnclick/widgets/overlay.py @ 683:e6a32df9199e pyntnclick
Detail border.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Mon, 13 Feb 2012 00:13:19 +0200 |
parents | fdc63049b08c |
children |
rev | line source |
---|---|
558 | 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()) |