Lower default width of the PanelComponent

Lower default width of PanelComponent to same as the XP tracker, so 129.
Also, change fishing and woodcutting overlays to draw shorter text to
fit in new overlay panel size.
Update opponent info as well because it is using own implementation of
panel component.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-03-10 13:21:58 +01:00
parent 4e46a7daf4
commit 16dae0f094
4 changed files with 9 additions and 9 deletions

View File

@@ -81,12 +81,12 @@ class FishingOverlay extends Overlay
if (client.getLocalPlayer().getInteracting() != null && client.getLocalPlayer().getInteracting().getName()
.contains(FISHING_SPOT))
{
panelComponent.setTitle("You are fishing");
panelComponent.setTitle("Fishing");
panelComponent.setTitleColor(Color.GREEN);
}
else
{
panelComponent.setTitle("You are NOT fishing");
panelComponent.setTitle("NOT fishing");
panelComponent.setTitleColor(Color.RED);
}

View File

@@ -49,12 +49,12 @@ import net.runelite.client.util.Text;
class OpponentInfoOverlay extends Overlay
{
private static final int WIDTH = 140;
private static final int WIDTH = 129;
private static final int TOP_BORDER = 3;
private static final int BOTTOM_BORDER = 3;
private static final int TOP_BORDER = 4;
private static final int BOTTOM_BORDER = 4;
private static final int BAR_WIDTH = 124;
private static final int BAR_WIDTH = WIDTH - 10;
private static final int BAR_HEIGHT = 16;
private static final Color HP_GREEN = new Color(0, 146, 54, 230);

View File

@@ -95,12 +95,12 @@ class WoodcuttingOverlay extends Overlay
if (IntStream.of(animationIds).anyMatch(x -> x == client.getLocalPlayer().getAnimation()))
{
panelComponent.setTitle("You are woodcutting");
panelComponent.setTitle("Woodcutting");
panelComponent.setTitleColor(Color.GREEN);
}
else
{
panelComponent.setTitle("You are NOT woodcutting");
panelComponent.setTitle("NOT woodcutting");
panelComponent.setTitleColor(Color.RED);
}

View File

@@ -79,7 +79,7 @@ public class PanelComponent implements RenderableEntity
private ProgressBarComponent progressBar;
@Setter
private int width = 140;
private int width = 129;
@Override
public Dimension render(Graphics2D graphics, Point parent)