Show ground items under widgets and with interfaces open
This commit is contained in:
@@ -105,30 +105,6 @@ public class GroundItemsOverlay extends Overlay
|
|||||||
return null;
|
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
|
// gets the hidden/highlighted items from the text box in the config
|
||||||
String configItems = config.getHiddenItems().toLowerCase();
|
String configItems = config.getHiddenItems().toLowerCase();
|
||||||
List<String> hiddenItems = Arrays.asList(configItems.split(DELIMITER_REGEX));
|
List<String> hiddenItems = Arrays.asList(configItems.split(DELIMITER_REGEX));
|
||||||
@@ -141,7 +117,7 @@ public class GroundItemsOverlay extends Overlay
|
|||||||
FontMetrics fm = graphics.getFontMetrics();
|
FontMetrics fm = graphics.getFontMetrics();
|
||||||
|
|
||||||
Player player = client.getLocalPlayer();
|
Player player = client.getLocalPlayer();
|
||||||
if (player == null)
|
if (player == null || client.getViewportWidget() == null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -228,7 +204,7 @@ public class GroundItemsOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
Point point = itemLayer.getCanvasLocation(itemLayer.getHeight());
|
Point point = itemLayer.getCanvasLocation(itemLayer.getHeight());
|
||||||
// if the item is offscreen, don't bother drawing it
|
// if the item is offscreen, don't bother drawing it
|
||||||
if (point == null || (viewport != null && !viewport.contains(point)))
|
if (point == null)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user