diff options
author | Justin Lewis <jtl1728@rit.edu> | 2010-01-29 18:02:55 (GMT) |
---|---|---|
committer | Justin Lewis <jtl1728@rit.edu> | 2010-01-29 18:02:55 (GMT) |
commit | c9a1d5397b7b60477b406c55cc261f27298fe9dd (patch) | |
tree | 98ba089d7639807f599fc30cd0cfe817bcb92273 /FortuneMaker.activity | |
parent | b85b915c2e8782ad361c54d741375d32c9b085a4 (diff) |
Added items to room grid. Also increased room size to 150x150
Diffstat (limited to 'FortuneMaker.activity')
-rw-r--r-- | FortuneMaker.activity/Room.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/FortuneMaker.activity/Room.py b/FortuneMaker.activity/Room.py index 737ec58..8557cea 100644 --- a/FortuneMaker.activity/Room.py +++ b/FortuneMaker.activity/Room.py @@ -7,6 +7,8 @@ from constants import ( import gtk import pango +ROOM_SIZE = 150 +FONT = 'Serif 5' class Room: def __init__(self, x = -1, y = -1, str=None): self._x = x @@ -196,14 +198,18 @@ class Room: if enemy != '0': room_text += ENEM_INDEX[enemy] + "\n" + for item in self.item: + if item[0] != '0': + room_text += ITEM_INDEX[item[0]] + " (" + ITEM_FLAGS[item[1]] + ")\n" + xgc.set_rgb_fg_color(gtk.gdk.color_parse("#000000")) - font_desc = pango.FontDescription('Serif 4') + font_desc = pango.FontDescription( FONT ) layout = widget.create_pango_layout( room_text ) layout.set_font_description(font_desc) widget.window.draw_layout(xgc, 7, 7, layout) drawing_area = gtk.DrawingArea() - drawing_area.set_size_request(100, 100) + drawing_area.set_size_request(ROOM_SIZE, ROOM_SIZE) drawing_area.connect("expose-event", expose_handler) drawing_area.set_events(gtk.gdk.BUTTON_PRESS_MASK) |