Show Welcome to Beta Screen

This commit is contained in:
Stef Tervelde
2025-02-05 22:25:30 +01:00
parent 3cd158a653
commit e6d6a93fd2
3 changed files with 61 additions and 0 deletions
@@ -0,0 +1,11 @@
package processing.app.ui;
// Stub class for backwards compatibility with the ant-build system
// This class is not used in the Gradle build system
// The actual implementation is in src/.../Schema.kt
public class WelcomeToBeta {
public static void showWelcomeToBeta(){
}
}
+4
View File
@@ -31,6 +31,7 @@ import java.util.Random;
import javax.swing.JOptionPane;
import processing.app.ui.WelcomeToBeta;
import processing.core.PApplet;
@@ -134,6 +135,9 @@ public class UpdateCheck {
// offerToUpdateContributions = !promptToVisitDownloadPage();
promptToVisitDownloadPage();
}
if(latest < Base.getRevision()){
WelcomeToBeta.showWelcomeToBeta();
}
/*
if (offerToUpdateContributions) {
@@ -0,0 +1,46 @@
package processing.app.ui
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.awt.ComposePanel
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
import javax.swing.JFrame
import javax.swing.SwingUtilities
class WelcomeToBeta {
companion object{
@JvmStatic
fun showWelcomeToBeta() {
SwingUtilities.invokeLater {
JFrame("New Window Title").apply {
defaultCloseOperation = JFrame.DISPOSE_ON_CLOSE
contentPane.add(ComposePanel().apply {
setContent {
welcomeToBeta()
}
})
setSize(400, 300)
setLocationRelativeTo(null)
isVisible = true
}
}
}
@Composable
fun welcomeToBeta() {
Text("Welcome to the Beta version of Processing!")
}
@JvmStatic
fun main(args: Array<String>) {
application {
Window(onCloseRequest = ::exitApplication) {
welcomeToBeta()
}
}
}
}
}