Show ground items under widgets and with interfaces open

This commit is contained in:
Unmoon
2018-02-03 13:18:37 +02:00
parent 52eedf0772
commit b7b40b300f

View File

@@ -105,30 +105,6 @@ public class GroundItemsOverlay extends Overlay
return null;
}
Widget viewport = client.getViewportWidget();
if (viewport != null)
{
Widget[] subViewports = viewport.getStaticChildren();
if (subViewports.length > 0)
{
for (Widget w : subViewports)
{
if (w.getNestedChildren().length > 0)
{
return null;
}
}
}
else
{
if (viewport.getNestedChildren().length > 0)
{
return null;
}
}
}
// gets the hidden/highlighted items from the text box in the config
String configItems = config.getHiddenItems().toLowerCase();
List<String> hiddenItems = Arrays.asList(configItems.split(DELIMITER_REGEX));
@@ -141,7 +117,7 @@ public class GroundItemsOverlay extends Overlay
FontMetrics fm = graphics.getFontMetrics();
Player player = client.getLocalPlayer();
if (player == null)
if (player == null || client.getViewportWidget() == null)
{
return null;
}
@@ -228,7 +204,7 @@ public class GroundItemsOverlay extends Overlay
{
Point point = itemLayer.getCanvasLocation(itemLayer.getHeight());
// if the item is offscreen, don't bother drawing it
if (point == null || (viewport != null && !viewport.contains(point)))
if (point == null)
{
continue;
}