Mercurial > rinkhals
changeset 169:946f09ed37cd
Make equipment dialog close after selecting an item to sell.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Thu, 03 Sep 2009 22:44:20 +0000 |
parents | 1014bfcddc4c |
children | 92d11e0544bc |
files | gamelib/gameboard.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/gameboard.py Thu Sep 03 22:42:22 2009 +0000 +++ b/gamelib/gameboard.py Thu Sep 03 22:44:20 2009 +0000 @@ -328,6 +328,7 @@ tbl.td(close_button) self.disp.open(tbl) + return tbl def open_building_dialog(self, building): """Create dialog for manipulating the contents of a building.""" @@ -453,7 +454,7 @@ """Select item of equipment.""" self.add_cash(item.sell_price()) chicken.unequip(item) - self.disp.close(tbl) + self.disp.close(dialog) kwargs = { 'style': { 'padding_left': 10, 'padding_bottom': 10 }} @@ -466,7 +467,7 @@ button.connect(gui.CLICK, sell_item, item, button) tbl.td(button, align=1, **kwargs) - self.open_dialog(tbl) + dialog = self.open_dialog(tbl) def event(self, e): if e.type == KEYDOWN: