### Eclipse Workspace Patch 1.0
#P org.sophie2.main.app.halos
|
|
|
1418 | 1418 | public boolean handle(EventR3 event) { |
1419 | 1419 | VisualElement source = event.getSource(FrameXPosition.class); |
1420 | 1420 | ResourceAccess access = getAccess(source); |
| 1421 | LocationChannel oldChannel = MemberElement.KEY_LOCATION.get(access); |
| 1422 | TimePos time = getTime(source); |
| 1423 | ImmPoint oldLocation = oldChannel.getValue(time); |
| 1424 | |
1421 | 1425 | String input = event.getEventParam(BoundControl.EventIds.INPUT_PARAM_INDEX, |
1422 | 1426 | String.class); |
1423 | | ImmPoint location = MemberElement.KEY_LOCATION.get(access) |
1424 | | .getValue(getTime(source)); |
1425 | 1427 | float value = BoundValidation.parseNumber(input, Float.class); |
1426 | | final ImmPoint newPoint = new ImmPoint(value, location.getY()); |
1427 | | final LocationChannel channel = MemberElement.KEY_LOCATION.get(access); |
| 1428 | ImmPoint newLocation = new ImmPoint(value, oldLocation.getY()); |
| 1429 | final LocationChannel newChannel = oldChannel.setValue(time, newLocation); |
1428 | 1430 | |
1429 | 1431 | new AutoAction(Message.create(SET_X_POSITION), true) { |
1430 | 1432 | @Override |
1431 | 1433 | public void performAuto() { |
1432 | | getChanger().setRaw(MemberElement.KEY_LOCATION, channel.setAll(newPoint)); |
| 1434 | getChanger().setRaw(MemberElement.KEY_LOCATION, newChannel); |
1433 | 1435 | } |
1434 | 1436 | }.register(access); |
| 1437 | |
1435 | 1438 | return true; |
1436 | 1439 | } |
1437 | 1440 | }, |
… |
… |
|
1449 | 1452 | public boolean handle(EventR3 event) { |
1450 | 1453 | VisualElement source = event.getSource(FrameYPosition.class); |
1451 | 1454 | ResourceAccess access = getAccess(source); |
| 1455 | LocationChannel oldChannel = MemberElement.KEY_LOCATION.get(access); |
| 1456 | TimePos time = getTime(source); |
| 1457 | ImmPoint oldLocation = oldChannel.getValue(time); |
| 1458 | |
1452 | 1459 | String input = event.getEventParam(BoundControl.EventIds.INPUT_PARAM_INDEX, |
1453 | 1460 | String.class); |
1454 | | |
1455 | | final LocationChannel location = MemberElement.KEY_LOCATION.get(access); |
1456 | 1461 | float value = BoundValidation.parseNumber(input, Float.class); |
1457 | | final ImmPoint newPoint = new ImmPoint(location.getValue(getTime(source)).getX(), |
1458 | | value); |
1459 | | |
| 1462 | ImmPoint newLocation = new ImmPoint(oldLocation.getX(), value); |
| 1463 | final LocationChannel newChannel = oldChannel.setValue(time, newLocation); |
| 1464 | |
1460 | 1465 | new AutoAction(Message.create(SET_Y_POSITION), true) { |
1461 | 1466 | @Override |
1462 | 1467 | public void performAuto() { |
1463 | | getChanger().setRaw(MemberElement.KEY_LOCATION, location.setAll(newPoint)); |
| 1468 | getChanger().setRaw(MemberElement.KEY_LOCATION, newChannel); |
1464 | 1469 | } |
1465 | 1470 | }.register(access); |
| 1471 | |
1466 | 1472 | return true; |
1467 | 1473 | } |
1468 | 1474 | }, |