Handles dragging of items from various pyfa displays which support it data is list with two items: data[0] is hard-coded str of originating source data[1] is typeID or index of data we want to manipulate
(self, x, y, data)
| 210 | event.Skip() |
| 211 | |
| 212 | def handleListDrag(self, x, y, data): |
| 213 | """ |
| 214 | Handles dragging of items from various pyfa displays which support it |
| 215 | |
| 216 | data is list with two items: |
| 217 | data[0] is hard-coded str of originating source |
| 218 | data[1] is typeID or index of data we want to manipulate |
| 219 | """ |
| 220 | if data[0] == "fitting": |
| 221 | self.swapItems(x, y, int(data[1])) |
| 222 | elif data[0] == "cargo": |
| 223 | self.swapCargo(x, y, int(data[1])) |
| 224 | elif data[0] == "market": |
| 225 | self.addModule(x, y, int(data[1])) |
| 226 | |
| 227 | def handleDrag(self, type, fitID): |
| 228 | # Those are drags coming from pyfa sources, NOT builtin wx drags |