Ticket #91: parpg.patch

File parpg.patch, 2.8 KB (added by patch, 10 years ago)
  • scripts/inventory.py

     
    184184            # get the item that the widget is 'storing' 
    185185            data_drag.dragged_item = drag_widget.item 
    186186            # get the up and down images of the widget 
    187             up_image = drag_widget._getUpImage() 
    188             down_image = drag_widget._getDownImage() 
     187            up_image = drag_widget.up_image 
     188            down_image = drag_widget.down_image 
    189189            # set the mouse cursor to be the widget's image 
    190             self.setMouseCursor(up_image,down_image) 
    191             data_drag.dragged_image = up_image 
     190            self.setMouseCursor(up_image.source,down_image.source) 
     191            data_drag.dragged_image = up_image.source 
    192192            data_drag.dragging = True 
    193193            # after dragging the 'item', set the widgets' images 
    194194            # so that it has it's default 'empty' images 
    195             drag_widget._setUpImage(self.empty_images[obj]) 
    196             drag_widget._setDownImage(self.empty_images[obj]) 
    197             drag_widget._setHoverImage(self.empty_images[obj]) 
     195            drag_widget.up_image=(self.empty_images[obj]) 
     196            drag_widget.down_image=(self.empty_images[obj]) 
     197            drag_widget.hover_image=(self.empty_images[obj]) 
    198198            # then set it's item to nothing 
    199199            drag_widget.item = "" 
    200200             
     
    212212        if((data_drag.dragged_type == 'main_inv') or 
    213213           (data_drag.dropped_type == 'main_inv')): 
    214214            drag_widget = self.inventory.findChild(name = obj) 
    215             drag_widget._setUpImage(data_drag.dragged_image) 
    216             drag_widget._setHoverImage(data_drag.dragged_image) 
    217             drag_widget._setDownImage(data_drag.dragged_image) 
     215            drag_widget.up_image = data_drag.dragged_image 
     216            drag_widget.hover_image = data_drag.dragged_image 
     217            drag_widget.down_image = data_drag.dragged_image 
    218218            drag_widget.item = data_drag.dragged_item 
    219219            print 'Item: ' + drag_widget.item 
    220220            data_drag.dragging = False 
     
    231231        elif((data_drag.dragged_type == data_drag.dropped_type) and 
    232232             (data_drag.dragged_type in self.locations)): 
    233233            drag_widget = self.inventory.findChild(name = obj) 
    234             drag_widget._setUpImage(data_drag.dragged_image) 
    235             drag_widget._setHoverImage(data_drag.dragged_image) 
    236             drag_widget._setDownImage(data_drag.dragged_image) 
     234            drag_widget.up_image = data_drag.dragged_image 
     235            drag_widget.hover_image = data_drag.dragged_image 
     236            drag_widget.down_image = data_drag.dragged_image 
    237237            drag_widget.item = data_drag.dragged_item 
    238238            print 'Item: ' + drag_widget.item 
    239239            data_drag.dragging = False