Merge pull request #2578 from ypperlig/fightcavesoverlayfix
Clear previous image components in fight caves overlay
This commit is contained in:
@@ -64,11 +64,15 @@ public class FightCaveOverlay extends Overlay
|
|||||||
public Dimension render(Graphics2D graphics)
|
public Dimension render(Graphics2D graphics)
|
||||||
{
|
{
|
||||||
JadAttack attack = plugin.getAttack();
|
JadAttack attack = plugin.getAttack();
|
||||||
|
|
||||||
if (attack == null)
|
if (attack == null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferedImage prayerImage = getPrayerImage(attack);
|
BufferedImage prayerImage = getPrayerImage(attack);
|
||||||
|
|
||||||
|
imagePanelComponent.getChildren().clear();
|
||||||
imagePanelComponent.getChildren().add(new ImageComponent(prayerImage));
|
imagePanelComponent.getChildren().add(new ImageComponent(prayerImage));
|
||||||
|
|
||||||
if (!client.isPrayerActive(attack.getPrayer()))
|
if (!client.isPrayerActive(attack.getPrayer()))
|
||||||
|
|||||||
Reference in New Issue
Block a user