Update libGDX and gradle

This commit is contained in:
fgnm
2023-07-05 21:41:36 +02:00
parent a867004c20
commit bc3802d0bf
8 changed files with 17 additions and 10 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
gdxVersion = 1.11.0
lwjgl3Version = 3.3.1
gdxVersion = 1.12.0
lwjgl3Version = 3.3.2
artemisVersion = 2.3.0
spineVersion = 4.1.0
visuiVersion = 1.5.1
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
@@ -270,6 +270,11 @@ public class HyperLap2DScreen implements Screen, InputProcessor {
return false;
}
@Override
public boolean touchCancelled(int screenX, int screenY, int pointer, int button) {
return false;
}
@Override
public boolean touchDragged(int screenX, int screenY, int pointer) {
return false;
@@ -148,6 +148,11 @@ public class SandboxInputAdapter implements InputProcessor {
return true;
}
@Override
public boolean touchCancelled(int screenX, int screenY, int pointer, int button) {
return false;
}
@Override
public boolean touchDragged(int screenX, int screenY, int pointer) {
rootEntity = sandbox.getCurrentViewingEntity();
@@ -3,7 +3,6 @@ package games.rednblack.editor.view.stage.tools.transformStrategy;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Vector2;
import games.rednblack.editor.renderer.components.TransformComponent;
import games.rednblack.editor.renderer.utils.MathUtilsFix;
import games.rednblack.editor.utils.RoundUtils;
import games.rednblack.editor.view.ui.followers.NormalSelectionFollower;
import games.rednblack.h2d.common.command.TransformCommandBuilder;
@@ -23,7 +22,7 @@ public abstract class AbstractTransformStrategy implements ITransformStrategy {
* @return array of three floats (new float[]{width/height, xComponent, yComponent};)
*/
float[] calculateSizeAndXyAmount(float mouseDeltaX, float mouseDeltaY, float rotation, float[] result) {
float mouseDragAngle = MathUtilsFix.atan2(mouseDeltaY, mouseDeltaX) * MathUtils.radDeg;
float mouseDragAngle = MathUtils.atan2(mouseDeltaY, mouseDeltaX) * MathUtils.radDeg;
float deltaA = rotation - mouseDragAngle;
float c = (float) Math.sqrt(mouseDeltaX * mouseDeltaX + mouseDeltaY * mouseDeltaY);
float a = c * MathUtils.cosDeg(deltaA);
@@ -5,7 +5,6 @@ import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.utils.TimeUtils;
import games.rednblack.editor.renderer.utils.MathUtilsFix;
import space.earlygrey.shapedrawer.ShapeDrawer;
/**
@@ -103,7 +102,7 @@ public class PixelDashedLine extends Actor {
}
private float getAngle(float x, float y, float toX, float toY) {
float angle = MathUtils.radiansToDegrees * (MathUtilsFix.atan2(toX - x, toY - y));
float angle = MathUtils.radiansToDegrees * (MathUtils.atan2(toX - x, toY - y));
if (angle < 0) {
angle += 360;
@@ -21,7 +21,6 @@ package games.rednblack.editor.view.ui.widget.actors.basic;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import games.rednblack.editor.renderer.utils.MathUtilsFix;
public class PixelLine extends Image {
@@ -56,7 +55,7 @@ public class PixelLine extends Image {
}
private float getAngle(float x, float y, float toX, float toY) {
float angle = MathUtils.radiansToDegrees * (MathUtilsFix.atan2(toX - x, toY - y));
float angle = MathUtils.radiansToDegrees * (MathUtils.atan2(toX - x, toY - y));
if(angle < 0){
angle += 360;