Mercurial > rinkhals
changeset 287:21b0c4a99c0a
Add close button to price dialog
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 05 Sep 2009 16:00:01 +0000 |
parents | 49418fd43748 |
children | 5539744cfd40 |
files | gamelib/gameboard.py |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/gameboard.py Sat Sep 05 15:41:48 2009 +0000 +++ b/gamelib/gameboard.py Sat Sep 05 16:00:01 2009 +0000 @@ -143,6 +143,8 @@ if hasattr(thing, 'style'): thing.style.width = max_width + 10 + tbl = gui.Table() + tbl.tr() doc = gui.Document(width=400) space = doc.style.font.size(" ") for header in ['Item', 'Buy Price', 'Sell Price']: @@ -163,7 +165,14 @@ " the sell price.".split(): doc.add(gui.Label(word)) doc.space(space) - dialog = gui.Dialog(gui.Label('Price Reference'), doc) + close_button = gui.Button("Close") + tbl.td(doc, colspan=3) + tbl.tr() + tbl.td(gui.Label('')) + tbl.td(gui.Label('')) + tbl.td(close_button) + dialog = gui.Dialog(gui.Label('Price Reference'), tbl) + close_button.connect(gui.CLICK, dialog.close) dialog.open() update_cash_counter = mkcountupdate('cash_counter') @@ -266,7 +275,6 @@ elif e.type == MOUSEMOTION and self.gameboard.sprite_cursor: self.gameboard.update_sprite_cursor(e) - class GameBoard(object): TILE_DIMENSIONS = (20, 20) TOOLBAR_WIDTH = 140