Mercurial > parpg-source
diff gui/hud.py @ 126:f7543a85c2ea
The stopActions method in the Hud class now drops the item that is currently dragged onto the map.
author | KarstenBock@gmx.net |
---|---|
date | Fri, 07 Oct 2011 14:16:21 +0200 |
parents | adbcdb900fa9 |
children | d1c2d316cc25 |
line wrap: on
line diff
--- a/gui/hud.py Fri Oct 07 14:15:06 2011 +0200 +++ b/gui/hud.py Fri Oct 07 14:16:21 2011 +0200 @@ -28,7 +28,8 @@ from parpg.gui import drag_drop_data as data_drag from parpg.gui.inventorygui import CharacterGUI from actionsbox import ActionsBox -from parpg.components import container +from parpg.objects.action import DropItemAction + logger = logging.getLogger('hud') class Hud(object): """Main Hud class""" @@ -304,9 +305,10 @@ interfere with current running ones.""" #Reset dragging - move item back to its old container if data_drag.dragging: - data_drag.source_container.placeItem(data_drag.dragged_item) + drag_item = data_drag.dragged_item data_drag.dragging = False data_drag.dragged_item = None + DropItemAction(self.controller, drag_item).execute() if self.inventory: self.inventory.closeInventory()