2022-01-23 18:53:16 +01:00
package io.gitlab.jfronny.inceptum.frontend.gui.window ;
2021-10-28 21:31:51 +02:00
import imgui.ImGui ;
2021-12-11 15:06:17 +01:00
import io.gitlab.jfronny.inceptum.Inceptum ;
2021-11-02 13:43:18 +01:00
import io.gitlab.jfronny.inceptum.util.MetaHolder ;
2021-12-11 15:06:17 +01:00
import io.gitlab.jfronny.inceptum.util.Utils ;
import java.net.URI ;
import java.net.URISyntaxException ;
2021-10-28 21:31:51 +02:00
public class AboutWindow extends Window {
public AboutWindow ( ) {
super ( " About " ) ;
}
@Override
public void draw ( ) {
2022-01-04 17:48:01 +01:00
ImGui . text ( " Inceptum " + MetaHolder . VERSION . version + " Copyright (C) 2021 JFronny " ) ;
2021-10-28 21:31:51 +02:00
ImGui . text ( " This program comes with ABSOLUTELY NO WARRANTY. " ) ;
ImGui . text ( " This is free software, and you are welcome to redistribute it under certain conditions. " ) ;
2021-12-11 15:06:17 +01:00
ImGui . separator ( ) ;
if ( ! MetaHolder . VERSION . isPublic ) ImGui . text ( " This is a custom build. No support will be provided " ) ;
else if ( ! MetaHolder . VERSION . jvm . equals ( Runtime . version ( ) . feature ( ) ) ) ImGui . text ( " This build was designed for Java " + MetaHolder . VERSION . jvm + " , but you are using Java " + Runtime . version ( ) . feature ( ) + " . No support will be provided " ) ;
else {
try {
ImGui . text ( " For support, you can head to my " ) ;
ImGui . sameLine ( ) ;
if ( ImGui . button ( " Discord " ) ) {
Utils . openWebBrowser ( new URI ( " https://discord.gg/UjhHBqt " ) ) ;
}
ImGui . sameLine ( ) ;
ImGui . text ( " guild or " ) ;
ImGui . sameLine ( ) ;
if ( ImGui . button ( " Matrix " ) ) {
Utils . openWebBrowser ( new URI ( " https://matrix.to/#/%23jfronny%3Amatrix.org " ) ) ;
}
ImGui . sameLine ( ) ;
ImGui . text ( " space " ) ;
} catch ( URISyntaxException e ) {
Inceptum . showError ( " Could not complete task " , e ) ;
}
}
2021-10-28 21:31:51 +02:00
}
}