Merge pull request #2345 from Owain94/merge1502
project: Merge upstream
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
object ProjectVersions {
|
||||
const val launcherVersion = "2.0.4"
|
||||
const val rlVersion = "1.6.6-SNAPSHOT"
|
||||
const val rlVersion = "1.6.6"
|
||||
|
||||
const val openosrsVersion = "3.0.0"
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ public class HiscoreResult
|
||||
private Skill kreearra;
|
||||
private Skill krilTsutsaroth;
|
||||
private Skill mimic;
|
||||
private Skill nightmare;
|
||||
private Skill obor;
|
||||
private Skill sarachnis;
|
||||
private Skill scorpia;
|
||||
@@ -237,6 +238,8 @@ public class HiscoreResult
|
||||
return krilTsutsaroth;
|
||||
case MIMIC:
|
||||
return mimic;
|
||||
case NIGHTMARE:
|
||||
return nightmare;
|
||||
case OBOR:
|
||||
return obor;
|
||||
case SARACHNIS:
|
||||
|
||||
@@ -117,6 +117,7 @@ class HiscoreResultBuilder
|
||||
hiscoreResult.setKreearra(skills.get(index++));
|
||||
hiscoreResult.setKrilTsutsaroth(skills.get(index++));
|
||||
hiscoreResult.setMimic(skills.get(index++));
|
||||
hiscoreResult.setNightmare(skills.get(index++));
|
||||
hiscoreResult.setObor(skills.get(index++));
|
||||
hiscoreResult.setSarachnis(skills.get(index++));
|
||||
hiscoreResult.setScorpia(skills.get(index++));
|
||||
|
||||
@@ -96,6 +96,7 @@ public enum HiscoreSkill
|
||||
KREEARRA("Kree'Arra", BOSS),
|
||||
KRIL_TSUTSAROTH("K'ril Tsutsaroth", BOSS),
|
||||
MIMIC("Mimic", BOSS),
|
||||
NIGHTMARE("Nightmare", BOSS),
|
||||
OBOR("Obor", BOSS),
|
||||
SARACHNIS("Sarachnis", BOSS),
|
||||
SCORPIA("Scorpia", BOSS),
|
||||
|
||||
@@ -80,12 +80,26 @@ public abstract class WidgetItemOverlay extends Overlay
|
||||
Widget parent = widget.getParent();
|
||||
Rectangle parentBounds = parent.getBounds();
|
||||
Rectangle itemCanvasBounds = widgetItem.getCanvasBounds();
|
||||
boolean dragging = widgetItem.getDraggingCanvasBounds() != null;
|
||||
|
||||
boolean shouldClip;
|
||||
shouldClip = itemCanvasBounds.y < parentBounds.y && itemCanvasBounds.y + itemCanvasBounds.height >= parentBounds.y;
|
||||
shouldClip |= itemCanvasBounds.y < parentBounds.y + parentBounds.height && itemCanvasBounds.y + itemCanvasBounds.height >= parentBounds.y + parentBounds.height;
|
||||
shouldClip |= itemCanvasBounds.x < parentBounds.x && (itemCanvasBounds.x + itemCanvasBounds.width) >= parentBounds.x;
|
||||
shouldClip |= itemCanvasBounds.x < parentBounds.x + parentBounds.width && itemCanvasBounds.x + itemCanvasBounds.width >= parentBounds.x + parentBounds.width;
|
||||
if (dragging)
|
||||
{
|
||||
// If dragging, clip if the dragged item is outside of the parent bounds
|
||||
shouldClip = itemCanvasBounds.x < parentBounds.x;
|
||||
shouldClip |= itemCanvasBounds.x + itemCanvasBounds.width >= parentBounds.x + parentBounds.width;
|
||||
shouldClip |= itemCanvasBounds.y < parentBounds.y;
|
||||
shouldClip |= itemCanvasBounds.y + itemCanvasBounds.height >= parentBounds.y + parentBounds.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise, we only need to clip the overlay if it intersects the parent bounds,
|
||||
// since items completely outside of the parent bounds are not drawn
|
||||
shouldClip = itemCanvasBounds.y < parentBounds.y && itemCanvasBounds.y + itemCanvasBounds.height >= parentBounds.y;
|
||||
shouldClip |= itemCanvasBounds.y < parentBounds.y + parentBounds.height && itemCanvasBounds.y + itemCanvasBounds.height >= parentBounds.y + parentBounds.height;
|
||||
shouldClip |= itemCanvasBounds.x < parentBounds.x && itemCanvasBounds.x + itemCanvasBounds.width >= parentBounds.x;
|
||||
shouldClip |= itemCanvasBounds.x < parentBounds.x + parentBounds.width && itemCanvasBounds.x + itemCanvasBounds.width >= parentBounds.x + parentBounds.width;
|
||||
}
|
||||
if (shouldClip)
|
||||
{
|
||||
if (curClipParent != parent)
|
||||
|
||||
Reference in New Issue
Block a user