Merge pull request #3201 from open-osrs/upstream-1805
This commit is contained in:
@@ -25,9 +25,9 @@
|
|||||||
|
|
||||||
object ProjectVersions {
|
object ProjectVersions {
|
||||||
const val launcherVersion = "3.0.0"
|
const val launcherVersion = "3.0.0"
|
||||||
const val rlVersion = "1.8.19"
|
const val rlVersion = "1.8.20"
|
||||||
|
|
||||||
const val openosrsVersion = "4.26.1"
|
const val openosrsVersion = "4.27.0"
|
||||||
|
|
||||||
const val rsversion = 205
|
const val rsversion = 205
|
||||||
const val cacheversion = 165
|
const val cacheversion = 165
|
||||||
|
|||||||
@@ -12665,5 +12665,17 @@ public final class ItemID
|
|||||||
public static final int AMULET_OF_THE_EYE_26990 = 26990;
|
public static final int AMULET_OF_THE_EYE_26990 = 26990;
|
||||||
public static final int AMULET_OF_THE_EYE_26992 = 26992;
|
public static final int AMULET_OF_THE_EYE_26992 = 26992;
|
||||||
public static final int AMULET_OF_THE_EYE_26994 = 26994;
|
public static final int AMULET_OF_THE_EYE_26994 = 26994;
|
||||||
|
public static final int ENSOULED_HELLHOUND_HEAD = 26996;
|
||||||
|
public static final int ENSOULED_HELLHOUND_HEAD_26997 = 26997;
|
||||||
|
public static final int VOID_KNIGHT_TOP_LOR = 27000;
|
||||||
|
public static final int VOID_KNIGHT_ROBE_LOR = 27001;
|
||||||
|
public static final int VOID_KNIGHT_GLOVES_LOR = 27002;
|
||||||
|
public static final int ELITE_VOID_TOP_LOR = 27003;
|
||||||
|
public static final int ELITE_VOID_ROBE_LOR = 27004;
|
||||||
|
public static final int VOID_MAGE_HELM_LOR = 27005;
|
||||||
|
public static final int VOID_RANGER_HELM_LOR = 27006;
|
||||||
|
public static final int VOID_MELEE_HELM_LOR = 27007;
|
||||||
|
public static final int DRAGON_DEFENDER_LT = 27008;
|
||||||
|
public static final int RUNE_DEFENDER_LT = 27009;
|
||||||
/* This file is automatically generated. Do not edit. */
|
/* This file is automatically generated. Do not edit. */
|
||||||
}
|
}
|
||||||
@@ -9648,6 +9648,7 @@ public final class NpcID
|
|||||||
public static final int THE_GREAT_GUARDIAN_11455 = 11455;
|
public static final int THE_GREAT_GUARDIAN_11455 = 11455;
|
||||||
public static final int THE_GREAT_GUARDIAN_11456 = 11456;
|
public static final int THE_GREAT_GUARDIAN_11456 = 11456;
|
||||||
public static final int MENAPHITE_SHADOW = 11462;
|
public static final int MENAPHITE_SHADOW = 11462;
|
||||||
|
public static final int REANIMATED_HELLHOUND = 11463;
|
||||||
public static final int TARIK_11473 = 11473;
|
public static final int TARIK_11473 = 11473;
|
||||||
public static final int MAISA_11474 = 11474;
|
public static final int MAISA_11474 = 11474;
|
||||||
public static final int MAISA_11475 = 11475;
|
public static final int MAISA_11475 = 11475;
|
||||||
|
|||||||
@@ -14120,5 +14120,7 @@ public final class NullItemID
|
|||||||
public static final int NULL_26991 = 26991;
|
public static final int NULL_26991 = 26991;
|
||||||
public static final int NULL_26993 = 26993;
|
public static final int NULL_26993 = 26993;
|
||||||
public static final int NULL_26995 = 26995;
|
public static final int NULL_26995 = 26995;
|
||||||
|
public static final int NULL_26998 = 26998;
|
||||||
|
public static final int NULL_26999 = 26999;
|
||||||
/* This file is automatically generated. Do not edit. */
|
/* This file is automatically generated. Do not edit. */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21640,6 +21640,9 @@ public final class NullObjectID
|
|||||||
public static final int NULL_43847 = 43847;
|
public static final int NULL_43847 = 43847;
|
||||||
public static final int NULL_43848 = 43848;
|
public static final int NULL_43848 = 43848;
|
||||||
public static final int NULL_43850 = 43850;
|
public static final int NULL_43850 = 43850;
|
||||||
|
public static final int NULL_43851 = 43851;
|
||||||
|
public static final int NULL_43852 = 43852;
|
||||||
|
public static final int NULL_43853 = 43853;
|
||||||
public static final int NULL_43871 = 43871;
|
public static final int NULL_43871 = 43871;
|
||||||
public static final int NULL_43872 = 43872;
|
public static final int NULL_43872 = 43872;
|
||||||
public static final int NULL_43874 = 43874;
|
public static final int NULL_43874 = 43874;
|
||||||
|
|||||||
+2
-2
@@ -197,7 +197,7 @@ public interface ChatCommandsConfig extends Config
|
|||||||
)
|
)
|
||||||
default Keybind clearSingleWord()
|
default Keybind clearSingleWord()
|
||||||
{
|
{
|
||||||
return new Keybind(KeyEvent.VK_W, InputEvent.CTRL_DOWN_MASK);
|
return new Keybind(KeyEvent.VK_BACK_SPACE, InputEvent.CTRL_DOWN_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
@@ -208,6 +208,6 @@ public interface ChatCommandsConfig extends Config
|
|||||||
)
|
)
|
||||||
default Keybind clearChatBox()
|
default Keybind clearChatBox()
|
||||||
{
|
{
|
||||||
return new Keybind(KeyEvent.VK_BACK_SPACE, InputEvent.CTRL_DOWN_MASK);
|
return Keybind.NOT_SET;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -48,6 +48,7 @@ import net.runelite.api.VarbitComposition;
|
|||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.api.events.CommandExecuted;
|
import net.runelite.api.events.CommandExecuted;
|
||||||
import net.runelite.api.events.MenuEntryAdded;
|
import net.runelite.api.events.MenuEntryAdded;
|
||||||
|
import net.runelite.api.events.ScriptCallbackEvent;
|
||||||
import net.runelite.api.events.StatChanged;
|
import net.runelite.api.events.StatChanged;
|
||||||
import net.runelite.api.events.VarbitChanged;
|
import net.runelite.api.events.VarbitChanged;
|
||||||
import net.runelite.api.kit.KitType;
|
import net.runelite.api.kit.KitType;
|
||||||
@@ -492,4 +493,13 @@ public class DevToolsPlugin extends Plugin
|
|||||||
entry.setTarget(entry.getTarget() + " " + ColorUtil.prependColorTag("(" + info + ")", JagexColors.MENU_TARGET));
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public enum FairyRings
|
|||||||
BIP("(Island) South-west of Mort Myre"),
|
BIP("(Island) South-west of Mort Myre"),
|
||||||
BIQ("Kalphite Hive"),
|
BIQ("Kalphite Hive"),
|
||||||
BIS("Ardougne Zoo - Unicorns"),
|
BIS("Ardougne Zoo - Unicorns"),
|
||||||
|
BJP("(Island) Isle of Souls"),
|
||||||
BJR("Realm of the Fisher King"),
|
BJR("Realm of the Fisher King"),
|
||||||
BJS("(Island) Near Zul-Andra", "zulrah"),
|
BJS("(Island) Near Zul-Andra", "zulrah"),
|
||||||
BKP("South of Castle Wars"),
|
BKP("South of Castle Wars"),
|
||||||
|
|||||||
+5
@@ -308,6 +308,11 @@ enum ItemWithCharge
|
|||||||
ROW3(TELEPORT, RING_OF_WEALTH_3, 3),
|
ROW3(TELEPORT, RING_OF_WEALTH_3, 3),
|
||||||
ROW4(TELEPORT, RING_OF_WEALTH_4, 4),
|
ROW4(TELEPORT, RING_OF_WEALTH_4, 4),
|
||||||
ROW5(TELEPORT, RING_OF_WEALTH_5, 5),
|
ROW5(TELEPORT, RING_OF_WEALTH_5, 5),
|
||||||
|
ROWI1(TELEPORT, RING_OF_WEALTH_I1, 1),
|
||||||
|
ROWI2(TELEPORT, RING_OF_WEALTH_I2, 2),
|
||||||
|
ROWI3(TELEPORT, RING_OF_WEALTH_I3, 3),
|
||||||
|
ROWI4(TELEPORT, RING_OF_WEALTH_I4, 4),
|
||||||
|
ROWI5(TELEPORT, RING_OF_WEALTH_I5, 5),
|
||||||
SACK_CABBAGES1(SACK, CABBAGES1, 1),
|
SACK_CABBAGES1(SACK, CABBAGES1, 1),
|
||||||
SACK_CABBAGES2(SACK, CABBAGES2, 2),
|
SACK_CABBAGES2(SACK, CABBAGES2, 2),
|
||||||
SACK_CABBAGES3(SACK, CABBAGES3, 3),
|
SACK_CABBAGES3(SACK, CABBAGES3, 3),
|
||||||
|
|||||||
+2
-1
@@ -42,9 +42,10 @@ class ScreenMarkerCreationOverlay extends Overlay
|
|||||||
private ScreenMarkerCreationOverlay(final ScreenMarkerPlugin plugin)
|
private ScreenMarkerCreationOverlay(final ScreenMarkerPlugin plugin)
|
||||||
{
|
{
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
setPosition(OverlayPosition.DETACHED);
|
setPosition(OverlayPosition.DYNAMIC);
|
||||||
setLayer(OverlayLayer.ABOVE_WIDGETS);
|
setLayer(OverlayLayer.ABOVE_WIDGETS);
|
||||||
setPriority(OverlayPriority.HIGH);
|
setPriority(OverlayPriority.HIGH);
|
||||||
|
setMovable(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+2
-1
@@ -45,9 +45,10 @@ public class ScreenMarkerOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
this.marker = marker;
|
this.marker = marker;
|
||||||
this.screenMarkerRenderable = new ScreenMarkerRenderable();
|
this.screenMarkerRenderable = new ScreenMarkerRenderable();
|
||||||
setPosition(OverlayPosition.DETACHED);
|
setPosition(OverlayPosition.DYNAMIC);
|
||||||
setLayer(OverlayLayer.ALWAYS_ON_TOP);
|
setLayer(OverlayLayer.ALWAYS_ON_TOP);
|
||||||
setPriority(OverlayPriority.HIGH);
|
setPriority(OverlayPriority.HIGH);
|
||||||
|
setMovable(true);
|
||||||
setResizable(true);
|
setResizable(true);
|
||||||
setMinimumSize(16);
|
setMinimumSize(16);
|
||||||
setResettable(false);
|
setResettable(false);
|
||||||
|
|||||||
+2
-1
@@ -51,9 +51,10 @@ class ScreenMarkerWidgetHighlightOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.client = client;
|
this.client = client;
|
||||||
setPosition(OverlayPosition.DETACHED);
|
setPosition(OverlayPosition.DYNAMIC);
|
||||||
setLayer(OverlayLayer.ABOVE_WIDGETS);
|
setLayer(OverlayLayer.ABOVE_WIDGETS);
|
||||||
setPriority(OverlayPriority.HIGH);
|
setPriority(OverlayPriority.HIGH);
|
||||||
|
setMovable(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -64,12 +64,25 @@ public abstract class Overlay implements LayoutableRenderableEntity
|
|||||||
@Setter(AccessLevel.PROTECTED)
|
@Setter(AccessLevel.PROTECTED)
|
||||||
private boolean dragTargetable;
|
private boolean dragTargetable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether this overlay can be moved with alt
|
||||||
|
*/
|
||||||
|
@Setter(AccessLevel.PROTECTED)
|
||||||
|
private boolean movable = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether this overlay can be moved to a snap corner
|
||||||
|
* and have its preferredPosition changed
|
||||||
|
*/
|
||||||
|
@Setter(AccessLevel.PROTECTED)
|
||||||
|
private boolean snappable = true;
|
||||||
|
|
||||||
protected Overlay()
|
protected Overlay()
|
||||||
{
|
{
|
||||||
plugin = null;
|
plugin = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Overlay(Plugin plugin)
|
protected Overlay(@Nullable Plugin plugin)
|
||||||
{
|
{
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
}
|
}
|
||||||
@@ -169,4 +182,25 @@ public abstract class Overlay implements LayoutableRenderableEntity
|
|||||||
public void revalidate()
|
public void revalidate()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPosition(OverlayPosition position)
|
||||||
|
{
|
||||||
|
this.position = position;
|
||||||
|
|
||||||
|
switch (position)
|
||||||
|
{
|
||||||
|
case TOOLTIP:
|
||||||
|
case DYNAMIC:
|
||||||
|
movable = false;
|
||||||
|
snappable = false;
|
||||||
|
break;
|
||||||
|
case DETACHED:
|
||||||
|
movable = true;
|
||||||
|
snappable = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
movable = true;
|
||||||
|
snappable = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -313,21 +313,29 @@ public class OverlayManager
|
|||||||
private void loadOverlay(final Overlay overlay)
|
private void loadOverlay(final Overlay overlay)
|
||||||
{
|
{
|
||||||
final Point location = loadOverlayLocation(overlay);
|
final Point location = loadOverlayLocation(overlay);
|
||||||
overlay.setPreferredLocation(location);
|
|
||||||
final Dimension size = loadOverlaySize(overlay);
|
final Dimension size = loadOverlaySize(overlay);
|
||||||
overlay.setPreferredSize(size);
|
|
||||||
final OverlayPosition position = loadOverlayPosition(overlay);
|
final OverlayPosition position = loadOverlayPosition(overlay);
|
||||||
if (position != null)
|
|
||||||
|
if (overlay.isMovable())
|
||||||
{
|
{
|
||||||
if (overlay.getPosition() != OverlayPosition.DYNAMIC && overlay.getPosition() != OverlayPosition.TOOLTIP)
|
overlay.setPreferredLocation(location);
|
||||||
{
|
}
|
||||||
overlay.setPreferredPosition(position);
|
else
|
||||||
}
|
{
|
||||||
else
|
log.info("Resetting preferred location of non-movable overlay {} (class {})", overlay.getName(), overlay.getClass().getName());
|
||||||
{
|
saveOverlayLocation(overlay);
|
||||||
log.info("Resetting preferred position of dynamic overlay {}", overlay.getClass().getSimpleName());
|
}
|
||||||
saveOverlayPosition(overlay);
|
|
||||||
}
|
overlay.setPreferredSize(size);
|
||||||
|
|
||||||
|
if (overlay.isSnappable())
|
||||||
|
{
|
||||||
|
overlay.setPreferredPosition(position);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log.info("Resetting preferred position of non-snappable overlay {} (class {})", overlay.getName(), overlay.getClass().getName());
|
||||||
|
saveOverlayPosition(overlay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ public enum OverlayPosition
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Not attached anywhere, but still movable
|
* Not attached anywhere, but still movable
|
||||||
|
* Deprecated. Use DYNAMIC and setMovable(true)
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
DETACHED,
|
DETACHED,
|
||||||
/**
|
/**
|
||||||
* Overlay places itself where it wants
|
* Overlay places itself where it wants
|
||||||
|
|||||||
+109
-169
@@ -25,7 +25,6 @@
|
|||||||
package net.runelite.client.ui.overlay;
|
package net.runelite.client.ui.overlay;
|
||||||
|
|
||||||
import com.google.common.base.MoreObjects;
|
import com.google.common.base.MoreObjects;
|
||||||
import com.google.common.collect.ImmutableList;
|
|
||||||
import com.google.common.primitives.Ints;
|
import com.google.common.primitives.Ints;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Composite;
|
import java.awt.Composite;
|
||||||
@@ -41,7 +40,6 @@ import java.awt.event.MouseEvent;
|
|||||||
import java.awt.geom.AffineTransform;
|
import java.awt.geom.AffineTransform;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
@@ -67,7 +65,6 @@ import net.runelite.client.input.MouseAdapter;
|
|||||||
import net.runelite.client.input.MouseManager;
|
import net.runelite.client.input.MouseManager;
|
||||||
import net.runelite.client.ui.ClientUI;
|
import net.runelite.client.ui.ClientUI;
|
||||||
import net.runelite.client.ui.JagexColors;
|
import net.runelite.client.ui.JagexColors;
|
||||||
import net.runelite.client.ui.overlay.tooltip.Tooltip;
|
|
||||||
import net.runelite.client.ui.overlay.tooltip.TooltipManager;
|
import net.runelite.client.ui.overlay.tooltip.TooltipManager;
|
||||||
import net.runelite.client.util.ColorUtil;
|
import net.runelite.client.util.ColorUtil;
|
||||||
import net.runelite.client.util.HotkeyListener;
|
import net.runelite.client.util.HotkeyListener;
|
||||||
@@ -107,7 +104,8 @@ public class OverlayRenderer extends MouseAdapter
|
|||||||
private boolean inOverlayResizingMode;
|
private boolean inOverlayResizingMode;
|
||||||
private boolean inOverlayDraggingMode;
|
private boolean inOverlayDraggingMode;
|
||||||
private boolean startedMovingOverlay;
|
private boolean startedMovingOverlay;
|
||||||
private Overlay hoveredOverlay; // for building menu entries
|
private Overlay curHoveredOverlay; // for building menu entries
|
||||||
|
private Overlay lastHoveredOverlay; // for off-thread access
|
||||||
|
|
||||||
// Overlay state validation
|
// Overlay state validation
|
||||||
private Rectangle viewportBounds;
|
private Rectangle viewportBounds;
|
||||||
@@ -175,14 +173,16 @@ public class OverlayRenderer extends MouseAdapter
|
|||||||
resetOverlayManagementMode();
|
resetOverlayManagementMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
hoveredOverlay = null;
|
curHoveredOverlay = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
protected void onClientTick(ClientTick t)
|
protected void onClientTick(ClientTick t)
|
||||||
{
|
{
|
||||||
final Overlay overlay = hoveredOverlay;
|
lastHoveredOverlay = curHoveredOverlay;
|
||||||
|
|
||||||
|
final Overlay overlay = curHoveredOverlay;
|
||||||
if (overlay == null || client.isMenuOpen())
|
if (overlay == null || client.isMenuOpen())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -216,7 +216,7 @@ public class OverlayRenderer extends MouseAdapter
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onBeforeRender(BeforeRender event)
|
public void onBeforeRender(BeforeRender event)
|
||||||
{
|
{
|
||||||
hoveredOverlay = null;
|
curHoveredOverlay = null;
|
||||||
|
|
||||||
if (focusedOverlay == null && prevFocusedOverlay != null)
|
if (focusedOverlay == null && prevFocusedOverlay != null)
|
||||||
{
|
{
|
||||||
@@ -261,7 +261,7 @@ public class OverlayRenderer extends MouseAdapter
|
|||||||
overlayManager.setWidgetItems(Collections.emptyList());
|
overlayManager.setWidgetItems(Collections.emptyList());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderOverlays(Graphics2D graphics, Collection<Overlay> overlays, OverlayLayer layer)
|
private void renderOverlays(final Graphics2D graphics, Collection<Overlay> overlays, final OverlayLayer layer)
|
||||||
{
|
{
|
||||||
if (overlays == null
|
if (overlays == null
|
||||||
|| overlays.isEmpty()
|
|| overlays.isEmpty()
|
||||||
@@ -273,7 +273,7 @@ public class OverlayRenderer extends MouseAdapter
|
|||||||
OverlayUtil.setGraphicProperties(graphics);
|
OverlayUtil.setGraphicProperties(graphics);
|
||||||
|
|
||||||
// Draw snap corners
|
// Draw snap corners
|
||||||
if (inOverlayDraggingMode && layer == OverlayLayer.UNDER_WIDGETS && currentManagedOverlay != null && currentManagedOverlay.getPosition() != OverlayPosition.DETACHED)
|
if (inOverlayDraggingMode && layer == OverlayLayer.UNDER_WIDGETS && currentManagedOverlay != null && currentManagedOverlay.isSnappable())
|
||||||
{
|
{
|
||||||
final OverlayBounds translatedSnapCorners = snapCorners.translated(
|
final OverlayBounds translatedSnapCorners = snapCorners.translated(
|
||||||
-SNAP_CORNER_SIZE.width,
|
-SNAP_CORNER_SIZE.width,
|
||||||
@@ -290,10 +290,6 @@ public class OverlayRenderer extends MouseAdapter
|
|||||||
graphics.setColor(previous);
|
graphics.setColor(previous);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get mouse position
|
|
||||||
final net.runelite.api.Point mouseCanvasPosition = client.getMouseCanvasPosition();
|
|
||||||
final Point mouse = new Point(mouseCanvasPosition.getX(), mouseCanvasPosition.getY());
|
|
||||||
|
|
||||||
// Save graphics2d properties so we can restore them later
|
// Save graphics2d properties so we can restore them later
|
||||||
final AffineTransform transform = graphics.getTransform();
|
final AffineTransform transform = graphics.getTransform();
|
||||||
final Stroke stroke = graphics.getStroke();
|
final Stroke stroke = graphics.getStroke();
|
||||||
@@ -302,126 +298,97 @@ public class OverlayRenderer extends MouseAdapter
|
|||||||
final RenderingHints renderingHints = graphics.getRenderingHints();
|
final RenderingHints renderingHints = graphics.getRenderingHints();
|
||||||
final Color background = graphics.getBackground();
|
final Color background = graphics.getBackground();
|
||||||
|
|
||||||
|
final Rectangle clip = clipBounds(layer);
|
||||||
|
graphics.setClip(clip);
|
||||||
|
|
||||||
for (Overlay overlay : overlays)
|
for (Overlay overlay : overlays)
|
||||||
{
|
{
|
||||||
final OverlayPosition overlayPosition = getCorrectedOverlayPosition(overlay);
|
final OverlayPosition overlayPosition = getCorrectedOverlayPosition(overlay);
|
||||||
|
final Rectangle bounds = overlay.getBounds();
|
||||||
|
final Dimension dimension = bounds.getSize();
|
||||||
|
final Point preferredLocation = overlay.getPreferredLocation();
|
||||||
|
Point location;
|
||||||
|
Rectangle snapCorner = null;
|
||||||
|
|
||||||
if (overlayPosition == OverlayPosition.DYNAMIC || overlayPosition == OverlayPosition.TOOLTIP)
|
// If the final position is not modified, layout it
|
||||||
|
if (overlayPosition != OverlayPosition.DYNAMIC && overlayPosition != OverlayPosition.TOOLTIP
|
||||||
|
&& overlayPosition != OverlayPosition.DETACHED && preferredLocation == null)
|
||||||
{
|
{
|
||||||
safeRender(client, overlay, layer, graphics, new Point());
|
snapCorner = snapCorners.forPosition(overlayPosition);
|
||||||
|
final Point translation = OverlayUtil.transformPosition(overlayPosition, dimension); // offset from corner
|
||||||
// Restore graphics2d properties
|
// Target x/y to draw the overlay
|
||||||
graphics.setTransform(transform);
|
int destX = snapCorner.x + translation.x;
|
||||||
graphics.setStroke(stroke);
|
int destY = snapCorner.y + translation.y;
|
||||||
graphics.setComposite(composite);
|
// Clamp the target position to ensure it is on screen or within parent bounds
|
||||||
graphics.setPaint(paint);
|
location = clampOverlayLocation(destX, destY, dimension.width, dimension.height, overlay);
|
||||||
graphics.setRenderingHints(renderingHints);
|
|
||||||
graphics.setBackground(background);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
final Rectangle bounds = overlay.getBounds();
|
location = preferredLocation != null ? preferredLocation : bounds.getLocation();
|
||||||
final Dimension dimension = bounds.getSize();
|
|
||||||
final Point preferredLocation = overlay.getPreferredLocation();
|
|
||||||
Point location;
|
|
||||||
Rectangle snapCorner = null;
|
|
||||||
|
|
||||||
// If the final position is not modified, layout it
|
// Clamp the overlay position to ensure it is on screen or within parent bounds
|
||||||
if (overlayPosition != OverlayPosition.DETACHED && (preferredLocation == null || overlay.getPreferredPosition() != null))
|
location = clampOverlayLocation(location.x, location.y, dimension.width, dimension.height, overlay);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (overlay.getPreferredSize() != null)
|
||||||
|
{
|
||||||
|
bounds.setSize(overlay.getPreferredSize());
|
||||||
|
}
|
||||||
|
|
||||||
|
safeRender(overlay, graphics, location);
|
||||||
|
|
||||||
|
// Adjust snap corner based on where the overlay was drawn
|
||||||
|
if (snapCorner != null && bounds.width + bounds.height > 0)
|
||||||
|
{
|
||||||
|
OverlayUtil.shiftSnapCorner(overlayPosition, snapCorner, bounds, PADDING);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Restore graphics2d properties prior to drawing bounds
|
||||||
|
graphics.setTransform(transform);
|
||||||
|
graphics.setStroke(stroke);
|
||||||
|
graphics.setComposite(composite);
|
||||||
|
graphics.setPaint(paint);
|
||||||
|
graphics.setRenderingHints(renderingHints);
|
||||||
|
graphics.setBackground(background);
|
||||||
|
if (!graphics.getClip().equals(clip))
|
||||||
|
{
|
||||||
|
graphics.setClip(clip);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bounds.isEmpty())
|
||||||
|
{
|
||||||
|
if (inOverlayManagingMode)
|
||||||
{
|
{
|
||||||
snapCorner = snapCorners.forPosition(overlayPosition);
|
Color boundsColor;
|
||||||
final Point translation = OverlayUtil.transformPosition(overlayPosition, dimension); // offset from corner
|
if (inOverlayResizingMode && currentManagedOverlay == overlay)
|
||||||
// Target x/y to draw the overlay
|
|
||||||
int destX = snapCorner.x + translation.x;
|
|
||||||
int destY = snapCorner.y + translation.y;
|
|
||||||
// Clamp the target position to ensure it is on screen or within parent bounds
|
|
||||||
location = clampOverlayLocation(destX, destY, dimension.width, dimension.height, overlay);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
location = preferredLocation != null ? preferredLocation : bounds.getLocation();
|
|
||||||
|
|
||||||
// Clamp the overlay position to ensure it is on screen or within parent bounds
|
|
||||||
location = clampOverlayLocation(location.x, location.y, dimension.width, dimension.height, overlay);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (overlay.getPreferredSize() != null)
|
|
||||||
{
|
|
||||||
bounds.setSize(overlay.getPreferredSize());
|
|
||||||
}
|
|
||||||
|
|
||||||
safeRender(client, overlay, layer, graphics, location);
|
|
||||||
|
|
||||||
// Adjust snap corner based on where the overlay was drawn
|
|
||||||
if (snapCorner != null && bounds.width + bounds.height > 0)
|
|
||||||
{
|
|
||||||
OverlayUtil.shiftSnapCorner(overlayPosition, snapCorner, bounds, PADDING);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Restore graphics2d properties prior to drawing bounds
|
|
||||||
graphics.setTransform(transform);
|
|
||||||
graphics.setStroke(stroke);
|
|
||||||
graphics.setComposite(composite);
|
|
||||||
graphics.setPaint(paint);
|
|
||||||
graphics.setRenderingHints(renderingHints);
|
|
||||||
graphics.setBackground(background);
|
|
||||||
|
|
||||||
if (!bounds.isEmpty())
|
|
||||||
{
|
|
||||||
if (inOverlayManagingMode)
|
|
||||||
{
|
{
|
||||||
Color boundsColor;
|
boundsColor = MOVING_OVERLAY_RESIZING_COLOR;
|
||||||
if (inOverlayResizingMode && currentManagedOverlay == overlay)
|
}
|
||||||
{
|
else if (inOverlayDraggingMode && currentManagedOverlay == overlay)
|
||||||
boundsColor = MOVING_OVERLAY_RESIZING_COLOR;
|
{
|
||||||
}
|
boundsColor = MOVING_OVERLAY_ACTIVE_COLOR;
|
||||||
else if (inOverlayDraggingMode && currentManagedOverlay == overlay)
|
}
|
||||||
{
|
else if (inOverlayDraggingMode && overlay.isDragTargetable() && currentManagedOverlay.isDragTargetable()
|
||||||
boundsColor = MOVING_OVERLAY_ACTIVE_COLOR;
|
&& currentManagedOverlay.getBounds().intersects(bounds))
|
||||||
}
|
{
|
||||||
else if (inOverlayDraggingMode && overlay.isDragTargetable() && currentManagedOverlay.isDragTargetable()
|
boundsColor = MOVING_OVERLAY_TARGET_COLOR;
|
||||||
&& currentManagedOverlay.getBounds().intersects(bounds))
|
assert currentManagedOverlay != overlay;
|
||||||
{
|
dragTargetOverlay = overlay;
|
||||||
boundsColor = MOVING_OVERLAY_TARGET_COLOR;
|
}
|
||||||
assert currentManagedOverlay != overlay;
|
else
|
||||||
dragTargetOverlay = overlay;
|
{
|
||||||
}
|
boundsColor = MOVING_OVERLAY_COLOR;
|
||||||
else
|
|
||||||
{
|
|
||||||
boundsColor = MOVING_OVERLAY_COLOR;
|
|
||||||
}
|
|
||||||
|
|
||||||
graphics.setColor(boundsColor);
|
|
||||||
graphics.draw(bounds);
|
|
||||||
graphics.setPaint(paint);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!client.isMenuOpen() && !client.getSpellSelected() && bounds.contains(mouse))
|
graphics.setColor(boundsColor);
|
||||||
{
|
graphics.draw(bounds);
|
||||||
hoveredOverlay = overlay;
|
graphics.setPaint(paint);
|
||||||
|
}
|
||||||
|
|
||||||
if (inOverlayManagingMode)
|
if (!client.isMenuOpen() && !client.getSpellSelected() && bounds.contains(mousePosition))
|
||||||
{
|
{
|
||||||
String tooltipText = overlay.getPlugin() == null ? overlay.getName() : overlay.getPlugin().getName();
|
curHoveredOverlay = overlay;
|
||||||
tooltipManager.add(new Tooltip(tooltipText));
|
overlay.onMouseOver();
|
||||||
}
|
|
||||||
|
|
||||||
if (focusedOverlay == null)
|
|
||||||
{
|
|
||||||
focusedOverlay = overlay;
|
|
||||||
if (focusedOverlay != prevFocusedOverlay)
|
|
||||||
{
|
|
||||||
if (prevFocusedOverlay != null)
|
|
||||||
{
|
|
||||||
prevFocusedOverlay.onMouseExit();
|
|
||||||
}
|
|
||||||
|
|
||||||
overlay.onMouseEnter();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
overlay.onMouseOver();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -430,17 +397,16 @@ public class OverlayRenderer extends MouseAdapter
|
|||||||
@Override
|
@Override
|
||||||
public MouseEvent mousePressed(MouseEvent mouseEvent)
|
public MouseEvent mousePressed(MouseEvent mouseEvent)
|
||||||
{
|
{
|
||||||
|
final Point mousePoint = mouseEvent.getPoint();
|
||||||
|
mousePosition.setLocation(mousePoint);
|
||||||
|
|
||||||
if (!inOverlayManagingMode)
|
if (!inOverlayManagingMode)
|
||||||
{
|
{
|
||||||
return mouseEvent;
|
return mouseEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Point mousePoint = mouseEvent.getPoint();
|
|
||||||
mousePosition.setLocation(mousePoint);
|
|
||||||
|
|
||||||
// See if we've clicked on an overlay
|
// See if we've clicked on an overlay
|
||||||
currentManagedOverlay = findMangedOverlay(mousePoint);
|
currentManagedOverlay = lastHoveredOverlay;
|
||||||
|
|
||||||
if (currentManagedOverlay == null)
|
if (currentManagedOverlay == null)
|
||||||
{
|
{
|
||||||
return mouseEvent;
|
return mouseEvent;
|
||||||
@@ -476,17 +442,17 @@ public class OverlayRenderer extends MouseAdapter
|
|||||||
@Override
|
@Override
|
||||||
public MouseEvent mouseMoved(MouseEvent mouseEvent)
|
public MouseEvent mouseMoved(MouseEvent mouseEvent)
|
||||||
{
|
{
|
||||||
|
final Point mousePoint = mouseEvent.getPoint();
|
||||||
|
mousePosition.setLocation(mousePoint);
|
||||||
|
|
||||||
if (!inOverlayManagingMode)
|
if (!inOverlayManagingMode)
|
||||||
{
|
{
|
||||||
return mouseEvent;
|
return mouseEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Point mousePoint = mouseEvent.getPoint();
|
|
||||||
mousePosition.setLocation(mousePoint);
|
|
||||||
|
|
||||||
if (!inOverlayResizingMode && !inOverlayDraggingMode)
|
if (!inOverlayResizingMode && !inOverlayDraggingMode)
|
||||||
{
|
{
|
||||||
currentManagedOverlay = findMangedOverlay(mousePoint);
|
currentManagedOverlay = lastHoveredOverlay;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentManagedOverlay == null || !currentManagedOverlay.isResizable())
|
if (currentManagedOverlay == null || !currentManagedOverlay.isResizable())
|
||||||
@@ -533,47 +499,17 @@ public class OverlayRenderer extends MouseAdapter
|
|||||||
return mouseEvent;
|
return mouseEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Find an overlay to manage which is under the given mouse point
|
|
||||||
*
|
|
||||||
* @param mousePoint
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private Overlay findMangedOverlay(Point mousePoint)
|
|
||||||
{
|
|
||||||
synchronized (overlayManager)
|
|
||||||
{
|
|
||||||
// render order is roughly: under -> manual -> above -> always on top
|
|
||||||
final List<OverlayLayer> layerOrder = ImmutableList.of(OverlayLayer.UNDER_WIDGETS, OverlayLayer.MANUAL, OverlayLayer.ABOVE_WIDGETS, OverlayLayer.ALWAYS_ON_TOP);
|
|
||||||
return overlayManager.getOverlays()
|
|
||||||
.stream()
|
|
||||||
// ABOVE_SCENE overlays aren't managed
|
|
||||||
.filter(c -> layerOrder.contains(c.getLayer()))
|
|
||||||
// never allow moving dynamic or tooltip overlays
|
|
||||||
.filter(c -> c.getPosition() != OverlayPosition.DYNAMIC && c.getPosition() != OverlayPosition.TOOLTIP)
|
|
||||||
.sorted(
|
|
||||||
Comparator.<Overlay>comparingInt(c -> layerOrder.indexOf(c.getLayer()))
|
|
||||||
.thenComparing(OverlayManager.OVERLAY_COMPARATOR)
|
|
||||||
// pick order is reversed from render order
|
|
||||||
.reversed()
|
|
||||||
)
|
|
||||||
.filter(o -> o.getBounds().contains(mousePoint))
|
|
||||||
.findFirst()
|
|
||||||
.orElse(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MouseEvent mouseDragged(MouseEvent mouseEvent)
|
public MouseEvent mouseDragged(MouseEvent mouseEvent)
|
||||||
{
|
{
|
||||||
|
final Point p = mouseEvent.getPoint();
|
||||||
|
mousePosition.setLocation(p);
|
||||||
|
|
||||||
if (!inOverlayManagingMode)
|
if (!inOverlayManagingMode)
|
||||||
{
|
{
|
||||||
return mouseEvent;
|
return mouseEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Point p = mouseEvent.getPoint();
|
|
||||||
mousePosition.setLocation(p);
|
|
||||||
|
|
||||||
if (currentManagedOverlay == null)
|
if (currentManagedOverlay == null)
|
||||||
{
|
{
|
||||||
return mouseEvent;
|
return mouseEvent;
|
||||||
@@ -708,13 +644,14 @@ public class OverlayRenderer extends MouseAdapter
|
|||||||
@Override
|
@Override
|
||||||
public MouseEvent mouseReleased(MouseEvent mouseEvent)
|
public MouseEvent mouseReleased(MouseEvent mouseEvent)
|
||||||
{
|
{
|
||||||
|
final Point mousePoint = mouseEvent.getPoint();
|
||||||
|
mousePosition.setLocation(mousePoint);
|
||||||
|
|
||||||
if (!inOverlayManagingMode || currentManagedOverlay == null || (!inOverlayDraggingMode && !inOverlayResizingMode))
|
if (!inOverlayManagingMode || currentManagedOverlay == null || (!inOverlayDraggingMode && !inOverlayResizingMode))
|
||||||
{
|
{
|
||||||
return mouseEvent;
|
return mouseEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
mousePosition.setLocation(-1, -1);
|
|
||||||
|
|
||||||
if (dragTargetOverlay != null)
|
if (dragTargetOverlay != null)
|
||||||
{
|
{
|
||||||
if (dragTargetOverlay.onDrag(currentManagedOverlay))
|
if (dragTargetOverlay.onDrag(currentManagedOverlay))
|
||||||
@@ -725,14 +662,14 @@ public class OverlayRenderer extends MouseAdapter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the overlay is over a snapcorner and move it if so, unless it is a detached overlay
|
// Check if the overlay is over a snapcorner and snap it if so
|
||||||
if (currentManagedOverlay.getPosition() != OverlayPosition.DETACHED && inOverlayDraggingMode)
|
if (currentManagedOverlay.isSnappable() && inOverlayDraggingMode)
|
||||||
{
|
{
|
||||||
final OverlayBounds snapCorners = this.emptySnapCorners.translated(-SNAP_CORNER_SIZE.width, -SNAP_CORNER_SIZE.height);
|
final OverlayBounds snapCorners = this.emptySnapCorners.translated(-SNAP_CORNER_SIZE.width, -SNAP_CORNER_SIZE.height);
|
||||||
|
|
||||||
for (Rectangle snapCorner : snapCorners.getBounds())
|
for (Rectangle snapCorner : snapCorners.getBounds())
|
||||||
{
|
{
|
||||||
if (snapCorner.contains(mouseEvent.getPoint()))
|
if (snapCorner.contains(mousePoint))
|
||||||
{
|
{
|
||||||
OverlayPosition position = snapCorners.fromBounds(snapCorner);
|
OverlayPosition position = snapCorners.fromBounds(snapCorner);
|
||||||
|
|
||||||
@@ -756,20 +693,23 @@ public class OverlayRenderer extends MouseAdapter
|
|||||||
return mouseEvent;
|
return mouseEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void safeRender(Client client, Overlay overlay, OverlayLayer layer, Graphics2D graphics, Point point)
|
private Rectangle clipBounds(OverlayLayer layer)
|
||||||
{
|
{
|
||||||
if (!isResizeable && (layer == OverlayLayer.ABOVE_SCENE || layer == OverlayLayer.UNDER_WIDGETS))
|
if (!isResizeable && (layer == OverlayLayer.ABOVE_SCENE || layer == OverlayLayer.UNDER_WIDGETS))
|
||||||
{
|
{
|
||||||
graphics.setClip(client.getViewportXOffset(),
|
return new Rectangle(client.getViewportXOffset(),
|
||||||
client.getViewportYOffset(),
|
client.getViewportYOffset(),
|
||||||
client.getViewportWidth(),
|
client.getViewportWidth(),
|
||||||
client.getViewportHeight());
|
client.getViewportHeight());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
graphics.setClip(0, 0, client.getCanvasWidth(), client.getCanvasHeight());
|
return new Rectangle(0, 0, client.getCanvasWidth(), client.getCanvasHeight());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void safeRender(Overlay overlay, Graphics2D graphics, Point point)
|
||||||
|
{
|
||||||
final OverlayPosition position = overlay.getPosition();
|
final OverlayPosition position = overlay.getPosition();
|
||||||
|
|
||||||
// Set font based on configuration
|
// Set font based on configuration
|
||||||
|
|||||||
@@ -213,19 +213,19 @@ public class OverlayUtil
|
|||||||
switch (overlayPosition)
|
switch (overlayPosition)
|
||||||
{
|
{
|
||||||
case BOTTOM_LEFT:
|
case BOTTOM_LEFT:
|
||||||
sX = bounds.x + bounds.width + padding;
|
sX = Math.max(sX, bounds.x + bounds.width + padding);
|
||||||
break;
|
break;
|
||||||
case BOTTOM_RIGHT:
|
case BOTTOM_RIGHT:
|
||||||
sX = bounds.x - padding;
|
sX = Math.min(sX, bounds.x - padding);
|
||||||
break;
|
break;
|
||||||
case TOP_LEFT:
|
case TOP_LEFT:
|
||||||
case TOP_CENTER:
|
case TOP_CENTER:
|
||||||
case CANVAS_TOP_RIGHT:
|
case CANVAS_TOP_RIGHT:
|
||||||
case TOP_RIGHT:
|
case TOP_RIGHT:
|
||||||
sY = bounds.y + bounds.height + padding;
|
sY = Math.max(sY, bounds.y + bounds.height + padding);
|
||||||
break;
|
break;
|
||||||
case ABOVE_CHATBOX_RIGHT:
|
case ABOVE_CHATBOX_RIGHT:
|
||||||
sY = bounds.y - padding;
|
sY = Math.min(sY, bounds.y - padding);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
@@ -240,8 +240,6 @@ public class OverlayUtil
|
|||||||
|
|
||||||
switch (position)
|
switch (position)
|
||||||
{
|
{
|
||||||
case DYNAMIC:
|
|
||||||
case TOOLTIP:
|
|
||||||
case TOP_LEFT:
|
case TOP_LEFT:
|
||||||
break;
|
break;
|
||||||
case TOP_CENTER:
|
case TOP_CENTER:
|
||||||
@@ -258,6 +256,8 @@ public class OverlayUtil
|
|||||||
case TOP_RIGHT:
|
case TOP_RIGHT:
|
||||||
result.x = -dimension.width;
|
result.x = -dimension.width;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -42,16 +42,16 @@ public class WidgetOverlay extends Overlay
|
|||||||
public static Collection<WidgetOverlay> createOverlays(final OverlayManager overlayManager, final Client client)
|
public static Collection<WidgetOverlay> createOverlays(final OverlayManager overlayManager, final Client client)
|
||||||
{
|
{
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
// classic resizable
|
// classic resizable - these are in render order for managed overlay picking
|
||||||
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_CHATBOX_PARENT, OverlayPosition.DETACHED, OverlayPriority.HIGH),
|
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_CHATBOX_PARENT, OverlayPosition.DYNAMIC),
|
||||||
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_CHATBOX_PARENT, OverlayPosition.DETACHED, OverlayPriority.HIGH),
|
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_INVENTORY_PARENT, OverlayPosition.DYNAMIC),
|
||||||
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_INVENTORY_PARENT, OverlayPosition.DETACHED),
|
new WidgetOverlay(client, WidgetInfo.RESIZABLE_MINIMAP_STONES_WIDGET, OverlayPosition.CANVAS_TOP_RIGHT),
|
||||||
new WidgetOverlay(client, WidgetInfo.RESIZABLE_MINIMAP_WIDGET, OverlayPosition.DETACHED, OverlayPriority.MED),
|
|
||||||
// modern resizable
|
// modern resizable
|
||||||
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_TABS1, OverlayPosition.DETACHED),
|
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_CHATBOX_PARENT, OverlayPosition.DYNAMIC),
|
||||||
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_TABS2, OverlayPosition.DETACHED),
|
new WidgetOverlay(client, WidgetInfo.RESIZABLE_MINIMAP_WIDGET, OverlayPosition.CANVAS_TOP_RIGHT),
|
||||||
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_INVENTORY_PARENT, OverlayPosition.DETACHED),
|
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_TABS1, OverlayPosition.DYNAMIC),
|
||||||
new WidgetOverlay(client, WidgetInfo.RESIZABLE_MINIMAP_STONES_WIDGET, OverlayPosition.DETACHED, OverlayPriority.MED),
|
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_TABS2, OverlayPosition.DYNAMIC),
|
||||||
|
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_INVENTORY_PARENT, OverlayPosition.DYNAMIC),
|
||||||
// The client forces the oxygen bar below the xp tracker, so set its priority lower
|
// The client forces the oxygen bar below the xp tracker, so set its priority lower
|
||||||
new WidgetOverlay(client, WidgetInfo.FOSSIL_ISLAND_OXYGENBAR, OverlayPosition.TOP_CENTER, OverlayPriority.HIGH),
|
new WidgetOverlay(client, WidgetInfo.FOSSIL_ISLAND_OXYGENBAR, OverlayPosition.TOP_CENTER, OverlayPriority.HIGH),
|
||||||
new XpTrackerWidgetOverlay(overlayManager, client, WidgetInfo.EXPERIENCE_TRACKER_WIDGET, OverlayPosition.TOP_RIGHT),
|
new XpTrackerWidgetOverlay(overlayManager, client, WidgetInfo.EXPERIENCE_TRACKER_WIDGET, OverlayPosition.TOP_RIGHT),
|
||||||
@@ -84,7 +84,7 @@ public class WidgetOverlay extends Overlay
|
|||||||
new WidgetOverlay(client, WidgetInfo.TEMPOROSS_STATUS_INDICATOR, OverlayPosition.TOP_LEFT),
|
new WidgetOverlay(client, WidgetInfo.TEMPOROSS_STATUS_INDICATOR, OverlayPosition.TOP_LEFT),
|
||||||
new WidgetOverlay(client, WidgetInfo.BA_HEAL_TEAMMATES, OverlayPosition.BOTTOM_LEFT),
|
new WidgetOverlay(client, WidgetInfo.BA_HEAL_TEAMMATES, OverlayPosition.BOTTOM_LEFT),
|
||||||
new WidgetOverlay(client, WidgetInfo.BA_TEAM, OverlayPosition.TOP_RIGHT),
|
new WidgetOverlay(client, WidgetInfo.BA_TEAM, OverlayPosition.TOP_RIGHT),
|
||||||
new WidgetOverlay(client, WidgetInfo.PVP_WILDERNESS_SKULL_CONTAINER, OverlayPosition.DETACHED)
|
new WidgetOverlay(client, WidgetInfo.PVP_WILDERNESS_SKULL_CONTAINER, OverlayPosition.DYNAMIC)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,6 +105,8 @@ public class WidgetOverlay extends Overlay
|
|||||||
setPriority(overlayPriority);
|
setPriority(overlayPriority);
|
||||||
setLayer(OverlayLayer.UNDER_WIDGETS);
|
setLayer(OverlayLayer.UNDER_WIDGETS);
|
||||||
setPosition(overlayPosition);
|
setPosition(overlayPosition);
|
||||||
|
setMovable(true);
|
||||||
|
setSnappable(true);
|
||||||
// It's almost possible to drawAfterInterface(widgetInfo.getGroupId()) here, but that fires
|
// It's almost possible to drawAfterInterface(widgetInfo.getGroupId()) here, but that fires
|
||||||
// *after* the native components are drawn, which is too late.
|
// *after* the native components are drawn, which is too late.
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-6
@@ -31,6 +31,7 @@ import java.awt.Dimension;
|
|||||||
import java.awt.FontMetrics;
|
import java.awt.FontMetrics;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
|
import java.awt.Shape;
|
||||||
import java.awt.geom.Area;
|
import java.awt.geom.Area;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -119,10 +120,10 @@ public class WorldMapOverlay extends Overlay
|
|||||||
bottomBar.setHasListener(true);
|
bottomBar.setHasListener(true);
|
||||||
|
|
||||||
final Rectangle worldMapRectangle = widget.getBounds();
|
final Rectangle worldMapRectangle = widget.getBounds();
|
||||||
final Area mapViewArea = getWorldMapClipArea(worldMapRectangle);
|
final Shape mapViewArea = getWorldMapClipArea(worldMapRectangle);
|
||||||
final Rectangle canvasBounds = new Rectangle(0, 0, client.getCanvasWidth(), client.getCanvasHeight());
|
final Rectangle canvasBounds = new Rectangle(0, 0, client.getCanvasWidth(), client.getCanvasHeight());
|
||||||
final Area canvasViewArea = getWorldMapClipArea(canvasBounds);
|
final Shape canvasViewArea = getWorldMapClipArea(canvasBounds);
|
||||||
Area currentClip = null;
|
Shape currentClip = null;
|
||||||
|
|
||||||
Point mousePos = client.getMouseCanvasPosition();
|
Point mousePos = client.getMouseCanvasPosition();
|
||||||
if (!mapViewArea.contains(mousePos.getX(), mousePos.getY()))
|
if (!mapViewArea.contains(mousePos.getX(), mousePos.getY()))
|
||||||
@@ -297,24 +298,29 @@ public class WorldMapOverlay extends Overlay
|
|||||||
* @return An {@link Area} representing <code>baseRectangle</code>, with the area
|
* @return An {@link Area} representing <code>baseRectangle</code>, with the area
|
||||||
* of visible widgets overlaying the world map clipped from it.
|
* of visible widgets overlaying the world map clipped from it.
|
||||||
*/
|
*/
|
||||||
private Area getWorldMapClipArea(Rectangle baseRectangle)
|
private Shape getWorldMapClipArea(Rectangle baseRectangle)
|
||||||
{
|
{
|
||||||
final Widget overview = client.getWidget(WidgetInfo.WORLD_MAP_OVERVIEW_MAP);
|
final Widget overview = client.getWidget(WidgetInfo.WORLD_MAP_OVERVIEW_MAP);
|
||||||
final Widget surfaceSelector = client.getWidget(WidgetInfo.WORLD_MAP_SURFACE_SELECTOR);
|
final Widget surfaceSelector = client.getWidget(WidgetInfo.WORLD_MAP_SURFACE_SELECTOR);
|
||||||
|
|
||||||
Area clipArea = new Area(baseRectangle);
|
Area clipArea = new Area(baseRectangle);
|
||||||
|
boolean subtracted = false;
|
||||||
|
|
||||||
if (overview != null && !overview.isHidden())
|
if (overview != null && !overview.isHidden())
|
||||||
{
|
{
|
||||||
clipArea.subtract(new Area(overview.getBounds()));
|
clipArea.subtract(new Area(overview.getBounds()));
|
||||||
|
subtracted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (surfaceSelector != null && !surfaceSelector.isHidden())
|
if (surfaceSelector != null && !surfaceSelector.isHidden())
|
||||||
{
|
{
|
||||||
clipArea.subtract(new Area(surfaceSelector.getBounds()));
|
clipArea.subtract(new Area(surfaceSelector.getBounds()));
|
||||||
|
subtracted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return clipArea;
|
// The sun g2d implementation is much more efficient at applying clips which are subclasses of rectangle2d,
|
||||||
|
// so use that as the clip shape if possible
|
||||||
|
return subtracted ? clipArea : baseRectangle;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawTooltip(Graphics2D graphics, WorldMapPoint worldPoint)
|
private void drawTooltip(Graphics2D graphics, WorldMapPoint worldPoint)
|
||||||
@@ -336,7 +342,7 @@ public class WorldMapOverlay extends Overlay
|
|||||||
drawPoint = new Point(drawPoint.getX() + TOOLTIP_OFFSET_WIDTH, drawPoint.getY() + TOOLTIP_OFFSET_HEIGHT);
|
drawPoint = new Point(drawPoint.getX() + TOOLTIP_OFFSET_WIDTH, drawPoint.getY() + TOOLTIP_OFFSET_HEIGHT);
|
||||||
|
|
||||||
final Rectangle bounds = new Rectangle(0, 0, client.getCanvasWidth(), client.getCanvasHeight());
|
final Rectangle bounds = new Rectangle(0, 0, client.getCanvasWidth(), client.getCanvasHeight());
|
||||||
final Area mapArea = getWorldMapClipArea(bounds);
|
final Shape mapArea = getWorldMapClipArea(bounds);
|
||||||
graphics.setClip(mapArea);
|
graphics.setClip(mapArea);
|
||||||
graphics.setColor(JagexColors.TOOLTIP_BACKGROUND);
|
graphics.setColor(JagexColors.TOOLTIP_BACKGROUND);
|
||||||
graphics.setFont(FontManager.getRunescapeFont());
|
graphics.setFont(FontManager.getRunescapeFont());
|
||||||
|
|||||||
@@ -6239,13 +6239,15 @@
|
|||||||
8839,
|
8839,
|
||||||
20465,
|
20465,
|
||||||
24177,
|
24177,
|
||||||
26463
|
26463,
|
||||||
|
27000
|
||||||
],
|
],
|
||||||
"void knight robe": [
|
"void knight robe": [
|
||||||
8840,
|
8840,
|
||||||
20469,
|
20469,
|
||||||
24179,
|
24179,
|
||||||
26465
|
26465,
|
||||||
|
27001
|
||||||
],
|
],
|
||||||
"void knight mace": [
|
"void knight mace": [
|
||||||
8841,
|
8841,
|
||||||
@@ -6256,7 +6258,8 @@
|
|||||||
8842,
|
8842,
|
||||||
20475,
|
20475,
|
||||||
24182,
|
24182,
|
||||||
26467
|
26467,
|
||||||
|
27002
|
||||||
],
|
],
|
||||||
"bronze defender": [
|
"bronze defender": [
|
||||||
8844,
|
8844,
|
||||||
@@ -6292,7 +6295,8 @@
|
|||||||
8850,
|
8850,
|
||||||
20461,
|
20461,
|
||||||
23230,
|
23230,
|
||||||
24142
|
24142,
|
||||||
|
27009
|
||||||
],
|
],
|
||||||
"zanik": [
|
"zanik": [
|
||||||
8870,
|
8870,
|
||||||
@@ -7397,19 +7401,22 @@
|
|||||||
11663,
|
11663,
|
||||||
20477,
|
20477,
|
||||||
24183,
|
24183,
|
||||||
26473
|
26473,
|
||||||
|
27005
|
||||||
],
|
],
|
||||||
"void ranger helm": [
|
"void ranger helm": [
|
||||||
11664,
|
11664,
|
||||||
20479,
|
20479,
|
||||||
24184,
|
24184,
|
||||||
26475
|
26475,
|
||||||
|
27006
|
||||||
],
|
],
|
||||||
"void melee helm": [
|
"void melee helm": [
|
||||||
11665,
|
11665,
|
||||||
20481,
|
20481,
|
||||||
24185,
|
24185,
|
||||||
26477
|
26477,
|
||||||
|
27007
|
||||||
],
|
],
|
||||||
"void seal": [
|
"void seal": [
|
||||||
11666,
|
11666,
|
||||||
@@ -8076,7 +8083,8 @@
|
|||||||
19722,
|
19722,
|
||||||
20463,
|
20463,
|
||||||
23597,
|
23597,
|
||||||
24143
|
24143,
|
||||||
|
27008
|
||||||
],
|
],
|
||||||
"bronze set": [
|
"bronze set": [
|
||||||
12960,
|
12960,
|
||||||
@@ -8190,13 +8198,15 @@
|
|||||||
13072,
|
13072,
|
||||||
20467,
|
20467,
|
||||||
24178,
|
24178,
|
||||||
26469
|
26469,
|
||||||
|
27003
|
||||||
],
|
],
|
||||||
"elite void robe": [
|
"elite void robe": [
|
||||||
13073,
|
13073,
|
||||||
20471,
|
20471,
|
||||||
24180,
|
24180,
|
||||||
26471
|
26471,
|
||||||
|
27004
|
||||||
],
|
],
|
||||||
"crystal halberd": [
|
"crystal halberd": [
|
||||||
13080,
|
13080,
|
||||||
@@ -10673,5 +10683,9 @@
|
|||||||
"circlet of water": [
|
"circlet of water": [
|
||||||
26967,
|
26967,
|
||||||
26969
|
26969
|
||||||
|
],
|
||||||
|
"ensouled hellhound head": [
|
||||||
|
26996,
|
||||||
|
26997
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -870,6 +870,9 @@ LABEL724:
|
|||||||
if_icmpgt LABEL728
|
if_icmpgt LABEL728
|
||||||
jump LABEL791
|
jump LABEL791
|
||||||
LABEL728:
|
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
|
get_varc_string 335
|
||||||
sconst "::toggleroof"
|
sconst "::toggleroof"
|
||||||
iconst 0
|
iconst 0
|
||||||
@@ -962,8 +965,11 @@ LABEL798:
|
|||||||
iload 9
|
iload 9
|
||||||
invoke 5517
|
invoke 5517
|
||||||
LABEL804:
|
LABEL804:
|
||||||
|
; see comment above
|
||||||
|
jump AFTER_CHATOUT_ADD
|
||||||
get_varc_string 335
|
get_varc_string 335
|
||||||
invoke 77
|
invoke 77
|
||||||
|
AFTER_CHATOUT_ADD:
|
||||||
sconst ""
|
sconst ""
|
||||||
set_varc_string 335
|
set_varc_string 335
|
||||||
LABEL808:
|
LABEL808:
|
||||||
@@ -975,6 +981,8 @@ LABEL809:
|
|||||||
jump LABEL819
|
jump LABEL819
|
||||||
LABEL813:
|
LABEL813:
|
||||||
iload 3
|
iload 3
|
||||||
|
sconst "devtoolsEnabled"
|
||||||
|
runelite_callback
|
||||||
iconst 1
|
iconst 1
|
||||||
if_icmpeq LABEL817
|
if_icmpeq LABEL817
|
||||||
jump LABEL818
|
jump LABEL818
|
||||||
@@ -989,6 +997,8 @@ LABEL819:
|
|||||||
jump LABEL829
|
jump LABEL829
|
||||||
LABEL823:
|
LABEL823:
|
||||||
iload 3
|
iload 3
|
||||||
|
sconst "devtoolsEnabled"
|
||||||
|
runelite_callback
|
||||||
iconst 1
|
iconst 1
|
||||||
if_icmpeq LABEL827
|
if_icmpeq LABEL827
|
||||||
jump LABEL828
|
jump LABEL828
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
DE7A8C35396859C56E56307E45F4C3DC35EBA1FAAEBE871FAEC01E47C479AF43
|
C0218EBB7488D74689407A1A1E7C23F18E6B9C92F27BF184AA7EEE839DBEBA29
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
.id 909
|
.id 909
|
||||||
.int_stack_count 2
|
.int_stack_count 2
|
||||||
.string_stack_count 0
|
.string_stack_count 0
|
||||||
.int_var_count 21
|
.int_var_count 23
|
||||||
.string_var_count 0
|
.string_var_count 0
|
||||||
iconst 73
|
iconst 73
|
||||||
iconst 73
|
iconst 73
|
||||||
@@ -27,31 +27,31 @@
|
|||||||
iconst 10551311
|
iconst 10551311
|
||||||
enum
|
enum
|
||||||
istore 5
|
istore 5
|
||||||
|
iconst -1
|
||||||
|
istore 6
|
||||||
iconst 103
|
iconst 103
|
||||||
iconst 105
|
iconst 105
|
||||||
iconst 1960
|
iconst 1960
|
||||||
iload 1
|
iload 1
|
||||||
enum
|
enum
|
||||||
istore 6
|
istore 7
|
||||||
iconst 103
|
iconst 103
|
||||||
iconst 105
|
iconst 105
|
||||||
iconst 1961
|
iconst 1961
|
||||||
iload 1
|
iload 1
|
||||||
enum
|
enum
|
||||||
istore 7
|
istore 8
|
||||||
iconst 103
|
iconst 103
|
||||||
iconst 105
|
iconst 105
|
||||||
iconst 1135
|
iconst 1135
|
||||||
iload 1
|
iload 1
|
||||||
enum
|
enum
|
||||||
istore 8
|
istore 9
|
||||||
iconst 103
|
iconst 103
|
||||||
iconst 105
|
iconst 105
|
||||||
iconst 1136
|
iconst 1136
|
||||||
iload 1
|
iload 1
|
||||||
enum
|
enum
|
||||||
istore 9
|
|
||||||
iconst 0
|
|
||||||
istore 10
|
istore 10
|
||||||
iconst 0
|
iconst 0
|
||||||
istore 11
|
istore 11
|
||||||
@@ -63,42 +63,71 @@
|
|||||||
istore 14
|
istore 14
|
||||||
iconst 0
|
iconst 0
|
||||||
istore 15
|
istore 15
|
||||||
iload 0
|
iconst 0
|
||||||
if_getwidth
|
|
||||||
istore 16
|
istore 16
|
||||||
iload 0
|
iload 0
|
||||||
if_getheight
|
if_getwidth
|
||||||
istore 17
|
istore 17
|
||||||
|
iload 0
|
||||||
|
if_getheight
|
||||||
|
istore 18
|
||||||
|
iconst 0
|
||||||
|
istore 19
|
||||||
iload 1
|
iload 1
|
||||||
iconst 1745
|
iconst 1745
|
||||||
if_icmpeq LABEL70
|
if_icmpeq LABEL74
|
||||||
jump LABEL84
|
jump LABEL111
|
||||||
LABEL70:
|
LABEL74:
|
||||||
iconst 0
|
|
||||||
iload 16
|
|
||||||
iconst 39387155
|
|
||||||
if_getwidth
|
|
||||||
sub
|
|
||||||
invoke 1045
|
|
||||||
istore 14
|
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 17
|
iload 17
|
||||||
iconst 39387155
|
iconst 39387155
|
||||||
if_getheight
|
if_getwidth
|
||||||
sub
|
sub
|
||||||
invoke 1045
|
invoke 1045
|
||||||
istore 15
|
istore 15
|
||||||
LABEL84:
|
iconst 0
|
||||||
|
iload 18
|
||||||
|
iconst 39387155
|
||||||
|
if_getheight
|
||||||
|
sub
|
||||||
|
invoke 1045
|
||||||
|
istore 16
|
||||||
|
iconst 73
|
||||||
|
iconst 73
|
||||||
|
iload 1
|
||||||
|
iconst 10551329
|
||||||
|
enum
|
||||||
|
istore 6
|
||||||
|
iload 6
|
||||||
|
iconst -1
|
||||||
|
if_icmpne LABEL98
|
||||||
|
jump LABEL111
|
||||||
|
LABEL98:
|
||||||
|
iconst -1
|
||||||
|
invoke 5357
|
||||||
|
iconst 1
|
||||||
|
if_icmpeq LABEL103
|
||||||
|
jump LABEL111
|
||||||
|
LABEL103:
|
||||||
|
get_varc_int 381
|
||||||
|
iconst 16384
|
||||||
|
iload 6
|
||||||
|
if_getwidth
|
||||||
|
scale
|
||||||
|
iconst 42
|
||||||
|
add
|
||||||
|
istore 19
|
||||||
|
LABEL111:
|
||||||
get_varbit 4606
|
get_varbit 4606
|
||||||
iconst 0
|
iconst 0
|
||||||
if_icmpne LABEL88
|
if_icmpne LABEL115
|
||||||
jump LABEL279
|
jump LABEL308
|
||||||
LABEL88:
|
LABEL115:
|
||||||
get_varbit 4606
|
get_varbit 4606
|
||||||
iconst 2
|
iconst 2
|
||||||
if_icmpeq LABEL92
|
if_icmpeq LABEL119
|
||||||
jump LABEL101
|
jump LABEL128
|
||||||
LABEL92:
|
LABEL119:
|
||||||
iconst 512
|
iconst 512
|
||||||
iconst 220
|
iconst 220
|
||||||
viewport_setfov
|
viewport_setfov
|
||||||
@@ -107,36 +136,36 @@ LABEL92:
|
|||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
viewport_clampfov
|
viewport_clampfov
|
||||||
jump LABEL132
|
jump LABEL159
|
||||||
LABEL101:
|
LABEL128:
|
||||||
get_varbit 4606
|
get_varbit 4606
|
||||||
iconst 3
|
iconst 3
|
||||||
if_icmpeq LABEL105
|
if_icmpeq LABEL132
|
||||||
jump LABEL124
|
jump LABEL151
|
||||||
LABEL105:
|
LABEL132:
|
||||||
iconst 256
|
iconst 256
|
||||||
iconst 256
|
iconst 256
|
||||||
viewport_setfov
|
viewport_setfov
|
||||||
iload 1
|
iload 1
|
||||||
iconst 1129
|
iconst 1129
|
||||||
if_icmpeq LABEL112
|
if_icmpeq LABEL139
|
||||||
jump LABEL118
|
jump LABEL145
|
||||||
LABEL112:
|
LABEL139:
|
||||||
iconst 512
|
iconst 512
|
||||||
iconst 512
|
iconst 512
|
||||||
iconst 512
|
iconst 512
|
||||||
iconst 512
|
iconst 512
|
||||||
viewport_clampfov
|
viewport_clampfov
|
||||||
jump LABEL123
|
jump LABEL150
|
||||||
LABEL118:
|
LABEL145:
|
||||||
iconst 640
|
iconst 640
|
||||||
iconst 768
|
iconst 768
|
||||||
iconst 512
|
iconst 512
|
||||||
iconst 512
|
iconst 512
|
||||||
viewport_clampfov
|
viewport_clampfov
|
||||||
LABEL123:
|
LABEL150:
|
||||||
jump LABEL132
|
jump LABEL159
|
||||||
LABEL124:
|
LABEL151:
|
||||||
iconst 256
|
iconst 256
|
||||||
iconst 256
|
iconst 256
|
||||||
viewport_setfov
|
viewport_setfov
|
||||||
@@ -145,52 +174,54 @@ LABEL124:
|
|||||||
iconst 512
|
iconst 512
|
||||||
iconst 512
|
iconst 512
|
||||||
viewport_clampfov
|
viewport_clampfov
|
||||||
LABEL132:
|
LABEL159:
|
||||||
iconst 50
|
iconst 50
|
||||||
cam_setfollowheight
|
cam_setfollowheight
|
||||||
iload 2
|
iload 2
|
||||||
iconst -1
|
iconst -1
|
||||||
if_icmpne LABEL138
|
if_icmpne LABEL165
|
||||||
jump LABEL278
|
jump LABEL307
|
||||||
LABEL138:
|
LABEL165:
|
||||||
iload 3
|
iload 3
|
||||||
iconst -1
|
iconst -1
|
||||||
if_icmpne LABEL142
|
if_icmpne LABEL169
|
||||||
jump LABEL278
|
jump LABEL307
|
||||||
LABEL142:
|
LABEL169:
|
||||||
viewport_geteffectivesize
|
viewport_geteffectivesize
|
||||||
|
istore 12
|
||||||
istore 11
|
istore 11
|
||||||
istore 10
|
|
||||||
iconst 0
|
|
||||||
iload 16
|
|
||||||
iload 10
|
|
||||||
sub
|
|
||||||
invoke 1045
|
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 17
|
iload 17
|
||||||
iload 11
|
iload 11
|
||||||
sub
|
sub
|
||||||
invoke 1045
|
invoke 1045
|
||||||
|
iconst 0
|
||||||
|
iload 18
|
||||||
|
iload 12
|
||||||
|
sub
|
||||||
|
invoke 1045
|
||||||
|
istore 14
|
||||||
istore 13
|
istore 13
|
||||||
istore 12
|
|
||||||
iload 10
|
|
||||||
iload 11
|
iload 11
|
||||||
|
iload 12
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 2
|
iload 2
|
||||||
if_setsize
|
if_setsize
|
||||||
iload 10
|
|
||||||
iconst 0
|
|
||||||
iload 14
|
|
||||||
iload 12
|
|
||||||
sub
|
|
||||||
invoke 1045
|
|
||||||
sub
|
|
||||||
iload 11
|
iload 11
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 15
|
iload 15
|
||||||
iload 13
|
iload 13
|
||||||
sub
|
sub
|
||||||
|
iload 19
|
||||||
|
sub
|
||||||
|
invoke 1045
|
||||||
|
sub
|
||||||
|
iload 12
|
||||||
|
iconst 0
|
||||||
|
iload 16
|
||||||
|
iload 14
|
||||||
|
sub
|
||||||
invoke 1045
|
invoke 1045
|
||||||
sub
|
sub
|
||||||
iconst 0
|
iconst 0
|
||||||
@@ -199,38 +230,26 @@ LABEL142:
|
|||||||
if_setsize
|
if_setsize
|
||||||
iload 4
|
iload 4
|
||||||
iconst -1
|
iconst -1
|
||||||
if_icmpne LABEL185
|
if_icmpne LABEL214
|
||||||
jump LABEL268
|
jump LABEL297
|
||||||
LABEL185:
|
LABEL214:
|
||||||
iload 5
|
iload 5
|
||||||
iconst -1
|
iconst -1
|
||||||
if_icmpne LABEL189
|
if_icmpne LABEL218
|
||||||
jump LABEL268
|
jump LABEL297
|
||||||
LABEL189:
|
LABEL218:
|
||||||
iload 12
|
|
||||||
iload 14
|
|
||||||
sub
|
|
||||||
iconst 2
|
|
||||||
div
|
|
||||||
iload 13
|
iload 13
|
||||||
iload 15
|
iload 15
|
||||||
sub
|
sub
|
||||||
iconst 2
|
iconst 2
|
||||||
div
|
div
|
||||||
|
iload 14
|
||||||
|
iload 16
|
||||||
|
sub
|
||||||
|
iconst 2
|
||||||
|
div
|
||||||
|
istore 14
|
||||||
istore 13
|
istore 13
|
||||||
istore 12
|
|
||||||
iconst 0
|
|
||||||
iload 6
|
|
||||||
iload 12
|
|
||||||
sub
|
|
||||||
invoke 1045
|
|
||||||
iconst 0
|
|
||||||
iload 8
|
|
||||||
iload 12
|
|
||||||
sub
|
|
||||||
invoke 1045
|
|
||||||
istore 8
|
|
||||||
istore 6
|
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 7
|
iload 7
|
||||||
iload 13
|
iload 13
|
||||||
@@ -243,34 +262,46 @@ LABEL189:
|
|||||||
invoke 1045
|
invoke 1045
|
||||||
istore 9
|
istore 9
|
||||||
istore 7
|
istore 7
|
||||||
iload 6
|
iconst 0
|
||||||
|
iload 8
|
||||||
|
iload 14
|
||||||
|
sub
|
||||||
|
invoke 1045
|
||||||
|
iconst 0
|
||||||
|
iload 10
|
||||||
|
iload 14
|
||||||
|
sub
|
||||||
|
invoke 1045
|
||||||
|
istore 10
|
||||||
|
istore 8
|
||||||
iload 7
|
iload 7
|
||||||
|
iload 8
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 4
|
iload 4
|
||||||
if_setposition
|
if_setposition
|
||||||
iload 6
|
|
||||||
iload 7
|
iload 7
|
||||||
|
iload 8
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 5
|
iload 5
|
||||||
if_setposition
|
if_setposition
|
||||||
iload 6
|
|
||||||
iload 8
|
|
||||||
add
|
|
||||||
iload 7
|
iload 7
|
||||||
iload 9
|
iload 9
|
||||||
add
|
add
|
||||||
|
iload 8
|
||||||
|
iload 10
|
||||||
|
add
|
||||||
iconst 1
|
iconst 1
|
||||||
iconst 1
|
iconst 1
|
||||||
iload 4
|
iload 4
|
||||||
if_setsize
|
if_setsize
|
||||||
iload 6
|
|
||||||
iload 8
|
|
||||||
add
|
|
||||||
iload 7
|
iload 7
|
||||||
iload 9
|
iload 9
|
||||||
add
|
add
|
||||||
|
iload 8
|
||||||
|
iload 10
|
||||||
|
add
|
||||||
iconst 1
|
iconst 1
|
||||||
iconst 1
|
iconst 1
|
||||||
iload 5
|
iload 5
|
||||||
@@ -282,11 +313,11 @@ LABEL189:
|
|||||||
iconst 10551310
|
iconst 10551310
|
||||||
enum
|
enum
|
||||||
iload 5
|
iload 5
|
||||||
iload 8
|
|
||||||
iload 9
|
iload 9
|
||||||
|
iload 10
|
||||||
invoke 910
|
invoke 910
|
||||||
jump LABEL278
|
jump LABEL307
|
||||||
LABEL268:
|
LABEL297:
|
||||||
iload 1
|
iload 1
|
||||||
iconst 73
|
iconst 73
|
||||||
iconst 73
|
iconst 73
|
||||||
@@ -297,9 +328,9 @@ LABEL268:
|
|||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
invoke 910
|
invoke 910
|
||||||
LABEL278:
|
LABEL307:
|
||||||
jump LABEL395
|
jump LABEL426
|
||||||
LABEL279:
|
LABEL308:
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
@@ -309,106 +340,108 @@ LABEL279:
|
|||||||
iconst 128
|
iconst 128
|
||||||
sconst "outerZoomLimit"
|
sconst "outerZoomLimit"
|
||||||
runelite_callback
|
runelite_callback
|
||||||
if_icmpge LABEL288
|
if_icmpge LABEL317
|
||||||
jump LABEL304
|
jump LABEL333
|
||||||
LABEL288:
|
LABEL317:
|
||||||
get_varc_int 73
|
get_varc_int 73
|
||||||
iconst 896
|
iconst 896
|
||||||
sconst "innerZoomLimit"
|
sconst "innerZoomLimit"
|
||||||
runelite_callback
|
runelite_callback
|
||||||
if_icmple LABEL292
|
if_icmple LABEL321
|
||||||
jump LABEL304
|
jump LABEL333
|
||||||
LABEL292:
|
LABEL321:
|
||||||
get_varc_int 74
|
get_varc_int 74
|
||||||
iconst 128
|
iconst 128
|
||||||
sconst "outerZoomLimit"
|
sconst "outerZoomLimit"
|
||||||
runelite_callback
|
runelite_callback
|
||||||
if_icmpge LABEL296
|
if_icmpge LABEL325
|
||||||
jump LABEL304
|
jump LABEL333
|
||||||
LABEL296:
|
LABEL325:
|
||||||
get_varc_int 74
|
get_varc_int 74
|
||||||
iconst 896
|
iconst 896
|
||||||
sconst "innerZoomLimit"
|
sconst "innerZoomLimit"
|
||||||
runelite_callback
|
runelite_callback
|
||||||
if_icmple LABEL300
|
if_icmple LABEL329
|
||||||
jump LABEL304
|
jump LABEL333
|
||||||
LABEL300:
|
LABEL329:
|
||||||
get_varc_int 73
|
get_varc_int 73
|
||||||
get_varc_int 74
|
get_varc_int 74
|
||||||
invoke 42
|
invoke 42
|
||||||
jump LABEL307
|
jump LABEL336
|
||||||
LABEL304:
|
LABEL333:
|
||||||
iconst 512
|
iconst 512
|
||||||
iconst 512
|
iconst 512
|
||||||
invoke 42
|
invoke 42
|
||||||
LABEL307:
|
LABEL336:
|
||||||
viewport_geteffectivesize
|
viewport_geteffectivesize
|
||||||
|
istore 12
|
||||||
istore 11
|
istore 11
|
||||||
istore 10
|
|
||||||
iload 2
|
iload 2
|
||||||
iconst -1
|
iconst -1
|
||||||
if_icmpne LABEL314
|
if_icmpne LABEL343
|
||||||
jump LABEL395
|
jump LABEL426
|
||||||
LABEL314:
|
LABEL343:
|
||||||
iload 3
|
iload 3
|
||||||
iconst -1
|
iconst -1
|
||||||
if_icmpne LABEL318
|
if_icmpne LABEL347
|
||||||
jump LABEL395
|
jump LABEL426
|
||||||
LABEL318:
|
LABEL347:
|
||||||
iload 10
|
|
||||||
iload 11
|
iload 11
|
||||||
|
iload 12
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 2
|
iload 2
|
||||||
if_setsize
|
if_setsize
|
||||||
iload 10
|
|
||||||
iload 14
|
|
||||||
sub
|
|
||||||
iload 11
|
iload 11
|
||||||
iload 15
|
iload 15
|
||||||
sub
|
sub
|
||||||
|
iload 19
|
||||||
|
sub
|
||||||
|
iload 12
|
||||||
|
iload 16
|
||||||
|
sub
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 3
|
iload 3
|
||||||
if_setsize
|
if_setsize
|
||||||
iload 4
|
iload 4
|
||||||
iconst -1
|
iconst -1
|
||||||
if_icmpne LABEL338
|
if_icmpne LABEL369
|
||||||
jump LABEL385
|
jump LABEL416
|
||||||
LABEL338:
|
LABEL369:
|
||||||
iload 5
|
iload 5
|
||||||
iconst -1
|
iconst -1
|
||||||
if_icmpne LABEL342
|
if_icmpne LABEL373
|
||||||
jump LABEL385
|
jump LABEL416
|
||||||
LABEL342:
|
LABEL373:
|
||||||
iload 6
|
|
||||||
iload 7
|
iload 7
|
||||||
|
iload 8
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 4
|
iload 4
|
||||||
if_setposition
|
if_setposition
|
||||||
iload 6
|
|
||||||
iload 7
|
iload 7
|
||||||
|
iload 8
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 5
|
iload 5
|
||||||
if_setposition
|
if_setposition
|
||||||
iload 6
|
|
||||||
iload 8
|
|
||||||
add
|
|
||||||
iload 7
|
iload 7
|
||||||
iload 9
|
iload 9
|
||||||
add
|
add
|
||||||
|
iload 8
|
||||||
|
iload 10
|
||||||
|
add
|
||||||
iconst 1
|
iconst 1
|
||||||
iconst 1
|
iconst 1
|
||||||
iload 4
|
iload 4
|
||||||
if_setsize
|
if_setsize
|
||||||
iload 6
|
|
||||||
iload 8
|
|
||||||
add
|
|
||||||
iload 7
|
iload 7
|
||||||
iload 9
|
iload 9
|
||||||
add
|
add
|
||||||
|
iload 8
|
||||||
|
iload 10
|
||||||
|
add
|
||||||
iconst 1
|
iconst 1
|
||||||
iconst 1
|
iconst 1
|
||||||
iload 5
|
iload 5
|
||||||
@@ -420,11 +453,11 @@ LABEL342:
|
|||||||
iconst 10551310
|
iconst 10551310
|
||||||
enum
|
enum
|
||||||
iload 5
|
iload 5
|
||||||
iload 8
|
|
||||||
iload 9
|
iload 9
|
||||||
|
iload 10
|
||||||
invoke 910
|
invoke 910
|
||||||
jump LABEL395
|
jump LABEL426
|
||||||
LABEL385:
|
LABEL416:
|
||||||
iload 1
|
iload 1
|
||||||
iconst 73
|
iconst 73
|
||||||
iconst 73
|
iconst 73
|
||||||
@@ -435,86 +468,86 @@ LABEL385:
|
|||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
invoke 910
|
invoke 910
|
||||||
LABEL395:
|
LABEL426:
|
||||||
iconst 73
|
iconst 73
|
||||||
iconst 73
|
iconst 73
|
||||||
iload 1
|
iload 1
|
||||||
iconst 10551312
|
iconst 10551312
|
||||||
enum
|
enum
|
||||||
istore 18
|
istore 20
|
||||||
iload 18
|
iload 20
|
||||||
iconst -1
|
iconst -1
|
||||||
if_icmpne LABEL405
|
if_icmpne LABEL436
|
||||||
jump LABEL449
|
jump LABEL480
|
||||||
LABEL405:
|
LABEL436:
|
||||||
invoke 1972
|
invoke 1972
|
||||||
iconst 0
|
iconst 0
|
||||||
if_icmpeq LABEL409
|
if_icmpeq LABEL440
|
||||||
jump LABEL443
|
jump LABEL474
|
||||||
LABEL409:
|
LABEL440:
|
||||||
iload 18
|
iload 20
|
||||||
if_hassub
|
if_hassub
|
||||||
iconst 1
|
iconst 1
|
||||||
if_icmpeq LABEL414
|
if_icmpeq LABEL445
|
||||||
jump LABEL443
|
jump LABEL474
|
||||||
LABEL414:
|
LABEL445:
|
||||||
get_varc_int 173
|
get_varc_int 173
|
||||||
iconst -2
|
iconst -2
|
||||||
if_icmpeq LABEL418
|
if_icmpeq LABEL449
|
||||||
jump LABEL425
|
jump LABEL456
|
||||||
LABEL418:
|
LABEL449:
|
||||||
iconst 512
|
iconst 512
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 1
|
iconst 1
|
||||||
iload 18
|
iload 20
|
||||||
if_setsize
|
if_setsize
|
||||||
jump LABEL442
|
jump LABEL473
|
||||||
LABEL425:
|
LABEL456:
|
||||||
get_varc_int 173
|
get_varc_int 173
|
||||||
iconst -3
|
iconst -3
|
||||||
if_icmpeq LABEL429
|
if_icmpeq LABEL460
|
||||||
jump LABEL436
|
jump LABEL467
|
||||||
LABEL429:
|
LABEL460:
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 1
|
iconst 1
|
||||||
iconst 1
|
iconst 1
|
||||||
iload 18
|
iload 20
|
||||||
if_setsize
|
if_setsize
|
||||||
jump LABEL442
|
jump LABEL473
|
||||||
LABEL436:
|
LABEL467:
|
||||||
iconst 512
|
iconst 512
|
||||||
iconst 334
|
iconst 334
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 18
|
iload 20
|
||||||
if_setsize
|
if_setsize
|
||||||
LABEL442:
|
LABEL473:
|
||||||
jump LABEL449
|
jump LABEL480
|
||||||
LABEL443:
|
LABEL474:
|
||||||
iconst 512
|
iconst 512
|
||||||
iconst 334
|
iconst 334
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 18
|
iload 20
|
||||||
if_setsize
|
if_setsize
|
||||||
LABEL449:
|
LABEL480:
|
||||||
iconst 73
|
iconst 73
|
||||||
iconst 73
|
iconst 73
|
||||||
iload 1
|
iload 1
|
||||||
iconst 10551314
|
iconst 10551314
|
||||||
enum
|
enum
|
||||||
istore 18
|
|
||||||
iconst 0
|
|
||||||
istore 19
|
|
||||||
iconst 0
|
|
||||||
istore 20
|
istore 20
|
||||||
iload 18
|
iconst 0
|
||||||
|
istore 21
|
||||||
|
iconst 0
|
||||||
|
istore 22
|
||||||
|
iload 20
|
||||||
iconst -1
|
iconst -1
|
||||||
if_icmpne LABEL463
|
if_icmpne LABEL494
|
||||||
jump LABEL511
|
jump LABEL542
|
||||||
LABEL463:
|
LABEL494:
|
||||||
iconst 73
|
iconst 73
|
||||||
iconst 73
|
iconst 73
|
||||||
iload 1
|
iload 1
|
||||||
@@ -522,101 +555,101 @@ LABEL463:
|
|||||||
enum
|
enum
|
||||||
if_hassub
|
if_hassub
|
||||||
iconst 1
|
iconst 1
|
||||||
if_icmpeq LABEL472
|
if_icmpeq LABEL503
|
||||||
jump LABEL481
|
jump LABEL512
|
||||||
LABEL472:
|
LABEL503:
|
||||||
get_varbit 4692
|
get_varbit 4692
|
||||||
iconst 0
|
iconst 0
|
||||||
if_icmpne LABEL476
|
if_icmpne LABEL507
|
||||||
jump LABEL479
|
jump LABEL510
|
||||||
LABEL476:
|
LABEL507:
|
||||||
iconst 0
|
iconst 0
|
||||||
istore 20
|
istore 22
|
||||||
jump LABEL481
|
jump LABEL512
|
||||||
LABEL479:
|
LABEL510:
|
||||||
iconst 38
|
iconst 38
|
||||||
istore 20
|
istore 22
|
||||||
LABEL481:
|
LABEL512:
|
||||||
invoke 1972
|
invoke 1972
|
||||||
iconst 1
|
iconst 1
|
||||||
if_icmpeq LABEL485
|
if_icmpeq LABEL516
|
||||||
jump LABEL503
|
jump LABEL534
|
||||||
LABEL485:
|
LABEL516:
|
||||||
get_varbit 542
|
get_varbit 542
|
||||||
iconst 0
|
iconst 0
|
||||||
if_icmpeq LABEL489
|
if_icmpeq LABEL520
|
||||||
jump LABEL503
|
jump LABEL534
|
||||||
LABEL489:
|
LABEL520:
|
||||||
get_varbit 6254
|
get_varbit 6254
|
||||||
iconst 0
|
iconst 0
|
||||||
if_icmpeq LABEL493
|
if_icmpeq LABEL524
|
||||||
jump LABEL498
|
jump LABEL529
|
||||||
LABEL493:
|
LABEL524:
|
||||||
iconst 182
|
iconst 182
|
||||||
iconst 4
|
iconst 4
|
||||||
add
|
add
|
||||||
istore 19
|
istore 21
|
||||||
jump LABEL502
|
jump LABEL533
|
||||||
LABEL498:
|
LABEL529:
|
||||||
iconst 120
|
iconst 120
|
||||||
iconst 4
|
iconst 4
|
||||||
add
|
add
|
||||||
istore 19
|
istore 21
|
||||||
LABEL502:
|
LABEL533:
|
||||||
jump LABEL505
|
jump LABEL536
|
||||||
LABEL503:
|
LABEL534:
|
||||||
iconst 0
|
iconst 0
|
||||||
istore 19
|
istore 21
|
||||||
LABEL505:
|
LABEL536:
|
||||||
iload 19
|
iload 21
|
||||||
iload 20
|
iload 22
|
||||||
iconst 2
|
iconst 2
|
||||||
iconst 0
|
iconst 0
|
||||||
iload 18
|
iload 20
|
||||||
if_setposition
|
if_setposition
|
||||||
LABEL511:
|
LABEL542:
|
||||||
iconst 73
|
iconst 73
|
||||||
iconst 73
|
iconst 73
|
||||||
iload 1
|
iload 1
|
||||||
iconst 10551305
|
iconst 10551305
|
||||||
enum
|
enum
|
||||||
istore 18
|
istore 20
|
||||||
iconst 0
|
iconst 0
|
||||||
istore 19
|
istore 21
|
||||||
iload 18
|
iload 20
|
||||||
iconst -1
|
iconst -1
|
||||||
if_icmpne LABEL523
|
if_icmpne LABEL554
|
||||||
jump LABEL545
|
jump LABEL576
|
||||||
LABEL523:
|
LABEL554:
|
||||||
invoke 1972
|
invoke 1972
|
||||||
iconst 1
|
iconst 1
|
||||||
if_icmpeq LABEL527
|
if_icmpeq LABEL558
|
||||||
jump LABEL537
|
jump LABEL568
|
||||||
LABEL527:
|
LABEL558:
|
||||||
get_varbit 6254
|
get_varbit 6254
|
||||||
iconst 0
|
iconst 0
|
||||||
if_icmpeq LABEL531
|
if_icmpeq LABEL562
|
||||||
jump LABEL534
|
jump LABEL565
|
||||||
LABEL531:
|
LABEL562:
|
||||||
iconst 182
|
iconst 182
|
||||||
istore 19
|
istore 21
|
||||||
jump LABEL536
|
jump LABEL567
|
||||||
LABEL534:
|
LABEL565:
|
||||||
iconst 120
|
iconst 120
|
||||||
istore 19
|
istore 21
|
||||||
LABEL536:
|
LABEL567:
|
||||||
jump LABEL539
|
jump LABEL570
|
||||||
LABEL537:
|
LABEL568:
|
||||||
iconst 0
|
iconst 0
|
||||||
istore 19
|
istore 21
|
||||||
LABEL539:
|
LABEL570:
|
||||||
iload 19
|
iload 21
|
||||||
iconst 0
|
iconst 0
|
||||||
iconst 1
|
iconst 1
|
||||||
iconst 1
|
iconst 1
|
||||||
iload 18
|
iload 20
|
||||||
if_setsize
|
if_setsize
|
||||||
LABEL545:
|
LABEL576:
|
||||||
iconst 73
|
iconst 73
|
||||||
iconst 73
|
iconst 73
|
||||||
iload 1
|
iload 1
|
||||||
|
|||||||
Reference in New Issue
Block a user