diff --git a/runelite-api/src/main/java/net/runelite/api/Client.java b/runelite-api/src/main/java/net/runelite/api/Client.java index 2fba549c1b..e0955084b7 100644 --- a/runelite-api/src/main/java/net/runelite/api/Client.java +++ b/runelite-api/src/main/java/net/runelite/api/Client.java @@ -262,51 +262,6 @@ public interface Client extends GameEngine */ void playSoundEffect(int id, int x, int y, int range); - boolean getDrawBoundingBoxes2D(); - - /** - * When {@code shouldDraw} is true, a 2D bounding box will be drawn for - * all on-screen objects - * - * @param shouldDraw whether or not to draw 2D bounding boxes - */ - void setDrawBoundingBoxes2D(boolean shouldDraw); - - boolean getDrawBoundingBoxes3D(); - - /** - * When {@code shouldDraw} is true, 3D bounding boxes will be drawn - * either for the object under the cursor, or every object on screen - * according to - * {@link #setBoundingBoxAlwaysOnMode(boolean) BoundingBoxAlwaysOnMode} - * - * @param shouldDraw whether or not to draw 3D bounding boxes - */ - void setDrawBoundingBoxes3D(boolean shouldDraw); - - boolean getdrawObjectGeometry2D(); - - /** - * When {@code shouldDraw} is true, the clickbox geometry for the object - * under the cursor will be displayed - * - * @param shouldDraw whether or not to draw the clickbox geometry - */ - void setdrawObjectGeometry2D(boolean shouldDraw); - - boolean getBoundingBoxAlwaysOnMode(); - - /** - * Changes how {@link #getDrawBoundingBoxes3D()} behaves when active. - * When {@code alwaysDrawBoxes} is true, 3D bounding boxes will be - * drawn. When false, a 3D bounding box will only be drawn for the - * object under the cursor - * - * @param alwaysDrawBoxes whether or not to draw every 3D bounding box, - * when 3D bounding boxes are enabled - */ - void setBoundingBoxAlwaysOnMode(boolean alwaysDrawBoxes); - BufferProvider getBufferProvider(); int getMouseIdleTicks(); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/devtools/DevToolsPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/devtools/DevToolsPanel.java index e5f7c12705..bbd126e943 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/devtools/DevToolsPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/devtools/DevToolsPanel.java @@ -27,10 +27,7 @@ package net.runelite.client.plugins.devtools; import java.awt.Color; import java.awt.GridLayout; -import java.io.IOException; -import javax.imageio.ImageIO; import javax.inject.Inject; -import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JPanel; import lombok.extern.slf4j.Slf4j; @@ -136,9 +133,6 @@ public class DevToolsPanel extends PluginPanel }); container.add(renderProjectilesBtn); - final JPanel boundsDebugPanel = createBoundsDebugMultiButton(); - container.add(boundsDebugPanel); - final JButton varSnapshotBtn = new JButton("Snapshot Vars"); varSnapshotBtn.addActionListener(varTracker::snapshot); container.add(varSnapshotBtn); @@ -207,73 +201,6 @@ public class DevToolsPanel extends PluginPanel return container; } - private JPanel createBoundsDebugMultiButton() - { - ImageIcon bBox2DIcon; - ImageIcon bBox3DIcon; - ImageIcon clickBoxIcon; - ImageIcon bBox3DMousoverIcon; - - try - { - synchronized (ImageIO.class) - { - bBox2DIcon = new ImageIcon(ImageIO.read(DevToolsPlugin.class.getResourceAsStream("2D_bounding_box.png"))); - bBox3DIcon = new ImageIcon(ImageIO.read(DevToolsPlugin.class.getResourceAsStream("3D_bounding_box.png"))); - clickBoxIcon = new ImageIcon(ImageIO.read(DevToolsPlugin.class.getResourceAsStream("2D_clickbox_geometry.png"))); - bBox3DMousoverIcon = new ImageIcon(ImageIO.read(DevToolsPlugin.class.getResourceAsStream("mouseover_3D_bounding_box.png"))); - } - } - catch (IOException ex) - { - log.warn("unable to load bounding box images", ex); - return new JPanel(); - } - - JPanel buttonPanel = new JPanel(); - buttonPanel.setLayout(new GridLayout(1, 4)); - JButton bBox2DButton = new JButton(bBox2DIcon); - bBox2DButton.addActionListener(e -> - { - client.setDrawBoundingBoxes2D(!client.getDrawBoundingBoxes2D()); - highlightButton(bBox2DButton); - }); - buttonPanel.add(bBox2DButton); - - JButton bBox3DButton = new JButton(bBox3DIcon); - bBox3DButton.addActionListener(e -> - { - client.setDrawBoundingBoxes3D(!client.getDrawBoundingBoxes3D()); - highlightButton(bBox3DButton); - }); - buttonPanel.add(bBox3DButton); - - JButton clickBoxButton = new JButton(clickBoxIcon); - clickBoxButton.addActionListener(e -> - { - client.setdrawObjectGeometry2D(!client.getdrawObjectGeometry2D()); - highlightButton(clickBoxButton); - }); - buttonPanel.add(clickBoxButton); - - JButton mouseoverModeButton = new JButton(client.getBoundingBoxAlwaysOnMode() ? bBox3DIcon : bBox3DMousoverIcon); - mouseoverModeButton.addActionListener(e -> - { - client.setBoundingBoxAlwaysOnMode(!client.getBoundingBoxAlwaysOnMode()); - if (client.getBoundingBoxAlwaysOnMode()) - { - mouseoverModeButton.setIcon(bBox3DIcon); - } - else - { - mouseoverModeButton.setIcon(bBox3DMousoverIcon); - } - }); - buttonPanel.add(mouseoverModeButton); - - return buttonPanel; - } - private void highlightButton(JButton button) { if (button.getBackground().equals(Color.GREEN)) diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/devtools/2D_bounding_box.png b/runelite-client/src/main/resources/net/runelite/client/plugins/devtools/2D_bounding_box.png deleted file mode 100644 index d4449a42d3..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/plugins/devtools/2D_bounding_box.png and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/devtools/2D_clickbox_geometry.png b/runelite-client/src/main/resources/net/runelite/client/plugins/devtools/2D_clickbox_geometry.png deleted file mode 100644 index bf6a1930b6..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/plugins/devtools/2D_clickbox_geometry.png and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/devtools/3D_bounding_box.png b/runelite-client/src/main/resources/net/runelite/client/plugins/devtools/3D_bounding_box.png deleted file mode 100644 index 6db5ead412..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/plugins/devtools/3D_bounding_box.png and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/devtools/mouseover_3D_bounding_box.png b/runelite-client/src/main/resources/net/runelite/client/plugins/devtools/mouseover_3D_bounding_box.png deleted file mode 100644 index 6af91bffa8..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/plugins/devtools/mouseover_3D_bounding_box.png and /dev/null differ diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSClientMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSClientMixin.java index 0897f8e685..a9525d6be2 100644 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSClientMixin.java +++ b/runelite-mixins/src/main/java/net/runelite/mixins/RSClientMixin.java @@ -521,27 +521,6 @@ public abstract class RSClientMixin implements RSClient return null; } - @Inject - @Override - public boolean getBoundingBoxAlwaysOnMode() - { - return getboundingBox3DDrawMode() == getALWAYSDrawMode(); - } - - @Inject - @Override - public void setBoundingBoxAlwaysOnMode(boolean alwaysDrawBoxes) - { - if (alwaysDrawBoxes) - { - setboundingBox3DDrawMode(getALWAYSDrawMode()); - } - else - { - setboundingBox3DDrawMode(getON_MOUSEOVERDrawMode()); - } - } - @Inject @Override public void changeMemoryMode(boolean lowMemory) diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSBoundingBox3DDrawMode.java b/runescape-api/src/main/java/net/runelite/rs/api/RSBoundingBox3DDrawMode.java deleted file mode 100644 index c17bae9597..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSBoundingBox3DDrawMode.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2018, SomeoneWithAnInternetConnection - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -public interface RSBoundingBox3DDrawMode -{ - -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSClient.java b/runescape-api/src/main/java/net/runelite/rs/api/RSClient.java index 2b6f4cc898..322ec46657 100644 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSClient.java +++ b/runescape-api/src/main/java/net/runelite/rs/api/RSClient.java @@ -436,42 +436,6 @@ public interface RSClient extends RSGameEngine, Client @Import("queuedSoundEffectCount") void setQueuedSoundEffectCount(int queuedSoundEffectCount); - @Import("drawBoundingBoxes2D") - @Override - boolean getDrawBoundingBoxes2D(); - - @Import("drawBoundingBoxes2D") - @Override - void setDrawBoundingBoxes2D(boolean shouldDraw); - - @Import("drawBoundingBoxes3D") - @Override - boolean getDrawBoundingBoxes3D(); - - @Import("drawBoundingBoxes3D") - @Override - void setDrawBoundingBoxes3D(boolean shouldDraw); - - @Import("drawObjectGeometry2D") - @Override - boolean getdrawObjectGeometry2D(); - - @Import("drawObjectGeometry2D") - @Override - void setdrawObjectGeometry2D(boolean shouldDraw); - - @Import("boundingBox3DDrawMode") - RSBoundingBox3DDrawMode getboundingBox3DDrawMode(); - - @Import("boundingBox3DDrawMode") - void setboundingBox3DDrawMode(RSBoundingBox3DDrawMode drawMode); - - @Import("ON_MOUSEOVER") - RSBoundingBox3DDrawMode getON_MOUSEOVERDrawMode(); - - @Import("ALWAYS") - RSBoundingBox3DDrawMode getALWAYSDrawMode(); - @Import("rasterProvider") @Override RSBufferProvider getBufferProvider();