minor clean up
This commit is contained in:
parent
360badb841
commit
7434d0be25
|
@ -49,6 +49,7 @@ import javafx.scene.layout.AnchorPane;
|
||||||
|
|
||||||
public class Main extends Application {
|
public class Main extends Application {
|
||||||
|
|
||||||
|
private static Main main;
|
||||||
private Stage primaryStage;
|
private Stage primaryStage;
|
||||||
private MainWindowController mainWindowController;
|
private MainWindowController mainWindowController;
|
||||||
private CloudController cloudController;
|
private CloudController cloudController;
|
||||||
|
@ -79,6 +80,7 @@ public class Main extends Application {
|
||||||
|
|
||||||
this.primaryStage = primaryStage;
|
this.primaryStage = primaryStage;
|
||||||
mainWindowController = new MainWindowController(this);
|
mainWindowController = new MainWindowController(this);
|
||||||
|
main = this;
|
||||||
|
|
||||||
mainWindow();
|
mainWindow();
|
||||||
initActions();
|
initActions();
|
||||||
|
@ -299,6 +301,10 @@ public class Main extends Application {
|
||||||
primaryStage.heightProperty().addListener(heightListener);
|
primaryStage.heightProperty().addListener(heightListener);
|
||||||
primaryStage.maximizedProperty().addListener(maximizeListener);
|
primaryStage.maximizedProperty().addListener(maximizeListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Main getMain() {
|
||||||
|
return main;
|
||||||
|
}
|
||||||
|
|
||||||
public Stage getPrimaryStage() {
|
public Stage getPrimaryStage() {
|
||||||
return primaryStage;
|
return primaryStage;
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
*/
|
*/
|
||||||
package com.cemu_UI.application;
|
package com.cemu_UI.application;
|
||||||
|
|
||||||
import java.awt.Desktop;
|
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
|
@ -34,7 +33,6 @@ import java.io.OutputStream;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URI;
|
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
@ -625,17 +623,7 @@ public class MainWindowController {
|
||||||
@Override
|
@Override
|
||||||
public void handle(MouseEvent mouseEvent) {
|
public void handle(MouseEvent mouseEvent) {
|
||||||
if (mouseEvent.getButton().equals(MouseButton.PRIMARY)) {
|
if (mouseEvent.getButton().equals(MouseButton.PRIMARY)) {
|
||||||
Thread thread = new Thread(new Runnable() {
|
Main.getMain().getHostServices().showDocument("https://git.mosad.xyz/Seil0/cemu_UI/issues/3");
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
try {
|
|
||||||
Desktop.getDesktop().browse(new URI("https://git.mosad.xyz/Seil0/cemu_UI/issues/3"));
|
|
||||||
} catch (IOException | URISyntaxException e) {
|
|
||||||
LOGGER.error("An error ocoured while trying to open a Website.", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
thread.start();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue