Fixed mouse offsets after changing the way GameFrame contains GameShell
This commit is contained in:
1 parent
d1141f4cf5
commit
5587f57414
2 files changed
+1
-14
No files matched your search
@@ -841,7 +841,7 @@ public class Game extends GameShell {
|
||||
}
|
||||
imageCompass = new Image24(archiveMedia, "compass", 0);
|
||||
imageMapedge = new Image24(archiveMedia, "mapedge", 0);
|
||||
imageMapedge.method345();
|
||||
//imageMapedge.method345();
|
||||
try {
|
||||
for (int k3 = 0; k3 < 100; k3++) {
|
||||
imageMapscene[k3] = new Image8(archiveMedia, "mapscene", k3);
|
||||
|
||||
@@ -236,11 +236,6 @@ public abstract class GameShell extends JComponent implements Runnable, MouseLis
|
||||
int x = e.getX();
|
||||
int y = e.getY();
|
||||
|
||||
if (frame != null) {
|
||||
x -= 4;
|
||||
y -= 22;
|
||||
}
|
||||
|
||||
idleCycles = 0;
|
||||
lastMousePressX = x;
|
||||
lastMousePressY = y;
|
||||
@@ -280,10 +275,6 @@ public abstract class GameShell extends JComponent implements Runnable, MouseLis
|
||||
public void mouseDragged(MouseEvent e) {
|
||||
int x = e.getX();
|
||||
int y = e.getY();
|
||||
if (frame != null) {
|
||||
x -= 4;
|
||||
y -= 22;
|
||||
}
|
||||
idleCycles = 0;
|
||||
mouseX = x;
|
||||
mouseY = y;
|
||||
@@ -293,10 +284,6 @@ public abstract class GameShell extends JComponent implements Runnable, MouseLis
|
||||
public void mouseMoved(MouseEvent e) {
|
||||
int x = e.getX();
|
||||
int y = e.getY();
|
||||
if (frame != null) {
|
||||
x -= 4;
|
||||
y -= 22;
|
||||
}
|
||||
idleCycles = 0;
|
||||
mouseX = x;
|
||||
mouseY = y;
|
||||
|
||||
Reference in new issue
Block a user