Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
urgent bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GunniBusch committed Jan 30, 2024
1 parent da9aadb commit 099791e
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions core/src/de/tum/cit/ase/editor/input/CanvasInputProcessor.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.tum.cit.ase.editor.input;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.InputAdapter;
import com.badlogic.gdx.math.GridPoint2;
import com.badlogic.gdx.math.Vector2;
Expand All @@ -12,8 +11,6 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import static de.tum.cit.ase.maze.utils.CONSTANTS.DEBUG;

/**
* This class is responsible for processing input events on the canvas.
* It extends the {@link InputAdapter} class and implements the {@link ShortcutAdapter} interface.
Expand All @@ -37,12 +34,6 @@ public boolean keyDown(int keycode) {
//Gdx.app.debug("keyDown", String.format("keycode: %s, keycode_str: %s", keycode, Input.Keys.toString(keycode)));
this.addKey(keycode);

if (keycode == Input.Keys.SPACE) {
editorCanvas.resizeCanvas(640, 640);
}
if (keycode == Input.Keys.N) {
editorCanvas.resizeCanvas(16, 16);
}
if (isShortcut(Shortcuts.UI.REDO)) {
editorCanvas.getCanvas().redo();
return true;
Expand All @@ -69,10 +60,7 @@ public boolean keyTyped(char character) {
public boolean keyUp(int keycode) {

this.removeKey(keycode);
if (DEBUG && keycode == Input.Keys.SPACE) {
return true;

}
try {
return (boolean) this.relocateToTool(ToolInputAdapter.class.getDeclaredMethod("keyUp", int.class), keycode);
} catch (NoSuchMethodException e) {
Expand All @@ -84,11 +72,6 @@ public boolean keyUp(int keycode) {
public boolean touchDown(int screenX, int screenY, int pointer, int button) {
//Gdx.app.debug("touchDown", String.format("screenX: %s, screenY: %s, pointer: %s", screenX, screenY, pointer));

var current = calculateGridPoint(screenX, screenY, false);
if (current != null) {

}

this.editorCanvas.getEditor().handleLostUiFocus();

try {
Expand Down

0 comments on commit 099791e

Please sign in to comment.