Add: Lobby UI

This commit is contained in:
Jona Walpert
2026-03-11 15:16:31 +01:00
parent a7e43619f8
commit a5204eaf29
9 changed files with 13 additions and 12 deletions
@@ -1,5 +1,5 @@
package ch.unibas.dmi.dbis.cs108.casono.client;
import ch.unibas.dmi.dbis.cs108.casono.client.ui.Launcher;
public class ClientApp {
public static void start(String arg) {
String[] parts = arg.split(":", 2);
@@ -10,5 +10,6 @@ public class ClientApp {
int port = Integer.parseInt(parts[1]);
System.out.println("You've selected the client. It will connect port " + port + " at host " + host);
Launcher.main(new String[]{});
}
}
@@ -4,7 +4,7 @@ import javafx.application.Application;
public class Launcher {
public static void main(String[] args) {
Application.launch(ch.unibas.dmi.dbis.cs108.casono.client.ui.lobby.Casinomainui.class, args);
Application.launch(ch.unibas.dmi.dbis.cs108.casono.client.ui.lobbyui.Casinomainui.class, args);
}
}
@@ -1,4 +1,4 @@
package ch.unibas.dmi.dbis.cs108.casono.client.ui.lobby;
package ch.unibas.dmi.dbis.cs108.casono.client.ui.lobbyui;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
@@ -10,11 +10,11 @@ import java.io.IOException;
public class Casinomainui extends Application {
@Override
public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("Casinomainui.fxml"));
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/ui-structure/Casinomainui.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 1200, 800);
stage.setTitle("Casono");
stage.getIcons().add(new javafx.scene.image.Image(getClass().getResource("/ch/unibas/dmi/dbis/cs108/casono/client/ui/resources/logoinverted.png").toExternalForm()));
stage.getIcons().add(new javafx.scene.image.Image(getClass().getResource("/images/logoinverted.png").toExternalForm()));
stage.setScene(scene);
stage.setFullScreen(true);
stage.show();
@@ -1,4 +1,4 @@
package ch.unibas.dmi.dbis.cs108.casono.client.ui.lobby;
package ch.unibas.dmi.dbis.cs108.casono.client.ui.lobbyui;
import javafx.application.Platform;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
@@ -37,7 +37,7 @@ public class CasinomainuiController {
titleLabel.setText("Casono");
subtitleLabel.setText("Texas Hold'em Poker");
// Logo laden
logoView.setImage(new javafx.scene.image.Image(getClass().getResource("/ch/unibas/dmi/dbis/cs108/casono/client/ui/resources/images/logo.png").toExternalForm()));
logoView.setImage(new javafx.scene.image.Image(getClass().getResource("/images/logo.png").toExternalForm()));
}
@FXML

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Before

Width:  |  Height:  |  Size: 194 KiB

After

Width:  |  Height:  |  Size: 194 KiB

@@ -7,7 +7,7 @@
.anchor-pane-bg {
-fx-background-color: #ffffff;
/* Optional: Bild entfernen oder als Overlay nutzen */
-fx-background-image: url("images/background.png");
-fx-background-image: url("/images/background.png");
-fx-background-size: cover;
-fx-background-position: center center;
-fx-background-repeat: no-repeat;
@@ -136,9 +136,9 @@
}
.button-exit {
-fx-background-color: #8b0000;
-fx-border-color: #ff4444;
-fx-text-fill: white;
-fx-background-color: #333333;
-fx-border-color: #666666;
-fx-text-fill: #CCCCCC;
-fx-background-radius: 12;
-fx-border-radius: 12;
-fx-font-family: "Courier New";
@@ -6,7 +6,7 @@
<AnchorPane xmlns="http://javafx.com"
xmlns:fx="http://javafx.com"
fx:controller="com.example.demo.CasinomainuiController"
fx:controller="ch.unibas.dmi.dbis.cs108.casono.client.ui.lobbyui.CasinomainuiController"
styleClass="anchor-pane-bg"
stylesheets="@Casinomainui.css">