use of net.runelite.api.coords.LocalPoint in project runelite by runelite.
the class MapClue method makeWorldOverlayHint.
@Override
public void makeWorldOverlayHint(Graphics2D graphics, ClueScrollPlugin plugin) {
LocalPoint localLocation = LocalPoint.fromWorld(plugin.getClient(), getLocation());
if (localLocation == null) {
return;
}
// Mark game object
if (objectId != -1) {
Region region = plugin.getClient().getRegion();
Tile[][][] tiles = region.getTiles();
Tile tile = tiles[plugin.getClient().getPlane()][localLocation.getRegionX()][localLocation.getRegionY()];
net.runelite.api.Point mousePosition = plugin.getClient().getMouseCanvasPosition();
for (GameObject gameObject : tile.getGameObjects()) {
if (gameObject != null) {
OverlayUtil.renderHoverableArea(graphics, gameObject.getClickbox(), mousePosition, CLICKBOX_FILL_COLOR, CLICKBOX_BORDER_COLOR, CLICKBOX_HOVER_BORDER_COLOR);
OverlayUtil.renderImageLocation(plugin.getClient(), graphics, localLocation, CLUE_SCROLL_IMAGE, IMAGE_Z_OFFSET);
}
}
} else {
OverlayUtil.renderTileOverlay(plugin.getClient(), graphics, localLocation, SPADE_IMAGE, Color.ORANGE);
}
}
use of net.runelite.api.coords.LocalPoint in project runelite by runelite.
the class FairyRingClue method makeWorldOverlayHint.
@Override
public void makeWorldOverlayHint(Graphics2D graphics, ClueScrollPlugin plugin) {
LocalPoint localLocation = LocalPoint.fromWorld(plugin.getClient(), getLocation());
if (localLocation == null) {
return;
}
OverlayUtil.renderTileOverlay(plugin.getClient(), graphics, localLocation, SPADE_IMAGE, Color.ORANGE);
}
use of net.runelite.api.coords.LocalPoint in project runelite by runelite.
the class CoordinateClue method makeWorldOverlayHint.
@Override
public void makeWorldOverlayHint(Graphics2D graphics, ClueScrollPlugin plugin) {
LocalPoint localLocation = LocalPoint.fromWorld(plugin.getClient(), getLocation());
if (localLocation == null) {
return;
}
OverlayUtil.renderTileOverlay(plugin.getClient(), graphics, localLocation, SPADE_IMAGE, Color.ORANGE);
}
use of net.runelite.api.coords.LocalPoint in project runelite by runelite.
the class CrypticClue method makeWorldOverlayHint.
@Override
public void makeWorldOverlayHint(Graphics2D graphics, ClueScrollPlugin plugin) {
// Mark dig location
if (getLocation() != null && getNpc() == null && objectId == -1) {
LocalPoint localLocation = LocalPoint.fromWorld(plugin.getClient(), getLocation());
if (localLocation != null) {
OverlayUtil.renderTileOverlay(plugin.getClient(), graphics, localLocation, SPADE_IMAGE, Color.ORANGE);
}
}
// Mark NPC
if (plugin.getNpcsToMark() != null) {
for (NPC npc : plugin.getNpcsToMark()) {
OverlayUtil.renderActorOverlayImage(graphics, npc, CLUE_SCROLL_IMAGE, Color.ORANGE, IMAGE_Z_OFFSET);
}
}
// Mark game object
if (objectId != -1) {
net.runelite.api.Point mousePosition = plugin.getClient().getMouseCanvasPosition();
if (plugin.getObjectsToMark() != null) {
for (GameObject gameObject : plugin.getObjectsToMark()) {
OverlayUtil.renderHoverableArea(graphics, gameObject.getClickbox(), mousePosition, CLICKBOX_FILL_COLOR, CLICKBOX_BORDER_COLOR, CLICKBOX_HOVER_BORDER_COLOR);
OverlayUtil.renderImageLocation(plugin.getClient(), graphics, gameObject.getLocalLocation(), CLUE_SCROLL_IMAGE, IMAGE_Z_OFFSET);
}
}
}
}
use of net.runelite.api.coords.LocalPoint in project runelite by runelite.
the class DevToolsOverlay method renderProjectiles.
private void renderProjectiles(Graphics2D graphics) {
List<Projectile> projectiles = client.getProjectiles();
for (Projectile projectile : projectiles) {
int originX = projectile.getX1();
int originY = projectile.getY1();
LocalPoint tilePoint = new LocalPoint(originX, originY);
Polygon poly = Perspective.getCanvasTilePoly(client, tilePoint);
if (poly != null) {
OverlayUtil.renderPolygon(graphics, poly, Color.RED);
}
int projectileId = projectile.getId();
Actor projectileInteracting = projectile.getInteracting();
String infoString = "";
if (projectileInteracting == null) {
infoString += "AoE";
} else {
infoString += "Targeted (T: " + projectileInteracting.getName() + ")";
}
infoString += " (ID: " + projectileId + ")";
if (projectileInteracting != null) {
OverlayUtil.renderActorOverlay(graphics, projectile.getInteracting(), infoString, Color.RED);
}
}
}
Aggregations