Style: Lobby UI input field #270

Merged
j.kropff merged 3 commits from feat/lobby-ui-input-field-style into main 2026-04-12 09:18:44 +02:00
2 changed files with 115 additions and 26 deletions
+104 -18
View File
@@ -1,4 +1,3 @@
/* Pixel-Art Font (WICHTIG: Nutze eine Monospace-Schrift für Pixel-Look) */
.root {
-fx-background-color: #000000;
-fx-font-family: "Monospaced", "Courier New";
@@ -6,23 +5,23 @@
.anchor-pane-bg {
-fx-background-color: #ffffff;
/* Optional: Bild entfernen oder als Overlay nutzen */
/* Optional: Remove the image or use it as an overlay */
-fx-background-image: url("/images/background.png");
-fx-background-size: cover;
-fx-background-position: center center;
-fx-background-repeat: no-repeat;
}
/* DIE SCHWEBENDE INFO-BOX (PIXEL-STYLE) */
/* THE FLOATING INFO BOX */
.floating-chat-box {
-fx-background-color: #0d9e3b;
/* Pixel-Ränder: Keine Rundung (0px) oder nur sehr kleine Stufen */
/* Pixel edges: No rounding (0px) or only very slight steps */
-fx-background-radius: 58;
-fx-border-radius: 50;
-fx-border-color: #5c3d10 #3d260a #3d260a #5c3d10;
-fx-border-width: 12;
-fx-padding: 20;
/* Harter Schatten statt weicher Glow */
/* Hard shadows instead of a soft glow */
-fx-effect: dropshadow(one-pass-box, rgba(0,0,0,1), 0, 0, 15, 15);
}
@@ -38,20 +37,19 @@
-fx-font-size: 16px;
}
/* DER OVALE PIXEL-TISCH */
/* THE OVAL PIXEL TABLE */
.casino-table {
-fx-background-color: #0d9e3b; /* Feste Farbe statt Gradient für Pixel-Look */
/* Oval durch festen Radius - Pixel-Art-Ovale sind stufig */
-fx-background-color: #0d9e3b; /* Solid color instead of a gradient for a pixelated look */
/* Oval with a fixed radius - Pixel art ovals are jagged */
-fx-background-radius: 2000;
-fx-border-radius: 2000;
/* Dicker, eckiger Holzrand */
/* Thick, square wooden edge */
-fx-border-color: #5c3d10 #3d260a #3d260a #5c3d10;
-fx-border-width: 12;
}
.table-title {
-fx-text-fill: #ffffff;
-fx-font-size: 28px;
@@ -59,10 +57,98 @@
-fx-effect: dropshadow(one-pass-box, #000, 0, 0, 3, 3);
}
.black-input-field {
-fx-background-color: #1a1a1a;
-fx-text-fill: #ffffff;
-fx-font-family: "Courier New";
-fx-font-weight: bold;
-fx-background-radius: 8;
-fx-border-radius: 8;
-fx-border-color: #444444;
-fx-border-width: 2;
-fx-padding: 5 12;
}
.black-input-field:hover {
-fx-translate-y: -3;
-fx-effect: dropshadow(one-pass-box, rgba(0, 0, 0, 0.8), 0, 0, 3, 3);
}
.black-input-field:focused {
-fx-border-color: #ffffff;
-fx-background-color: #000000;
}
/* Hauptcontainer der Statusbox */
.gray-input-field {
-fx-background-color: #333333;
-fx-text-fill: #ffffff;
-fx-font-family: "Courier New";
-fx-font-weight: bold;
-fx-background-radius: 8;
-fx-border-radius: 8;
-fx-border-color: #666666;
-fx-color-color: #cccccc;
-fx-border-width: 2;
-fx-padding: 5 12;
}
.gray-input-field:hover {
-fx-translate-y: -3;
-fx-effect: dropshadow(one-pass-box, rgba(0, 0, 0, 0.8), 0, 0, 3, 3);
}
.gray-input-field:focused {
-fx-border-color: #ffffff;
-fx-background-color: #333333;
}
.yellow-input-field {
-fx-background-color: #b8860b;
-fx-text-fill: #ffffff;
-fx-prompt-text-fill: #ffffff;
-fx-font-family: "Courier New";
-fx-font-weight: bold;
-fx-background-radius: 8;
-fx-border-radius: 8;
-fx-border-color: #ffd700;
-fx-border-width: 2;
-fx-padding: 5 12;
}
.yellow-input-field:hover {
-fx-translate-y: -3;
-fx-effect: dropshadow(one-pass-box, rgba(0, 0, 0, 0.8), 0, 0, 3, 3);
}
.yellow-input-field:focused {
-fx-border-color: #ffffff;
-fx-background-color: #b8860b;
}
.red-input-field {
-fx-background-color: #8b0000;
-fx-text-fill: #ffffff;
-fx-prompt-text-fill: #ffffff;
-fx-font-family: "Courier New";
-fx-font-weight: bold;
-fx-background-radius: 8;
-fx-border-radius: 8;
-fx-border-color: #ff4444;
-fx-border-width: 2;
-fx-padding: 5 12;
}
.red-input-field:hover {
-fx-translate-y: -3;
-fx-effect: dropshadow(one-pass-box, rgba(0, 0, 0, 0.8), 0, 0, 3, 3);
}
.red-input-field:focused {
-fx-border-color: #ffffff;
-fx-background-color: #8b0000;
}
/* MAIN CONTAINER OF THE STATUS BOX */
.player-status-pane {
-fx-background-color: rgb(129, 13, 158);
-fx-background-radius: 15;
@@ -77,7 +163,7 @@
-fx-translate-y: -3;
}
/* Die zwei inneren Boxen */
/* THE TWO INNER BOXES */
.status-inner-box-top {
-fx-background-color: rgb(13, 93, 158);
-fx-background-radius: 19;
@@ -103,16 +189,16 @@
}
.table-title {
/* Titel-Text anpassen */
/* Customize the title text */
-fx-text-fill: #ffffff;
-fx-font-size: 32px;
-fx-font-weight: bold;
-fx-effect: dropshadow(one-pass-box, #000, 0, 0, 3, 3);
-fx-padding: 10 0 0 0; /* Abstand nach oben */
-fx-padding: 10 0 0 0; /* Space above */
}
.green-box {
/* Grüne Box anpassen */
/* Customize the green box */
-fx-fill: #4CAF50;
-fx-stroke: #FFFFFF;
-fx-stroke-width: 3;
@@ -133,12 +219,13 @@
-fx-border-color: #666666;
-fx-text-fill: #CCCCCC;
}
.button-exit:hover {
-fx-translate-y: -3;
-fx-effect: dropshadow(one-pass-box, rgba(0, 0, 0, 0.8), 0, 0, 3, 3);
}
/* LOBBY ERSTELLEN BUTTON */
/* CREATE LOBBY BUTTON */
.button-create-lobby {
-fx-background-radius: 12;
-fx-border-radius: 12;
@@ -151,10 +238,9 @@
-fx-border-color: #2ecc71;
-fx-text-fill: #ffffff;
}
.button-create-lobby:hover {
-fx-translate-y: -3;
-fx-effect: dropshadow(one-pass-box, rgba(0, 0, 0, 0.8), 0, 0, 3, 3);
-fx-background-color: #27ae60;
}
@@ -12,9 +12,9 @@
<GridPane prefWidth="1200" prefHeight="800" AnchorPane.topAnchor="0" AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0" AnchorPane.rightAnchor="0">
<columnConstraints>
<!-- Tisch bekommt 75% vom Fenster -->
<!-- The table takes up 70% of the window -->
<ColumnConstraints percentWidth="70.0" hgrow="ALWAYS" />
<!-- Info-Box bekommt 25% vom Fenster inkl. 5 prozent buffer -->
<!-- The info box takes up 25% of the window, including a 5% buffer -->
<ColumnConstraints percentWidth="5.0" hgrow="ALWAYS" />
<ColumnConstraints percentWidth="25.0" hgrow="ALWAYS" />
</columnConstraints>
@@ -24,7 +24,7 @@
</rowConstraints>
<children>
<!-- LINKER BEREICH (Tisch) -->
<!-- LEFT SIDE (Table) -->
<GridPane GridPane.columnIndex="0" style="-fx-background-color: transparent;" alignment="CENTER">
<rowConstraints>
<RowConstraints percentHeight="25.0" vgrow="ALWAYS" />
@@ -68,7 +68,7 @@
<Insets top="20" left="20" />
</GridPane.margin>
</Button>
<Button text="Lobby erstellen"
<Button text="CREATE A LOBBY"
styleClass="button-create-lobby"
fx:id="createLobbyButton"
onAction="#handleCreateLobbyButton"
@@ -88,10 +88,13 @@
GridPane.halignment="LEFT"
GridPane.valignment="TOP">
<GridPane.margin>
<!-- place below the 'Lobby erstellen' button -->
<!-- place below the 'CREATE A LOBBY' button -->
<Insets top="100" left="20" />
</GridPane.margin>
<TextField fx:id="usernameField" promptText="Benutzername" maxWidth="180" />
<TextField fx:id="usernameField"
promptText="Username"
styleClass="gray-input-field"
maxWidth="180" />
<Button text="Login"
fx:id="loginButton"
onAction="#handleLoginButton"
@@ -119,10 +122,10 @@
alignment="CENTER"
minWidth="100"
minHeight="100">
<!-- Bleibt leer -->
<!-- Remains empty -->
</VBox>
<!-- RECHTER BEREICH (Info-Box) -->
<!-- RIGHT SIDE (Chat Box) -->
<fx:include source="components/chatui/chatbox.fxml" GridPane.columnIndex="2"/>
</children>
</GridPane>