mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2025-01-19 00:26:27 +01:00
Removed usage of File.separator()
Don't use this for fetching files inside the JAR, it can cause issues on Windows
This commit is contained in:
parent
9749d8d3c8
commit
bf63a8bc9c
@ -18,8 +18,8 @@ public class BoxButton extends StackPane {
|
|||||||
|
|
||||||
//paths zijn relatief aan deze classpath
|
//paths zijn relatief aan deze classpath
|
||||||
public BoxButton(String imageName, String imageOnHoverName) {
|
public BoxButton(String imageName, String imageOnHoverName) {
|
||||||
this.image = new Image(getClass().getResourceAsStream("files" + File.separator + imageName));
|
this.image = new Image(getClass().getResourceAsStream("files/" + imageName));
|
||||||
this.imageOnHover = new Image(getClass().getResourceAsStream("files" + File.separator + imageOnHoverName));
|
this.imageOnHover = new Image(getClass().getResourceAsStream("files/" + imageOnHoverName));
|
||||||
this.imageView = new ImageView();
|
this.imageView = new ImageView();
|
||||||
|
|
||||||
setCursor(Cursor.DEFAULT);
|
setCursor(Cursor.DEFAULT);
|
||||||
|
@ -32,10 +32,10 @@ public class PauseResumeButton extends StackPane{
|
|||||||
public PauseResumeButton(boolean isPaused) {
|
public PauseResumeButton(boolean isPaused) {
|
||||||
this.isPaused[0] = isPaused;
|
this.isPaused[0] = isPaused;
|
||||||
|
|
||||||
this.imagePause = new Image(getClass().getResourceAsStream("files"+ File.separator+"ButtonPause.png"));
|
this.imagePause = new Image(getClass().getResourceAsStream("files/ButtonPause.png"));
|
||||||
this.imagePauseOnHover = new Image(getClass().getResourceAsStream("files"+ File.separator+"ButtonPauseHover.png"));
|
this.imagePauseOnHover = new Image(getClass().getResourceAsStream("files/ButtonPauseHover.png"));
|
||||||
this.imageResume = new Image(getClass().getResourceAsStream("files"+ File.separator+"ButtonResume.png"));
|
this.imageResume = new Image(getClass().getResourceAsStream("files/ButtonResume.png"));
|
||||||
this.imageResumeOnHover = new Image(getClass().getResourceAsStream("files"+ File.separator+"ButtonResumeHover.png"));
|
this.imageResumeOnHover = new Image(getClass().getResourceAsStream("files/ButtonResumeHover.png"));
|
||||||
this.imageView = new ImageView();
|
this.imageView = new ImageView();
|
||||||
|
|
||||||
setCursor(Cursor.DEFAULT);
|
setCursor(Cursor.DEFAULT);
|
||||||
|
Loading…
Reference in New Issue
Block a user