Add bonus action tracker

This commit is contained in:
geeckon
2024-02-10 23:44:37 +02:00
parent b08dab0192
commit 64d3c5c121
4 changed files with 48 additions and 1 deletions

View File

@@ -50,6 +50,16 @@ public class FoundryOverlay2D extends OverlayPanel
return ColorScheme.PROGRESS_ERROR_COLOR;
}
private Color getBonusActionsColor(int received, int expected)
{
if (received >= expected)
{
return ColorScheme.PROGRESS_COMPLETE_COLOR;
}
return ColorScheme.PROGRESS_INPROGRESS_COLOR;
}
@Override
public Dimension render(Graphics2D graphics)
{
@@ -96,6 +106,12 @@ public class FoundryOverlay2D extends OverlayPanel
LineComponent.builder().left("Heat left").right(heatLeft + "").rightColor(getHeatColor(actionsLeft, heatLeft)).build()
);
}
if (config.drawBonusActions())
{
panelComponent.getChildren().add(
LineComponent.builder().left("Bonus actions").right(state.getBonusActionsReceived() + "/" + state.getBonusActionsExpected()).rightColor(getBonusActionsColor(state.getBonusActionsReceived(), state.getBonusActionsExpected())).build()
);
}
}
//
// int points = plugin.getPointsTracker().getShopPoints();