devtools: allow pgup/down to cycle through previous commands
Co-authored-by: Max Weber <mii7303@gmail.com>
This commit is contained in:
@@ -48,6 +48,7 @@ import net.runelite.api.VarbitComposition;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.api.events.CommandExecuted;
|
||||
import net.runelite.api.events.MenuEntryAdded;
|
||||
import net.runelite.api.events.ScriptCallbackEvent;
|
||||
import net.runelite.api.events.StatChanged;
|
||||
import net.runelite.api.events.VarbitChanged;
|
||||
import net.runelite.api.kit.KitType;
|
||||
@@ -488,4 +489,13 @@ public class DevToolsPlugin extends Plugin
|
||||
entry.setTarget(entry.getTarget() + " " + ColorUtil.prependColorTag("(" + info + ")", JagexColors.MENU_TARGET));
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onScriptCallbackEvent(ScriptCallbackEvent ev)
|
||||
{
|
||||
if ("devtoolsEnabled".equals(ev.getEventName()))
|
||||
{
|
||||
client.getIntStack()[client.getIntStackSize() - 1] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -870,6 +870,9 @@ LABEL724:
|
||||
if_icmpgt LABEL728
|
||||
jump LABEL791
|
||||
LABEL728:
|
||||
; move chatout_add under if ($length2 > 2) to only add for :: commands
|
||||
get_varc_string 335
|
||||
invoke 77 ; chatout_add
|
||||
get_varc_string 335
|
||||
sconst "::toggleroof"
|
||||
iconst 0
|
||||
@@ -962,8 +965,11 @@ LABEL798:
|
||||
iload 9
|
||||
invoke 5517
|
||||
LABEL804:
|
||||
; see comment above
|
||||
jump AFTER_CHATOUT_ADD
|
||||
get_varc_string 335
|
||||
invoke 77
|
||||
AFTER_CHATOUT_ADD:
|
||||
sconst ""
|
||||
set_varc_string 335
|
||||
LABEL808:
|
||||
@@ -975,6 +981,8 @@ LABEL809:
|
||||
jump LABEL819
|
||||
LABEL813:
|
||||
iload 3
|
||||
sconst "devtoolsEnabled"
|
||||
runelite_callback
|
||||
iconst 1
|
||||
if_icmpeq LABEL817
|
||||
jump LABEL818
|
||||
@@ -989,6 +997,8 @@ LABEL819:
|
||||
jump LABEL829
|
||||
LABEL823:
|
||||
iload 3
|
||||
sconst "devtoolsEnabled"
|
||||
runelite_callback
|
||||
iconst 1
|
||||
if_icmpeq LABEL827
|
||||
jump LABEL828
|
||||
|
||||
Reference in New Issue
Block a user