mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-20 05:20:24 -07:00
Added toggle resizeable SD plugin
This also fixes two CMEs, very cool.
This commit is contained in:
parent
1a62b1775a
commit
47df7bd3d3
3 changed files with 59 additions and 17 deletions
|
|
@ -12,10 +12,7 @@ import java.awt.event.MouseWheelListener;
|
|||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -133,7 +130,8 @@ public class PluginRepository {
|
|||
}
|
||||
|
||||
public static void Draw() {
|
||||
loadedPlugins.values().forEach(Plugin::_draw);
|
||||
List<Plugin> pluginsSnapshot = new ArrayList<>(loadedPlugins.values());
|
||||
pluginsSnapshot.forEach(Plugin::_draw);
|
||||
}
|
||||
|
||||
public static void NPCOverheadDraw(Npc npc, int screenX, int screenY) {
|
||||
|
|
@ -147,7 +145,9 @@ public class PluginRepository {
|
|||
public static void ProcessCommand(JagString commandStr) {
|
||||
String[] tokens = commandStr.toString().split(" ");
|
||||
String[] args = Arrays.copyOfRange(tokens, 1, tokens.length);
|
||||
loadedPlugins.values().forEach((plugin) -> plugin.ProcessCommand(tokens[0], args));
|
||||
List<Plugin> pluginsSnapshot = new ArrayList<>(loadedPlugins.values());
|
||||
|
||||
pluginsSnapshot.forEach((plugin) -> plugin.ProcessCommand(tokens[0], args));
|
||||
}
|
||||
|
||||
public static void ComponentDraw(int componentIndex, Component component, int screenX, int screenY) {
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ public class Cheat {
|
|||
@OriginalMember(owner = "client!jg", name = "e", descriptor = "Z")
|
||||
public static boolean qaOpTest = false;
|
||||
public static final JagString RELOADPLUGINS = JagString.parse("::reloadplugins");
|
||||
public static final JagString USERESIZABLESD = JagString.parse("::resizablesd");
|
||||
|
||||
@OriginalMember(owner = "client!en", name = "a", descriptor = "(IIIB)V")
|
||||
public static void teleport(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) {
|
||||
|
|
@ -232,16 +231,6 @@ public class Cheat {
|
|||
shiftClick = true;
|
||||
}
|
||||
}
|
||||
if(arg0.equalsIgnoreCase(USERESIZABLESD)){
|
||||
DisplayMode.resizableSD = !DisplayMode.resizableSD;
|
||||
if(!DisplayMode.resizableSD){
|
||||
// Revert to fixed
|
||||
DisplayMode.setWindowMode(true, 0, -1, -1);
|
||||
} else {
|
||||
// use resizable
|
||||
DisplayMode.setWindowMode(true, 0, GameShell.frameWidth, GameShell.frameHeight);
|
||||
}
|
||||
}
|
||||
|
||||
if (arg0.equalsIgnoreCase(RELOADPLUGINS)) {
|
||||
PluginRepository.reloadPlugins();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue