Advertisement
Guest User

Untitled

a guest
Feb 17th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.92 KB | None | 0 0
  1. package fr.rayzens.launcher;
  2.  
  3.  
  4.  
  5. import fr.trxyy.base.Configuration;
  6. import fr.trxyy.base.Initializer;
  7. import fr.trxyy.gamelaunch.Tweaks;
  8. import fr.trxyy.gamelaunch.Versions;
  9. import fr.trxyy.interfaces.LauncherApp;
  10. import fr.trxyy.interfaces.LauncherBase;
  11. import fr.trxyy.interfaces.components.LauncherBackground;
  12. import fr.trxyy.interfaces.components.LauncherLogo;
  13. import fr.trxyy.interfaces.utils.ResourceLocation;
  14. import javafx.scene.Parent;
  15. import javafx.scene.Scene;
  16. import javafx.scene.layout.Pane;
  17. import javafx.stage.Stage;
  18. import javafx.stage.StageStyle;
  19.  
  20. public class LauncherMain extends LauncherApp {
  21.    
  22.     @SuppressWarnings("unused")
  23.     private LauncherBackground backgroundPanel;
  24.     private ResourceLocation resources;
  25.     @SuppressWarnings("unused")
  26.     private LauncherPanel launcherPanel;
  27.     private LauncherLogo logoPanel;
  28.  
  29.     public static void main(String[] args) {
  30.         Initializer.registerBasics("Elerium Launcher", 880, 550);
  31.         Initializer.registerSpecs("/resources/", "http://dunkradio.000webhostapp.com/", "elerium", Versions.V1_12, Tweaks.FORGE_1_8_HIGHER, true);
  32.         launch(args);
  33.     }
  34.  
  35.  
  36.     @SuppressWarnings("static-access")
  37.     @Override
  38.     public void start(Stage primaryStage) throws Exception {
  39.         Scene scene = new Scene(createContent());
  40.         LauncherBase launcher = new LauncherBase(primaryStage, scene, StageStyle.UNDECORATED, true);
  41.         launcher.setIconImage(primaryStage, resources.loadImage("favicon.png"));
  42.     }
  43.  
  44.  
  45.     @SuppressWarnings("static-access")
  46.     private Parent createContent() {
  47.         Pane root = new Pane();
  48.         root.setPrefSize(Configuration.getWidth(), Configuration.getHeight());
  49.         this.backgroundPanel = new LauncherBackground(this.resources.getMedia("background.mp4"), root);
  50.         this.launcherPanel = new LauncherPanel(root);
  51.         this.logoPanel = new LauncherLogo(this.resources.loadImage("logo.png"), 600, 100, root);
  52.         this.logoPanel.setImagePos(Configuration.getWidth() / 2 - 280, 130);
  53.         return root;
  54.     }
  55.    
  56.  
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement