Merge pull request #92 from Spedwards/feature/level-markers

Feature/level markers
This commit is contained in:
Ganom
2019-04-24 20:41:18 -04:00
committed by GitHub
3 changed files with 21 additions and 1 deletions

View File

@@ -225,6 +225,7 @@ class XpInfoBox extends JPanel
}
progressBar.setPositions(positions);
progressBar.setPositionWidth(xpTrackerConfig.levelMarkerWidth());
}
else
{

View File

@@ -27,6 +27,7 @@ package net.runelite.client.plugins.xptracker;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.Range;
@ConfigGroup("xpTracker")
public interface XpTrackerConfig extends Config
@@ -64,8 +65,23 @@ public interface XpTrackerConfig extends Config
return false;
}
@Range(
min = 1,
max = 5
)
@ConfigItem(
position = 3,
keyName = "levelMarkerWidth",
name = "Level marker width",
description = "Alters the width of the intermediate level markers"
)
default int levelMarkerWidth()
{
return 1;
}
@ConfigItem(
position = 4,
keyName = "pauseSkillAfter",
name = "Auto pause after",
description = "Configures how many minutes passes before pausing a skill while in game and there's no XP, 0 means disabled"

View File

@@ -51,6 +51,9 @@ public class ProgressBar extends DimmableJPanel
@Setter
private List<Integer> positions = Collections.emptyList();
@Setter
private int positionWidth = 1;
private final JLabel leftLabel = new JShadowedLabel();
private final JLabel rightLabel = new JShadowedLabel();
private final JLabel centerLabel = new JShadowedLabel();
@@ -100,7 +103,7 @@ public class ProgressBar extends DimmableJPanel
final int xCord = getSize().width * position / maximumValue;
if (xCord > topWidth)
{
g.fillRect(xCord, 0, 1, 16);
g.fillRect(xCord, 0, positionWidth, 16);
}
}