use of com.bladecoder.engineeditor.undo.UndoRefPosition in project bladecoder-adventure-engine by bladecoder.
the class ScnWidgetInputListener method touchUp.
@Override
public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
super.touchUp(event, x, y, pointer, button);
if (draggingMode == DraggingModes.DRAGGING_ACTOR) {
Ctx.project.getUndoStack().add(new UndoPosition(selActor, new Vector2(undoOrg)));
} else if (draggingMode == DraggingModes.DRAGGING_REFPOINT) {
Ctx.project.getUndoStack().add(new UndoRefPosition((InteractiveActor) selActor, new Vector2(undoOrg)));
} else if (draggingMode == DraggingModes.DRAGGING_WALKZONE_POINT) {
Polygon poly = scnWidget.getScene().getPolygonalNavGraph().getWalkZone();
Ctx.project.getUndoStack().add(new UndoWalkzonePointPos(poly, vertIndex, new Vector2(undoOrg)));
} else if (draggingMode == DraggingModes.DRAGGING_BBOX_POINT) {
Ctx.project.getUndoStack().add(new UndoBboxPointPos(selActor, vertIndex, new Vector2(undoOrg)));
} else if (draggingMode == DraggingModes.DRAGGING_MARKER_0 || draggingMode == DraggingModes.DRAGGING_MARKER_100) {
Ctx.project.getUndoStack().add(new UndoDepthVector(scnWidget.getScene(), new Vector2(undoOrg)));
} else if (draggingMode == DraggingModes.DRAGGING_WALKZONE) {
Ctx.project.getUndoStack().add(new UndoWalkZonePosition(scnWidget.getScene().getPolygonalNavGraph().getWalkZone(), new Vector2(undoOrg)));
}
draggingMode = DraggingModes.NONE;
return;
}
Aggregations