Mercurial > pyntnclick
diff gamelib/gamescreen.py @ 133:0530547a131f
Better map handling, detail_view stuff in Result.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Tue, 24 Aug 2010 19:49:10 +0200 |
parents | 4223d66d88b4 |
children | faac82748f5a |
line wrap: on
line diff
--- a/gamelib/gamescreen.py Tue Aug 24 19:22:01 2010 +0200 +++ b/gamelib/gamescreen.py Tue Aug 24 19:49:10 2010 +0200 @@ -15,7 +15,7 @@ from hand import HandButton from popupmenu import PopupMenu, PopupMenuButton from state import initial_state, Item - +from widgets import MessageDialog class InventoryView(PaletteView): @@ -78,6 +78,12 @@ if not self.subwidgets: self.state.mouse_move(event.pos) + def show_message(self, message): + # Display the message as a modal dialog + MessageDialog(message, 60).present() + # queue a redraw to show updated state + self.invalidate() + def show_detail(self, detail): w, h = self.state.set_current_detail(detail) self.detail.set_image_rect(Rect(0, 0, w, h))