예제 #1
0
파일: boosterView.py 프로젝트: a-tal/Pyfa
    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])))
예제 #2
0
파일: droneView.py 프로젝트: tiniumv/Pyfa
    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])))