Merge remote-tracking branch 'runelite/master' into master
This commit is contained in:
@@ -61,6 +61,7 @@ import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import javax.inject.Singleton;
|
||||
@@ -246,6 +247,7 @@ public class ConfigManager
|
||||
return str;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
static String objectToString(Object object)
|
||||
{
|
||||
if (object instanceof Color)
|
||||
@@ -310,7 +312,8 @@ public class ConfigManager
|
||||
{
|
||||
return String.valueOf(object);
|
||||
}
|
||||
return object.toString();
|
||||
|
||||
return object == null ? null : object.toString();
|
||||
}
|
||||
|
||||
public static <T extends Enum<T>> Class<T> getElementType(EnumSet<T> enumSet)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Jordan <nightfirecat@protonmail.com>
|
||||
* 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.game;
|
||||
|
||||
public class AlternateSprites
|
||||
{
|
||||
public static final String DISEASE_HEART = "1067-DISEASE.png";
|
||||
public static final String POISON_HEART = "1067-POISON.png";
|
||||
public static final String VENOM_HEART = "1067-VENOM.png";
|
||||
}
|
||||
@@ -68,8 +68,8 @@ public enum ItemMapping
|
||||
ITEM_DRAGON_SCIMITAR(DRAGON_SCIMITAR, DRAGON_SCIMITAR_OR),
|
||||
ITEM_DRAGON_SCIMITAR_ORNAMENT_KIT(DRAGON_SCIMITAR_ORNAMENT_KIT, DRAGON_SCIMITAR_OR),
|
||||
ITEM_DRAGON_DEFENDER(DRAGON_DEFENDER_ORNAMENT_KIT, DRAGON_DEFENDER_T),
|
||||
ITEM_DRAGON_PICKAXE(DRAGON_PICKAXE, DRAGON_PICKAXE_12797, DRAGON_PICKAXEOR),
|
||||
ITEM_DRAGON_PICKAXE_OR(ZALCANO_SHARD, DRAGON_PICKAXEOR),
|
||||
ITEM_DRAGON_PICKAXE(DRAGON_PICKAXE, DRAGON_PICKAXE_12797, DRAGON_PICKAXE_OR),
|
||||
ITEM_DRAGON_PICKAXE_OR(ZALCANO_SHARD, DRAGON_PICKAXE_OR),
|
||||
ITEM_DRAGON_KITESHIELD(DRAGON_KITESHIELD, DRAGON_KITESHIELD_G),
|
||||
ITEM_DRAGON_KITESHIELD_ORNAMENT_KIT(DRAGON_KITESHIELD_ORNAMENT_KIT, DRAGON_KITESHIELD_G),
|
||||
ITEM_DRAGON_FULL_HELM(DRAGON_FULL_HELM, DRAGON_FULL_HELM_G),
|
||||
|
||||
@@ -51,6 +51,7 @@ public abstract class Overlay implements LayoutableRenderableEntity
|
||||
private OverlayLayer layer = OverlayLayer.UNDER_WIDGETS;
|
||||
private final List<OverlayMenuEntry> menuEntries = new ArrayList<>();
|
||||
private boolean resizable;
|
||||
private int minimumSize = 32;
|
||||
private boolean resettable = true;
|
||||
|
||||
/**
|
||||
|
||||
@@ -74,7 +74,6 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
||||
private static final int BORDER = 5;
|
||||
private static final int BORDER_TOP = BORDER + 15;
|
||||
private static final int PADDING = 2;
|
||||
private static final int MIN_OVERLAY_SIZE = 32;
|
||||
private static final int OVERLAY_RESIZE_TOLERANCE = 5;
|
||||
private static final Dimension SNAP_CORNER_SIZE = new Dimension(80, 80);
|
||||
private static final Color SNAP_CORNER_COLOR = new Color(0, 255, 255, 50);
|
||||
@@ -557,8 +556,9 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
||||
// center
|
||||
}
|
||||
|
||||
final int widthOverflow = Math.max(0, MIN_OVERLAY_SIZE - width);
|
||||
final int heightOverflow = Math.max(0, MIN_OVERLAY_SIZE - height);
|
||||
final int minOverlaySize = currentManagedOverlay.getMinimumSize();
|
||||
final int widthOverflow = Math.max(0, minOverlaySize - width);
|
||||
final int heightOverflow = Math.max(0, minOverlaySize - height);
|
||||
final int dx = x - originalX;
|
||||
final int dy = y - originalY;
|
||||
|
||||
@@ -566,7 +566,7 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
||||
// dimensions and adjust the x/y position accordingly as needed
|
||||
if (widthOverflow > 0)
|
||||
{
|
||||
width = MIN_OVERLAY_SIZE;
|
||||
width = minOverlaySize;
|
||||
|
||||
if (dx > 0)
|
||||
{
|
||||
@@ -575,7 +575,7 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
||||
}
|
||||
if (heightOverflow > 0)
|
||||
{
|
||||
height = MIN_OVERLAY_SIZE;
|
||||
height = minOverlaySize;
|
||||
|
||||
if (dy > 0)
|
||||
{
|
||||
|
||||
@@ -65,6 +65,9 @@ public class WidgetOverlay extends Overlay
|
||||
.put(WidgetInfo.GAUNTLET_TIMER_CONTAINER, OverlayPosition.TOP_LEFT)
|
||||
.put(WidgetInfo.HALLOWED_SEPULCHRE_TIMER_CONTAINER, OverlayPosition.TOP_LEFT)
|
||||
.put(WidgetInfo.HEALTH_OVERLAY_BAR, OverlayPosition.TOP_CENTER)
|
||||
.put(WidgetInfo.NIGHTMARE_PILLAR_HEALTH, OverlayPosition.TOP_LEFT)
|
||||
.put(WidgetInfo.VOLCANIC_MINE_VENTS_INFOBOX_GROUP, OverlayPosition.BOTTOM_RIGHT)
|
||||
.put(WidgetInfo.VOLCANIC_MINE_STABILITY_INFOBOX_GROUP, OverlayPosition.BOTTOM_LEFT)
|
||||
.build();
|
||||
|
||||
public static Collection<WidgetOverlay> createOverlays(final Client client)
|
||||
|
||||
@@ -594,7 +594,7 @@ public class WeaponMap
|
||||
StyleMap.put(ItemID.MITHRIL_KNIFEP_5657, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MITHRIL_KNIFEP_5664, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MITHRIL_THROWNAXE, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MITH_CROSSBOW, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MITHRIL_CROSSBOW, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MONKEY_TALISMAN, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MORRIGANS_JAVELIN, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MORRIGANS_JAVELIN_23619, WeaponStyle.RANGE);
|
||||
|
||||
Reference in New Issue
Block a user