Mercurial > pyntnclick
comparison pyntnclick/scenewidgets.py @ 819:80ff3c9187bc pyntnclick
Rename InteractText to InteractDebugText to better reflect it's aim
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Mon, 28 Jan 2013 15:48:31 +0200 |
parents | 8b4a0aad8aeb |
children | e42d19c2237b |
comparison
equal
deleted
inserted
replaced
818:8b4a0aad8aeb | 819:80ff3c9187bc |
---|---|
32 | 32 |
33 def __init__(self, x, y, w, h): | 33 def __init__(self, x, y, w, h): |
34 super(InteractNoImage, self).__init__(None, None, Rect(x, y, w, h)) | 34 super(InteractNoImage, self).__init__(None, None, Rect(x, y, w, h)) |
35 | 35 |
36 | 36 |
37 class InteractText(Interact): | 37 class InteractDebugText(Interact): |
38 """Display box with text to interact with -- mostly for debugging.""" | 38 """Display box with text to interact with -- mostly for debugging.""" |
39 | 39 |
40 def __init__(self, x, y, text, bg_color=None): | 40 def __init__(self, x, y, text, bg_color=None): |
41 if bg_color is None: | 41 if bg_color is None: |
42 bg_color = (127, 127, 127) | 42 bg_color = (127, 127, 127) |
47 # label.bg_color = bg_color | 47 # label.bg_color = bg_color |
48 # label.fg_color = (0, 0, 0) | 48 # label.fg_color = (0, 0, 0) |
49 image = Surface(label.size) | 49 image = Surface(label.size) |
50 rect = Rect((x, y), label.size) | 50 rect = Rect((x, y), label.size) |
51 label.draw_all(image) | 51 label.draw_all(image) |
52 super(InteractText, self).__init__(image, rect, rect) | 52 super(InteractDebugText, self).__init__(image, rect, rect) |
53 | 53 |
54 | 54 |
55 class InteractRectUnion(Interact): | 55 class InteractRectUnion(Interact): |
56 | 56 |
57 def __init__(self, rect_list): | 57 def __init__(self, rect_list): |