Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.cottonlesergal.nubot.app;
- import animatefx.animation.FadeIn;
- import com.cottonlesergal.nubot.bot.BotRunner;
- import com.cottonlesergal.nubot.main.modules.DebugPrinter;
- import javafx.application.Application;
- import javafx.fxml.FXMLLoader;
- import javafx.scene.Parent;
- import javafx.scene.Scene;
- import javafx.scene.image.Image;
- import javafx.scene.paint.Color;
- import javafx.scene.text.Font;
- import javafx.stage.Stage;
- import javafx.stage.StageStyle;
- import java.net.InetAddress;
- public class NuBotAppRunner extends Application {
- @Override
- public void start(Stage stage) throws Exception{
- DebugPrinter debug = new DebugPrinter();
- FXMLLoader loader = new FXMLLoader();
- loader.setLocation(getClass().getResource("/scenes/Menu.fxml"));
- Parent root = loader.load();
- stage.initStyle(StageStyle.TRANSPARENT);
- Scene scene = new Scene(root);
- scene.setFill(Color.TRANSPARENT);
- stage.setScene(scene);
- stage.setTitle("NuBot");
- stage.show();
- stage.getIcons().add(new Image(this.getClass().getResourceAsStream("/media/images/logos/whiterivfurlogo.png")));
- scene.getStylesheets().add(getClass().getResource("/media/files/css/app.css").toExternalForm());
- Font.loadFont(
- NuBotAppRunner.class.getResource("/media/files/fonts/UniSansDemoHeavyCAPS.otf").toExternalForm(),
- 10
- );
- stage.show();
- debug.println("Host Name: " + InetAddress.getLocalHost().toString().split("/")[0]);
- debug.println("Host Address: " + InetAddress.getLocalHost().toString().split("/")[1]);
- new FadeIn(root).play();
- }
- public static void main(String[] args) {
- new BotRunner();
- launch(args);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement