Mercurial > pyntnclick
comparison gamelib/gamescreen.py @ 314:63e702d93e0e
Call detail enter and leave hooks
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 28 Aug 2010 12:10:20 +0200 |
parents | 3cedc4f95925 |
children | fd849354be58 |
comparison
equal
deleted
inserted
replaced
313:40dd77f71e11 | 314:63e702d93e0e |
---|---|
104 | 104 |
105 def show_detail(self, detail): | 105 def show_detail(self, detail): |
106 w, h = self.state.set_current_detail(detail) | 106 w, h = self.state.set_current_detail(detail) |
107 self.detail.set_image_rect(Rect(0, 0, w, h)) | 107 self.detail.set_image_rect(Rect(0, 0, w, h)) |
108 self.add_centered(self.detail) | 108 self.add_centered(self.detail) |
109 self.state.do_enter_detail() | |
109 self.parent.cursor_highlight(False) | 110 self.parent.cursor_highlight(False) |
110 | 111 |
111 def clear_detail(self): | 112 def clear_detail(self): |
112 """Hide the detail view""" | 113 """Hide the detail view""" |
113 self.remove(self.detail) | 114 self.remove(self.detail) |
115 self.state.do_leave_detail() | |
114 self.state.set_current_detail(None) | 116 self.state.set_current_detail(None) |
115 | 117 |
116 | 118 |
117 class DetailWindow(Widget): | 119 class DetailWindow(Widget): |
118 def __init__(self, screen): | 120 def __init__(self, screen): |