Changeset 287:21b0c4a99c0a


Ignore:
Timestamp:
Sep 5, 2009, 4:00:01 PM (11 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Convert:
svn:b4e93282-eac8-4b8b-b765-0f5d36de2b68@288
Message:

Add close button to price dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gamelib/gameboard.py

    r286 r287  
    144144                    thing.style.width = max_width + 10
    145145
     146        tbl = gui.Table()
     147        tbl.tr()
    146148        doc = gui.Document(width=400)
    147149        space = doc.style.font.size(" ")
     
    164166            doc.add(gui.Label(word))
    165167            doc.space(space)
    166         dialog = gui.Dialog(gui.Label('Price Reference'), doc)
     168        close_button = gui.Button("Close")
     169        tbl.td(doc, colspan=3)
     170        tbl.tr()
     171        tbl.td(gui.Label(''))
     172        tbl.td(gui.Label(''))
     173        tbl.td(close_button)
     174        dialog = gui.Dialog(gui.Label('Price Reference'), tbl)
     175        close_button.connect(gui.CLICK, dialog.close)
    167176        dialog.open()
    168177
     
    266275        elif e.type == MOUSEMOTION and self.gameboard.sprite_cursor:
    267276            self.gameboard.update_sprite_cursor(e)
    268 
    269277
    270278class GameBoard(object):
Note: See TracChangeset for help on using the changeset viewer.