Check if infobox can render in InfoBoxOverlay
Infoboxes have property render that needs to be checked in InfoBoxOverlay. Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -89,15 +89,20 @@ public class InfoBoxOverlay extends Overlay
|
||||
: PanelComponent.Orientation.HORIZONTAL);
|
||||
panelComponent.setPreferredSize(new Dimension(config.infoBoxSize(), config.infoBoxSize()));
|
||||
|
||||
infoBoxes.forEach(box ->
|
||||
for (InfoBox box : infoBoxes)
|
||||
{
|
||||
if (!box.render())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
final InfoBoxComponent infoBoxComponent = new InfoBoxComponent();
|
||||
infoBoxComponent.setColor(box.getTextColor());
|
||||
infoBoxComponent.setImage(box.getScaledImage());
|
||||
infoBoxComponent.setText(box.getText());
|
||||
infoBoxComponent.setTooltip(box.getTooltip());
|
||||
panelComponent.getChildren().add(infoBoxComponent);
|
||||
});
|
||||
}
|
||||
|
||||
final Dimension dimension = panelComponent.render(graphics);
|
||||
final Client client = clientProvider.get();
|
||||
|
||||
Reference in New Issue
Block a user