Keyframes are now moveable by dragging them on the real timeline

This commit is contained in:
CrushedPixel
2015-05-22 00:01:50 +02:00
parent 03e176b9ec
commit 9396687802
4 changed files with 50 additions and 13 deletions

View File

@@ -21,6 +21,17 @@ public class MouseUtils {
return new Point(mouseX, mouseY);
}
public static void moveMouse(int mouseX, int mouseY) {
Point scaled = getScaledDimensions();
int width = (int) scaled.getX();
int height = (int) scaled.getY();
int x = (int)Math.round(((mouseX+0.5)*mc.displayWidth)/width);
int y = (mouseY*mc.displayHeight)/height;
Mouse.setCursorPosition(x, y);
}
public static Point getScaledDimensions() {
ScaledResolution sr = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
final int width = sr.getScaledWidth();