diff --git a/client/src/main/java/rt4/GameShell.java b/client/src/main/java/rt4/GameShell.java index 9bd0bd6..250f826 100644 --- a/client/src/main/java/rt4/GameShell.java +++ b/client/src/main/java/rt4/GameShell.java @@ -182,6 +182,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene @OriginalMember(owner = "client!qh", name = "a", descriptor = "(Z)V") public static void method3662() { + System.out.println("Moving..."); @Pc(8) Container local8; if (fullScreenFrame != null) { local8 = fullScreenFrame; @@ -514,9 +515,10 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene canvasScale = getCurrentDevice().getDefaultConfiguration().getDefaultTransform().getScaleX(); if (frame != null && fullScreenFrame == null) { @Pc(84) Insets insets = frame.getInsets(); - canvas.setLocation(insets.left + leftMargin, topMargin + insets.top); + // TODO: Add a flag to ignore this. + //canvas.setLocation(insets.left + leftMargin, topMargin + insets.top); } else { - canvas.setLocation(leftMargin, topMargin); + //canvas.setLocation(leftMargin, topMargin); } } this.mainRedraw(); diff --git a/client/src/main/java/rt4/GlRenderer.java b/client/src/main/java/rt4/GlRenderer.java index c7a7d2a..3ad7392 100644 --- a/client/src/main/java/rt4/GlRenderer.java +++ b/client/src/main/java/rt4/GlRenderer.java @@ -203,7 +203,7 @@ public final class GlRenderer { try { pixelData = readPixels(); drawable.swapBuffers(); - } catch (@Pc(3) Exception local3) {*, + } catch (@Pc(3) Exception local3) { } } diff --git a/plugin-playground/src/main/kotlin/KondoKit/plugin.kt b/plugin-playground/src/main/kotlin/KondoKit/plugin.kt index 983576d..d9a3cfd 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/plugin.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/plugin.kt @@ -44,8 +44,6 @@ import java.awt.Font import java.awt.event.* import java.awt.image.BufferedImage import java.awt.image.VolatileImage -import java.util.* -import java.util.Timer import javax.swing.* @@ -449,20 +447,6 @@ class plugin : Plugin() { frame.layout = BorderLayout() frame.add(rightPanelWrapper, BorderLayout.EAST) - // Create a timer to delay execution by 2 seconds - Timer().schedule(object : TimerTask() { - override fun run() { - println("mode is: " + GetWindowMode().toString()) - if (GetWindowMode() != WindowMode.FIXED) { - // Perform any actions needed for non-fixed mode - } else { - //if (canvas.isShowing) { - // frame.remove(canvas) - // } - } - } - }, 2000) // 2000 milliseconds = 2 seconds - frame.revalidate() frame.repaint() pluginsReloaded = true @@ -540,6 +524,15 @@ class plugin : Plugin() { override fun LateDraw(timeDelta: Long){ // Clear original canvas for scaled if(!initialized) return + SwingUtilities.invokeLater { + if (GetWindowMode() == WindowMode.FIXED) { + if (canvas.isShowing) { + canvas.setLocation(-1000,-1000) + } + } else { + + } + } altCanvas?.updateGameImage() }