Ignore:
Timestamp:
08/30/09 19:09:44 (10 years ago)
Author:
Kaydeth_parpg
Message:

Ticket #91: Patch by phoku. The drag and drop logic in ContainerGUI class and Inventory class needed to be corrected after some FIFE changes made in FIFE revision 3003. Also gui_container.py was removed as the the code was previously copied into popups.py and gui_container.py is no longer used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/inventory.py

    r261 r267  
    214214            data_drag.dragged_item = drag_widget.item 
    215215            # get the up and down images of the widget 
    216             up_image = drag_widget._getUpImage() 
    217             down_image = drag_widget._getDownImage() 
     216            up_image = drag_widget.up_image 
     217            down_image = drag_widget.down_image 
    218218            # set the mouse cursor to be the widget's image 
    219             self.setMouseCursor(up_image,down_image) 
    220             data_drag.dragged_image = up_image 
     219            self.setMouseCursor(up_image.source,down_image.source) 
     220            data_drag.dragged_image = up_image.source 
    221221            data_drag.dragging = True 
    222222            # after dragging the 'item', set the widgets' images 
    223223            # so that it has it's default 'empty' images 
    224             drag_widget._setUpImage(self.empty_images[obj]) 
    225             drag_widget._setDownImage(self.empty_images[obj]) 
    226             drag_widget._setHoverImage(self.empty_images[obj]) 
     224            drag_widget.up_image=(self.empty_images[obj]) 
     225            drag_widget.down_image=(self.empty_images[obj]) 
     226            drag_widget.hover_image=(self.empty_images[obj]) 
    227227            # then set it's item to nothing 
    228228            drag_widget.item = "" 
     
    242242           (data_drag.dropped_type == 'main_inv')): 
    243243            drag_widget = self.inventory.findChild(name = obj) 
    244             drag_widget._setUpImage(data_drag.dragged_image) 
    245             drag_widget._setHoverImage(data_drag.dragged_image) 
    246             drag_widget._setDownImage(data_drag.dragged_image) 
     244            drag_widget.up_image = data_drag.dragged_image 
     245            drag_widget.hover_image = data_drag.dragged_image 
     246            drag_widget.down_image = data_drag.dragged_image 
    247247            drag_widget.item = data_drag.dragged_item 
    248248            print 'Item: ' + drag_widget.item 
     
    261261             (data_drag.dragged_type in self.locations)): 
    262262            drag_widget = self.inventory.findChild(name = obj) 
    263             drag_widget._setUpImage(data_drag.dragged_image) 
    264             drag_widget._setHoverImage(data_drag.dragged_image) 
    265             drag_widget._setDownImage(data_drag.dragged_image) 
     263            drag_widget.up_image = data_drag.dragged_image 
     264            drag_widget.hover_image = data_drag.dragged_image 
     265            drag_widget.down_image = data_drag.dragged_image 
    266266            drag_widget.item = data_drag.dragged_item 
    267267            print 'Item: ' + drag_widget.item 
Note: See TracChangeset for help on using the changeset viewer.