Skip to content

Commit

Permalink
Add a nice Splash Screen
Browse files Browse the repository at this point in the history
The temporary one is gone and a super nice one by
Lavender The Great#4772 has been added. The numbers have been modified
to accomodate for the size difference.

Signed-off-by: Jadon Fowler <jadonflower@gmail.com>
  • Loading branch information
phase committed Dec 15, 2017
1 parent 70fe8f1 commit 273b471
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/kotlin/xyz/jadonfowler/sbhs/SplashScreen.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package xyz.jadonfowler.sbhs

import java.awt.Color
import java.awt.Graphics
import javax.swing.JWindow

class SplashScreen : JWindow() {

init {
setSize(300, 200)
setSize(490, 364)
isVisible = true
}

Expand All @@ -25,7 +26,8 @@ class SplashScreen : JWindow() {
if (g == null) return
g.drawImage(SBHS.splashImage, 0, 0, null)
val textWidth = (width * (1.0 / 10)).toInt()
val textHeight = (height * (4.0 / 5)).toInt()
val textHeight = (height * (14.0 / 15)).toInt()
g.color = Color.white
g.drawString("Loading $message...", textWidth, textHeight)
}

Expand Down
Binary file modified src/main/resources/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 273b471

Please sign in to comment.