load elusive icon font at startup
This commit is contained in:
@@ -83,6 +83,17 @@ public class GeoFroggerFX extends Application {
|
||||
private void showUI(Stage primaryStage, String name, String version) {
|
||||
GeoFroggerFXController geoFroggerFXController = appContext.getBean(GeoFroggerFXController.class);
|
||||
Scene scene = new Scene((Parent) geoFroggerFXController.getView());
|
||||
|
||||
scene.setOnKeyPressed(new EventHandler<KeyEvent>() {
|
||||
|
||||
@Override
|
||||
public void handle(KeyEvent event) {
|
||||
if (isScenicViewShortcutPressed(event)) {
|
||||
// ScenicView.show(scene);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.setTitle(String.format("%s %s", name, version));
|
||||
primaryStage.show();
|
||||
@@ -90,5 +101,10 @@ public class GeoFroggerFX extends Application {
|
||||
|
||||
private void loadCustomFonts() {
|
||||
Font.loadFont(GeoFroggerFX.class.getResource("/fonts/sofia/Sofia-Regular.otf").toExternalForm(), 24);
|
||||
Font.loadFont(GeoFroggerFX.class.getResource("/fonts/elusive/Elusive-Icons.ttf").toExternalForm(), 10);
|
||||
}
|
||||
|
||||
private static boolean isScenicViewShortcutPressed(final KeyEvent keyEvent) {
|
||||
return keyEvent.isAltDown() && keyEvent.isControlDown() && keyEvent.getCode().equals(KeyCode.V);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ package de.geofroggerfx.ui;
|
||||
|
||||
import de.geofroggerfx.model.Attribute;
|
||||
import de.geofroggerfx.model.Type;
|
||||
import de.geofroggerfx.ui.glyphs.ElusiveIcons;
|
||||
import de.jensd.fx.glyphs.GlyphIcon;
|
||||
import de.jensd.fx.glyphs.GlyphIcons;
|
||||
import de.jensd.fx.glyphs.fontawesome.FontAwesomeIcons;
|
||||
|
||||
@@ -8,7 +8,4 @@ import javafx.scene.text.Font;
|
||||
*/
|
||||
public class GeofroggerGlyphsDude extends GlyphsDude {
|
||||
|
||||
static {
|
||||
Font.loadFont(GeofroggerGlyphsDude.class.getResource(ElusiveIcon.TTF_PATH).toExternalForm(), 10.0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user