mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Show Welcome to Beta Screen
This commit is contained in:
@@ -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(){
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user