Fix:"Dynamic dimension board line"-> now height can be fissed at any value. Order playerList fixed , now pushNoEffect doesn't clear playerList
This commit is contained in:
@@ -192,10 +192,13 @@ public class MainFXMLController {
|
||||
Player player = controller.miniModel.slotPlayerMap.get(slot);
|
||||
if (player != null && controller.miniModel.getPositionByUsername(player.getUserName()) != -1) {
|
||||
ImageView totem = new ImageView(loadImage("/GUIImages/Totems/totem_" + player.totem.toString().toLowerCase(Locale.ROOT) + ".png"));
|
||||
totem.setFitHeight(68);
|
||||
totem.fitHeightProperty().bind(img.fitHeightProperty().multiply(0.332));
|
||||
totem.setPreserveRatio(true);
|
||||
StackPane.setAlignment(totem, Pos.TOP_LEFT);
|
||||
StackPane.setMargin(totem, new Insets(0, 0, 0, 46));
|
||||
StackPane.setMargin(totem, new Insets(0, 0, 0, 0.224 * img.getFitHeight()));
|
||||
img.fitHeightProperty().addListener((obs, ov, nv) -> {
|
||||
StackPane.setMargin(totem, new Insets(0, 0, 0, 0.224 * nv.doubleValue()));
|
||||
});
|
||||
wrapper.getChildren().add(totem);
|
||||
}
|
||||
|
||||
@@ -498,14 +501,21 @@ public class MainFXMLController {
|
||||
final double yRatio = positions[i];
|
||||
overlay.prefHeightProperty().bind(card.heightProperty());
|
||||
overlay.prefWidthProperty().bind(card.widthProperty());
|
||||
|
||||
// posizione X fissa, Y proporzionale
|
||||
rect.setX(41);
|
||||
card.heightProperty().addListener((obs, ov, nv) -> {
|
||||
rect.setY(nv.doubleValue() * yRatio);
|
||||
rect.setHeight(0.127*nv.doubleValue());
|
||||
});
|
||||
if (card.getHeight() > 0) {
|
||||
card.widthProperty().addListener((obs, ov, nv) -> {
|
||||
rect.setX(nv.doubleValue() * 0.323);
|
||||
rect.setWidth(0.375*nv.doubleValue());
|
||||
});
|
||||
if (card.getHeight() > 0 && card.getWidth() > 0) {
|
||||
rect.setY(card.getHeight() * yRatio);
|
||||
rect.setHeight(0.127*yRatio);
|
||||
|
||||
rect.setX(card.getHeight() * 0.323);
|
||||
rect.setWidth(0.375*card.getHeight());
|
||||
}
|
||||
|
||||
overlay.getChildren().add(rect);
|
||||
|
||||
Reference in New Issue
Block a user