Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fr.rayzens.launcher;
- import fr.trxyy.base.Configuration;
- import fr.trxyy.base.Initializer;
- import fr.trxyy.gamelaunch.Tweaks;
- import fr.trxyy.gamelaunch.Versions;
- import fr.trxyy.interfaces.LauncherApp;
- import fr.trxyy.interfaces.LauncherBase;
- import fr.trxyy.interfaces.components.LauncherBackground;
- import fr.trxyy.interfaces.components.LauncherLogo;
- import fr.trxyy.interfaces.utils.ResourceLocation;
- import javafx.scene.Parent;
- import javafx.scene.Scene;
- import javafx.scene.layout.Pane;
- import javafx.stage.Stage;
- import javafx.stage.StageStyle;
- public class LauncherMain extends LauncherApp {
- @SuppressWarnings("unused")
- private LauncherBackground backgroundPanel;
- private ResourceLocation resources;
- @SuppressWarnings("unused")
- private LauncherPanel launcherPanel;
- private LauncherLogo logoPanel;
- public static void main(String[] args) {
- Initializer.registerBasics("Elerium Launcher", 880, 550);
- Initializer.registerSpecs("/resources/", "http://dunkradio.000webhostapp.com/", "elerium", Versions.V1_12, Tweaks.FORGE_1_8_HIGHER, true);
- launch(args);
- }
- @SuppressWarnings("static-access")
- @Override
- public void start(Stage primaryStage) throws Exception {
- Scene scene = new Scene(createContent());
- LauncherBase launcher = new LauncherBase(primaryStage, scene, StageStyle.UNDECORATED, true);
- launcher.setIconImage(primaryStage, resources.loadImage("favicon.png"));
- }
- @SuppressWarnings("static-access")
- private Parent createContent() {
- Pane root = new Pane();
- root.setPrefSize(Configuration.getWidth(), Configuration.getHeight());
- this.backgroundPanel = new LauncherBackground(this.resources.getMedia("background.mp4"), root);
- this.launcherPanel = new LauncherPanel(root);
- this.logoPanel = new LauncherLogo(this.resources.loadImage("logo.png"), 600, 100, root);
- this.logoPanel.setImagePos(Configuration.getWidth() / 2 - 280, 130);
- return root;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement