|
@@ -12,10 +12,12 @@ import javafx.scene.control.ButtonType;
|
|
|
import javafx.scene.input.KeyCode;
|
|
import javafx.scene.input.KeyCode;
|
|
|
import javafx.scene.input.KeyCodeCombination;
|
|
import javafx.scene.input.KeyCodeCombination;
|
|
|
import javafx.scene.input.KeyCombination;
|
|
import javafx.scene.input.KeyCombination;
|
|
|
|
|
+import javafx.scene.text.Font;
|
|
|
import javafx.scene.web.WebView;
|
|
import javafx.scene.web.WebView;
|
|
|
import javafx.stage.Stage;
|
|
import javafx.stage.Stage;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
|
|
+import java.io.InputStream;
|
|
|
import java.util.Objects;
|
|
import java.util.Objects;
|
|
|
import java.util.Optional;
|
|
import java.util.Optional;
|
|
|
|
|
|
|
@@ -57,7 +59,12 @@ public class Session extends Application {
|
|
|
FXMLLoader fxmlLoader = new FXMLLoader(Session.class.getResource("game.fxml"));
|
|
FXMLLoader fxmlLoader = new FXMLLoader(Session.class.getResource("game.fxml"));
|
|
|
Scene scene = new Scene(fxmlLoader.load(), 1280, 720);
|
|
Scene scene = new Scene(fxmlLoader.load(), 1280, 720);
|
|
|
|
|
|
|
|
- String cssPath = Objects.requireNonNull(Session.class.getResource("css/style.css")).toExternalForm();
|
|
|
|
|
|
|
+ try (InputStream fontStream = Session.class.getResourceAsStream("fonts/Iosevka-Slab-01.ttf")) {
|
|
|
|
|
+ Font.loadFont(fontStream, 10);
|
|
|
|
|
+ } catch (IOException _) {
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var cssPath = Objects.requireNonNull(Session.class.getResource("css/style.css")).toExternalForm();
|
|
|
scene.getStylesheets().add(cssPath);
|
|
scene.getStylesheets().add(cssPath);
|
|
|
|
|
|
|
|
stage.setTitle("Schmorn");
|
|
stage.setTitle("Schmorn");
|