comparison gui/containergui_base.py @ 135:9e86c37f5506

Added context menu to the inventory.
author KarstenBock@gmx.net
date Sat, 08 Oct 2011 14:25:48 +0200
parents aea5a9229b4c
children c28e29056218
comparison
equal deleted inserted replaced
134:73b7188a461d 135:9e86c37f5506
122 @param obj: The name of the object within 122 @param obj: The name of the object within
123 the dictionary 'self.buttons' 123 the dictionary 'self.buttons'
124 @return: None""" 124 @return: None"""
125 if event.getButton() == event.RIGHT: 125 if event.getButton() == event.RIGHT:
126 item = widget.item 126 item = widget.item
127 if item: 127 if item:
128 item = item.entity 128 if not isinstance(item, General):
129 item = item.entity
129 actions = {} 130 actions = {}
130 if item.usable: 131 if item.usable:
131 actions = deepcopy(item.usable.actions) 132 actions = deepcopy(item.usable.actions)
132 x_pos, y_pos = widget.getAbsolutePos() 133 x_pos, y_pos = widget.getAbsolutePos()
133 x_pos += event.getX() 134 x_pos += event.getX()