Added Foundry Points

This commit is contained in:
Robin Davidsson
2022-07-12 00:43:33 +02:00
parent fbd80428b0
commit 4067c1a9e3
4 changed files with 88 additions and 2 deletions

View File

@@ -17,13 +17,15 @@ import java.awt.Graphics2D;
@Singleton
public class FoundryOverlay2D extends OverlayPanel
{
private final EasyGiantsFoundryPlugin plugin;
private final EasyGiantsFoundryState state;
private final EasyGiantsFoundryHelper helper;
private final EasyGiantsFoundryConfig config;
@Inject
private FoundryOverlay2D(EasyGiantsFoundryState state, EasyGiantsFoundryHelper helper, EasyGiantsFoundryConfig config)
private FoundryOverlay2D(EasyGiantsFoundryPlugin plugin, EasyGiantsFoundryState state, EasyGiantsFoundryHelper helper, EasyGiantsFoundryConfig config)
{
this.plugin = plugin;
this.state = state;
this.helper = helper;
this.config = config;
@@ -89,6 +91,14 @@ public class FoundryOverlay2D extends OverlayPanel
);
}
int points = plugin.getShopPoints();
if (config.drawShopPoints())
{
panelComponent.getChildren().add(
LineComponent.builder().left("Points").right(points + "").build()
);
}
return super.render(graphics);
}
}