allow setting whether status is included in length
This commit is contained in:
parent
f3dfd97030
commit
c024ac10b7
1 changed files with 5 additions and 1 deletions
|
@ -69,6 +69,10 @@ public class HUD extends Feature {
|
|||
Left, Center, Right
|
||||
}
|
||||
|
||||
@Config("Include status in length")
|
||||
@Description("By default, status (greyed out information tucked on the end of module names) is not factored into the sorting. This setting lets you change that.")
|
||||
public boolean includeStatus = false;
|
||||
|
||||
@Config("Notifications")
|
||||
@Marker(1)
|
||||
@Gate(Integer.MIN_VALUE)
|
||||
|
@ -132,7 +136,7 @@ public class HUD extends Feature {
|
|||
|
||||
mc.fontRenderer.drawStringWithShadow("§lBaseBand§r - \"" + BaseBand.buildString + "\"", 2,2, BaseBand.getFeature(Client.class).getTheme().getGreenColor());
|
||||
int y = 11;
|
||||
for (Feature f : Arrays.stream(features).filter(m -> m.enabled && m.category != Category.COMMAND && m.getClass() != Client.class && m != this).sorted(Comparator.comparingDouble(value -> -Minecraft.getMinecraft().fontRenderer.getStringWidth(value.toString()))).toArray(Feature[]::new)) {
|
||||
for (Feature f : Arrays.stream(features).filter(m -> m.enabled && m.category != Category.COMMAND && m.getClass() != Client.class && m != this).sorted(Comparator.comparingDouble(value -> -Minecraft.getMinecraft().fontRenderer.getStringWidth(includeStatus ? value.text : value.toString()))).toArray(Feature[]::new)) {
|
||||
mc.fontRenderer.drawStringWithShadow(f.text, 2, y, BaseBand.getFeature(Client.class).getTheme().getGreenColor());
|
||||
y = y + mc.fontRenderer.FONT_HEIGHT;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue