boosts: cleanup
This commit is contained in:
@@ -32,7 +32,7 @@ import net.runelite.api.Skill;
|
||||
import net.runelite.client.ui.overlay.infobox.InfoBox;
|
||||
import net.runelite.client.ui.overlay.infobox.InfoBoxPriority;
|
||||
|
||||
public class BoostIndicator extends InfoBox
|
||||
class BoostIndicator extends InfoBox
|
||||
{
|
||||
private final BoostsPlugin plugin;
|
||||
private final BoostsConfig config;
|
||||
@@ -87,7 +87,7 @@ public class BoostIndicator extends InfoBox
|
||||
@Override
|
||||
public boolean render()
|
||||
{
|
||||
return config.displayInfoboxes() && plugin.canShowBoosts() && plugin.getSkillsToDisplay().contains(getSkill());
|
||||
return plugin.canShowBoosts() && plugin.getSkillsToDisplay().contains(getSkill()) && config.displayInfoboxes();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -61,13 +61,13 @@ class BoostsOverlay extends OverlayPanel
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
if (config.displayInfoboxes())
|
||||
final Set<Skill> boostedSkills = plugin.getSkillsToDisplay();
|
||||
if (boostedSkills.isEmpty() || !config.displayPanel())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
int nextChange = plugin.getChangeDownTicks();
|
||||
|
||||
if (nextChange != -1)
|
||||
{
|
||||
panelComponent.getChildren().add(LineComponent.builder()
|
||||
@@ -77,7 +77,6 @@ class BoostsOverlay extends OverlayPanel
|
||||
}
|
||||
|
||||
nextChange = plugin.getChangeUpTicks();
|
||||
|
||||
if (nextChange != -1)
|
||||
{
|
||||
panelComponent.getChildren().add(LineComponent.builder()
|
||||
@@ -86,13 +85,6 @@ class BoostsOverlay extends OverlayPanel
|
||||
.build());
|
||||
}
|
||||
|
||||
final Set<Skill> boostedSkills = plugin.getSkillsToDisplay();
|
||||
|
||||
if (boostedSkills.isEmpty())
|
||||
{
|
||||
return super.render(graphics);
|
||||
}
|
||||
|
||||
if (plugin.canShowBoosts())
|
||||
{
|
||||
for (Skill skill : boostedSkills)
|
||||
@@ -136,6 +128,5 @@ class BoostsOverlay extends OverlayPanel
|
||||
}
|
||||
|
||||
return boost <= config.boostThreshold() ? Color.YELLOW : Color.GREEN;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.awt.image.BufferedImage;
|
||||
import net.runelite.client.ui.overlay.infobox.InfoBox;
|
||||
import net.runelite.client.ui.overlay.infobox.InfoBoxPriority;
|
||||
|
||||
public class StatChangeIndicator extends InfoBox
|
||||
class StatChangeIndicator extends InfoBox
|
||||
{
|
||||
private final boolean up;
|
||||
private final BoostsPlugin plugin;
|
||||
@@ -61,6 +61,6 @@ public class StatChangeIndicator extends InfoBox
|
||||
public boolean render()
|
||||
{
|
||||
final int time = up ? plugin.getChangeUpTicks() : plugin.getChangeDownTicks();
|
||||
return config.displayInfoboxes() && time != -1;
|
||||
return time != -1 && config.displayInfoboxes();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user