Update: Upstream runelite/runelite
This commit is contained in:
@@ -38,6 +38,8 @@ import java.util.Map;
|
||||
import java.util.Arrays;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.inject.Inject;
|
||||
import javax.naming.directory.SearchResult;
|
||||
|
||||
import net.runelite.http.api.RuneLiteAPI;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
@@ -26,18 +26,6 @@ package net.runelite.api;
|
||||
|
||||
public final class ScriptID
|
||||
{
|
||||
/**
|
||||
* Handles zoom input
|
||||
*
|
||||
* Updates the VarClientInts (73, 74) to this same value
|
||||
* <ul>
|
||||
* <li> int Reset zoom position </li>
|
||||
* <li> int Reset zoom position </li>
|
||||
* </ul>
|
||||
*/
|
||||
@ScriptArguments(integer = 2)
|
||||
public static final int CAMERA_DO_ZOOM = 42;
|
||||
|
||||
/**
|
||||
* Updates the scrollbar handle and container to the new height of the content container
|
||||
* <ul>
|
||||
@@ -76,12 +64,6 @@ public final class ScriptID
|
||||
@ScriptArguments(string = 1)
|
||||
public static final int OPEN_PRIVATE_MESSAGE_INTERFACE = 107;
|
||||
|
||||
/**
|
||||
* Rebuilds the chatbox
|
||||
*/
|
||||
@ScriptArguments()
|
||||
public static final int BUILD_CHATBOX = 216;
|
||||
|
||||
/**
|
||||
* Rebuilds the text input widget inside the chat interface
|
||||
* <ul>
|
||||
@@ -91,12 +73,6 @@ public final class ScriptID
|
||||
@ScriptArguments(string = 1)
|
||||
public static final int CHAT_TEXT_INPUT_REBUILD = 222;
|
||||
|
||||
/**
|
||||
* Builds the chatbox input widget
|
||||
*/
|
||||
@ScriptArguments()
|
||||
public static final int CHAT_PROMPT_INIT = 223;
|
||||
|
||||
/**
|
||||
* Closes the chatbox input
|
||||
* <ul>
|
||||
@@ -139,17 +115,6 @@ public final class ScriptID
|
||||
@ScriptArguments()
|
||||
public static final int CHAT_PROMPT_INIT = 223;
|
||||
|
||||
/**
|
||||
* Displays the game messages when clicking on an item inside the Items Kept on Death interface
|
||||
* <ul>
|
||||
* <li> int (boolean) Item kept on death </li>
|
||||
* <li> int Item Quantity </li>
|
||||
* <li> String Item Name </li>
|
||||
* </ul>
|
||||
*/
|
||||
@ScriptArguments(integer = 2, string = 1)
|
||||
public static final int DEATH_KEEP_ITEM_EXAMINE = 1603;
|
||||
|
||||
/**
|
||||
* Checks the state of the given stash unit.
|
||||
* <ul>
|
||||
@@ -174,17 +139,6 @@ public final class ScriptID
|
||||
@ScriptArguments(integer = 2, string = 1)
|
||||
public static final int DEATH_KEEP_ITEM_EXAMINE = 1603;
|
||||
|
||||
/**
|
||||
* Creates a disabled experience drop
|
||||
*
|
||||
* <ul>
|
||||
* <li>int (Skill ordinal) Sets what icon to use</li>
|
||||
* <li>int Amount of exp to drop</li>
|
||||
* </ul>
|
||||
*/
|
||||
@ScriptArguments(integer = 2)
|
||||
public static final int XPDROP_DISABLED = 2091;
|
||||
|
||||
/**
|
||||
* Queries the completion state of a quest by its struct id
|
||||
* <ul>
|
||||
|
||||
@@ -760,7 +760,7 @@ public enum Varbits
|
||||
*
|
||||
* @see <a href="https://oldschool.runescape.wiki/w/Minimap#Special_attack_orb">The OSRS Wiki's Minimap page</a>
|
||||
*/
|
||||
PVP_SPEC_ORB(8121);
|
||||
PVP_SPEC_ORB(8121),
|
||||
|
||||
LMS_POISON_PROGRESS(5317),
|
||||
|
||||
|
||||
@@ -593,12 +593,7 @@ public enum WidgetInfo
|
||||
|
||||
MINIGAME_TELEPORT_BUTTON(WidgetID.MINIGAME_TAB_ID, WidgetID.Minigames.TELEPORT_BUTTON),
|
||||
PVP_FOG_OVERLAY(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.FOG_OVERLAY),
|
||||
PVP_CONTAINER(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.PVP_WIDGET_CONTAINER)
|
||||
SPELL_LUMBRIDGE_HOME_TELEPORT(WidgetID.SPELLBOOK_GROUP_ID, WidgetID.StandardSpellBook.LUMBRIDGE_HOME_TELEPORT),
|
||||
SPELL_EDGEVILLE_HOME_TELEPORT(WidgetID.SPELLBOOK_GROUP_ID, WidgetID.AncientSpellBook.EDGEVILLE_HOME_TELEPORT),
|
||||
SPELL_LUNAR_HOME_TELEPORT(WidgetID.SPELLBOOK_GROUP_ID, WidgetID.LunarSpellBook.LUNAR_HOME_TELEPORT),
|
||||
SPELL_ARCEUUS_HOME_TELEPORT(WidgetID.SPELLBOOK_GROUP_ID, WidgetID.ArceuusSpellBook.ARCEUUS_HOME_TELEPORT),
|
||||
SPELL_KOUREND_HOME_TELEPORT(WidgetID.SPELLBOOK_GROUP_ID, WidgetID.StandardSpellBook.KOUREND_HOME_TELEPORT),
|
||||
PVP_CONTAINER(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.PVP_WIDGET_CONTAINER),
|
||||
|
||||
PVP_SKULL_CONTAINER(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.SKULL_CONTAINER),
|
||||
PVP_SKULL(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.SKULL),
|
||||
|
||||
@@ -46,7 +46,6 @@ import net.runelite.api.Entity;
|
||||
import net.runelite.api.MainBufferProvider;
|
||||
import net.runelite.api.NullItemID;
|
||||
import net.runelite.api.RenderOverview;
|
||||
import net.runelite.api.Renderable;
|
||||
import net.runelite.api.Skill;
|
||||
import net.runelite.api.WorldMapManager;
|
||||
import net.runelite.api.events.BeforeMenuRender;
|
||||
@@ -94,8 +93,8 @@ public class Hooks implements Callbacks
|
||||
private static final OverlayRenderer renderer = injector.getInstance(OverlayRenderer.class);
|
||||
private static final OverlayManager overlayManager = injector.getInstance(OverlayManager.class);
|
||||
|
||||
private static final GameTick GAME_TICK = new GameTick();
|
||||
private static final BeforeRender BEFORE_RENDER = new BeforeRender();
|
||||
private static final GameTick GAME_TICK = GameTick.INSTANCE;
|
||||
private static final BeforeRender BEFORE_RENDER = BeforeRender.INSTANCE;
|
||||
|
||||
@Inject
|
||||
private EventBus eventBus;
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2020, Sean Dewar <https://github.com/seandewar>
|
||||
* 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.client.plugins.camera;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import javax.inject.Inject;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.api.VarClientInt;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayLayer;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import net.runelite.client.ui.overlay.tooltip.Tooltip;
|
||||
import net.runelite.client.ui.overlay.tooltip.TooltipManager;
|
||||
|
||||
class CameraOverlay extends Overlay
|
||||
{
|
||||
private final CameraConfig config;
|
||||
private final Client client;
|
||||
private final TooltipManager tooltipManager;
|
||||
|
||||
@Inject
|
||||
private CameraOverlay(final CameraConfig config, final Client client, final TooltipManager tooltipManager)
|
||||
{
|
||||
this.config = config;
|
||||
this.client = client;
|
||||
this.tooltipManager = tooltipManager;
|
||||
setPosition(OverlayPosition.DYNAMIC);
|
||||
setLayer(OverlayLayer.ABOVE_WIDGETS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension render(final Graphics2D graphics)
|
||||
{
|
||||
final Widget slider = client.getWidget(WidgetInfo.OPTIONS_CAMERA_ZOOM_SLIDER_HANDLE);
|
||||
final Point mousePos = client.getMouseCanvasPosition();
|
||||
|
||||
if (slider == null || slider.isHidden() || !slider.getBounds().contains(mousePos.getX(), mousePos.getY()))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
final int value = client.getVar(VarClientInt.CAMERA_ZOOM_RESIZABLE_VIEWPORT);
|
||||
final int max = config.innerLimit() ? config.INNER_ZOOM_LIMIT : CameraPlugin.DEFAULT_INNER_ZOOM_LIMIT;
|
||||
|
||||
tooltipManager.add(new Tooltip("Camera Zoom: " + value + " / " + max));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user