added the penguin SELF MADE

This commit is contained in:
Aysegul Aydinlik 2026-01-15 16:05:29 +01:00
commit ddd81814e5
4 changed files with 21 additions and 0 deletions

View file

@ -5,16 +5,26 @@ import client.scenes.MainCtrl;
import client.utils.ServerUtils;
import com.google.inject.Injector;
import javafx.application.Application;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import static com.google.inject.Guice.createInjector;
public class UI extends Application {
private static final Injector INJECTOR = createInjector(new MyModule());
private static final MyFXML FXML = new MyFXML(INJECTOR);
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.getIcons().add(
new Image(getClass().getResourceAsStream("/Penguin.png"))
);
var serverUtils = INJECTOR.getInstance(ServerUtils.class);
if (!serverUtils.isServerAvailable()) {
var msg = "Server needs to be started before the client, but it does not seem to be available. Shutting down.";

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -15,6 +15,9 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.control.ToggleButton?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.control.ComboBox?>
<BorderPane prefHeight="800.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/25" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.scenes.FoodpalApplicationCtrl">
@ -25,6 +28,14 @@
<padding>
<Insets bottom="10" left="10" right="10" top="10" />
</padding>
<ImageView fitWidth="80" fitHeight="80" preserveRatio="true">
<image>
<Image url="@/Penguina.png"/>
</image>
</ImageView>
<Label prefHeight="56.0" prefWidth="158.0" text="FoodPal">
<font>
<Font name="System Bold" size="29.0" />