def handleListDrag(self, x, y, data): ''' Handles dragging of items from various pyfa displays which support it data is list with two indices: data[0] is hard-coded str of originating source data[1] is typeID or index of data we want to manipulate ''' if data[0] == "market": wx.PostEvent(self.mainFrame, mb.ItemSelected(itemID=int(data[1])))
def handleDragDrop(self, x, y, data): ''' Handles dragging of items from various pyfa displays which support it data is list with two indices: data[0] is hard-coded str of originating source data[1] is typeID or index of data we want to manipulate ''' if data[0] == "drone": # we want to merge drones srcRow = int(data[1]) dstRow, _ = self.HitTest((x, y)) if srcRow != -1 and dstRow != -1: self._merge(srcRow, dstRow) elif data[0] == "market": wx.PostEvent(self.mainFrame, mb.ItemSelected(itemID=int(data[1])))