Search in sources :

Example 6 with PanelComponent

use of net.runelite.client.ui.overlay.components.PanelComponent in project runelite by runelite.

the class LocationOverlay method render.

@Override
public Dimension render(Graphics2D graphics) {
    if (!plugin.isToggleLocation()) {
        return null;
    }
    panelComponent = new PanelComponent();
    WorldPoint localWorld = client.getLocalPlayer().getWorldLocation();
    panelComponent.getLines().add(new PanelComponent.Line("Tile", localWorld.getX() + ", " + localWorld.getY() + ", " + client.getPlane()));
    for (int i = 0; i < client.getMapRegions().length; i++) {
        int region = client.getMapRegions()[i];
        panelComponent.getLines().add(new PanelComponent.Line((i == 0) ? "Map region" : " ", String.valueOf(region)));
    }
    return panelComponent.render(graphics);
}
Also used : WorldPoint(net.runelite.api.coords.WorldPoint) PanelComponent(net.runelite.client.ui.overlay.components.PanelComponent) WorldPoint(net.runelite.api.coords.WorldPoint)

Aggregations

PanelComponent (net.runelite.client.ui.overlay.components.PanelComponent)6 ObjectComposition (net.runelite.api.ObjectComposition)2 WorldPoint (net.runelite.api.coords.WorldPoint)2 Color (java.awt.Color)1 DecimalFormat (java.text.DecimalFormat)1 Instant (java.time.Instant)1 ItemComposition (net.runelite.api.ItemComposition)1 Point (net.runelite.api.Point)1 Skill (net.runelite.api.Skill)1 LocalPoint (net.runelite.api.coords.LocalPoint)1 ProgressBarComponent (net.runelite.client.ui.overlay.components.ProgressBarComponent)1