Added: jar

This commit is contained in:
rubenpirreram
2026-05-18 15:19:54 +02:00
parent 8e943608a2
commit 295a021fbf
5 changed files with 274 additions and 19 deletions
@@ -2,23 +2,23 @@ package it.polimi.ingsw.gc14;
import it.polimi.ingsw.gc14.Controller.ClientController;
import it.polimi.ingsw.gc14.View.GUI.GUI;
import it.polimi.ingsw.gc14.View.IView;
import javafx.application.Application;
import javafx.stage.Stage;
import static javafx.application.Application.launch;
public class ClientLauncherGUI extends Application {
@Override
public void start(Stage stage) throws Exception {
GUI view = new GUI(stage);
ClientController controller = new ClientController(view);
view.setController(controller);
view.start(stage);
}
public class ClientLauncherGUI {
public static void main(String[] args) {
launch();
System.setProperty("glass.win.uiScale", "1.0");
Application.launch(GUIApp.class, args);
}
public static class GUIApp extends Application {
@Override
public void start(Stage stage) throws Exception {
GUI view = new GUI(stage);
ClientController controller = new ClientController(view);
view.setController(controller);
view.start(stage);
}
}
}
@@ -155,7 +155,7 @@ public class MainFXMLController {
// ==== ELEMENTS ====
private StackPane createOrder(String num) {
ImageView img = new ImageView(loadImage("/GUIImages/Orders/order-" + num + ".png"));
img.setFitHeight(240);
img.fitHeightProperty().bind(board.heightProperty().add(-15));
img.setPreserveRatio(true);
addClip(img);
return new StackPane(img);
@@ -171,10 +171,10 @@ 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(70);
totem.setFitHeight(68);
totem.setPreserveRatio(true);
StackPane.setAlignment(totem, Pos.TOP_LEFT);
StackPane.setMargin(totem, new Insets(8, 0, 0, 57));
StackPane.setMargin(totem, new Insets(0, 0, 0, 46));
wrapper.getChildren().add(totem);
}
@@ -433,7 +433,7 @@ public class MainFXMLController {
default -> "/GUIImages/Backs/back-001.png";
};
ImageView back = new ImageView(loadImage(path));
back.setFitHeight(240);
back.fitHeightProperty().bind(board.heightProperty().add(-15));
back.setPreserveRatio(true);
addClip(back);
addShadow(back);
@@ -447,7 +447,7 @@ public class MainFXMLController {
VBox overlay = new VBox(-20);
overlay.setPickOnBounds(false);
StackPane.setAlignment(overlay, Pos.TOP_LEFT);
StackPane.setMargin(overlay, new Insets(9, 0, 0, 57));
StackPane.setMargin(overlay, new Insets(9, 0, 0, 46));
for (OrderPlayer player : controller.miniModel.orderLogicCard.playerList) {
ImageView totem = new ImageView(loadImage("/GUIImages/Totems/totem_" + player.player.totem.toString().toLowerCase(Locale.ROOT) + ".png"));