This repository has been archived by the owner on Oct 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from mtricht/version-about
Add version to about page.
- Loading branch information
Showing
2 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package dev.tricht.lunaris.settings; | ||
|
||
import dev.tricht.lunaris.AutoUpdateConfiguration; | ||
import javafx.fxml.FXML; | ||
import javafx.fxml.Initializable; | ||
import javafx.scene.control.Label; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
import java.io.IOException; | ||
import java.net.URL; | ||
import java.util.Properties; | ||
import java.util.ResourceBundle; | ||
|
||
@Slf4j | ||
public class AboutGUI implements Initializable { | ||
|
||
@FXML | ||
private Label version; | ||
|
||
public AboutGUI(){ } | ||
|
||
@Override | ||
public void initialize(URL url, ResourceBundle resourceBundle) { | ||
Properties properties = new Properties(); | ||
try { | ||
properties.load(AutoUpdateConfiguration.class.getResourceAsStream("/lunaris.properties")); | ||
version.setText("Version " + properties.getProperty("version")); | ||
} catch (IOException e) { | ||
log.error("Failed to load lunaris.properties", e); | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters