Skip to content

Commit

Permalink
updated Runecrafting plugin with additional logic and change location…
Browse files Browse the repository at this point in the history
… of text
  • Loading branch information
Noremac201 authored and Adam- committed May 7, 2017
1 parent 50b7ff2 commit 15bf3ee
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/
package net.runelite.client.plugins.runecraft;

import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.*;

import net.runelite.api.Client;
import net.runelite.api.ItemID;
import net.runelite.api.Point;
Expand All @@ -50,7 +50,8 @@ public RunecraftOverlay()
public Dimension render(Graphics2D graphics)
{
Widget inventoryWidget = client.getWidget(WidgetInfo.INVENTORY);
if (inventoryWidget == null)

if (inventoryWidget == null || inventoryWidget.isHidden())
{
return null;
}
Expand Down Expand Up @@ -78,15 +79,12 @@ public Dimension render(Graphics2D graphics)
}

Point location = item.getCanvasLocation();
if (location == null)
if (location != null)
{
continue;
int value = client.getSetting(varbits);
graphics.drawString("" + value, location.getX(), location.getY() + graphics.getFontMetrics().getHeight());
}

int value = client.getSetting(varbits);
graphics.drawString("" + value, location.getX(), location.getY());
}

return null;
}

Expand Down

0 comments on commit 15bf3ee

Please sign in to comment.