| 1318 | public Drop(String[] files, MouseState mouseState, KeyboardState keyboardState) { |
| 1319 | this.files = files; |
| 1320 | this.mouseState = mouseState; |
| 1321 | this.keyboardState = keyboardState; |
| 1322 | } |
| 1323 | |
| 1324 | @Override |
| 1325 | public Optional<Vec2> position() { |
| 1326 | if (mouseState == null) return Optional.empty(); |
| 1327 | return mouseState.position(); |
| 1328 | } |
| 1329 | } |
| 1330 | |
| 1331 | static public class Event<T> extends AsMapDelegator { |
| 1332 | public final T before; |
| 1333 | public final T after; |
| 1334 | |
| 1335 | public final Dict properties = new Dict(); |
| 1336 | |
| 1337 | public Event(T before, T after) { |
| 1338 | this.before = before; |
| 1339 | this.after = after; |
| 1340 | } |
| 1341 | |
| 1342 | public String toString() { |
| 1343 | return "ev<" + before + "->" + after + ">"; |
| 1344 | } |
| 1345 | |