Skip to content

Commit e6d6a93

Browse files
committed
Show Welcome to Beta Screen
1 parent 3cd158a commit e6d6a93

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package processing.app.ui;
2+
3+
4+
// Stub class for backwards compatibility with the ant-build system
5+
// This class is not used in the Gradle build system
6+
// The actual implementation is in src/.../Schema.kt
7+
public class WelcomeToBeta {
8+
public static void showWelcomeToBeta(){
9+
10+
}
11+
}

app/src/processing/app/UpdateCheck.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
import javax.swing.JOptionPane;
3333

34+
import processing.app.ui.WelcomeToBeta;
3435
import processing.core.PApplet;
3536

3637

@@ -134,6 +135,9 @@ public void updateCheck() throws IOException {
134135
// offerToUpdateContributions = !promptToVisitDownloadPage();
135136
promptToVisitDownloadPage();
136137
}
138+
if(latest < Base.getRevision()){
139+
WelcomeToBeta.showWelcomeToBeta();
140+
}
137141

138142
/*
139143
if (offerToUpdateContributions) {
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package processing.app.ui
2+
3+
import androidx.compose.material.Text
4+
import androidx.compose.runtime.Composable
5+
import androidx.compose.ui.awt.ComposePanel
6+
import androidx.compose.ui.window.Window
7+
import androidx.compose.ui.window.application
8+
import javax.swing.JFrame
9+
import javax.swing.SwingUtilities
10+
11+
12+
class WelcomeToBeta {
13+
companion object{
14+
@JvmStatic
15+
fun showWelcomeToBeta() {
16+
SwingUtilities.invokeLater {
17+
JFrame("New Window Title").apply {
18+
defaultCloseOperation = JFrame.DISPOSE_ON_CLOSE
19+
contentPane.add(ComposePanel().apply {
20+
setContent {
21+
welcomeToBeta()
22+
}
23+
})
24+
setSize(400, 300)
25+
setLocationRelativeTo(null)
26+
isVisible = true
27+
}
28+
}
29+
}
30+
31+
@Composable
32+
fun welcomeToBeta() {
33+
Text("Welcome to the Beta version of Processing!")
34+
}
35+
36+
@JvmStatic
37+
fun main(args: Array<String>) {
38+
application {
39+
Window(onCloseRequest = ::exitApplication) {
40+
welcomeToBeta()
41+
}
42+
}
43+
}
44+
}
45+
}
46+

0 commit comments

Comments
 (0)