Skip to content

Commit

Permalink
Resize runner
Browse files Browse the repository at this point in the history
  • Loading branch information
LionZXY committed Aug 13, 2019
1 parent e6c0843 commit 622f70b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/main/java/ru/glitchless/games/tprunner/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import ru.glitchless.games.tprunner.ui.SplashScreen
fun main() {
val splash = SplashScreen()
splash.display()
checkAndDownloadAll(splash)
splash.stop()
//checkAndDownloadAll(splash)
//splash.stop()

runLauncher()
detachLauncherAndDie()
//runLauncher()
//detachLauncherAndDie()
}
10 changes: 5 additions & 5 deletions src/main/java/ru/glitchless/games/tprunner/ui/SplashScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ class SplashScreen : JFrame(), IProgressMonitor {
})
closeBtnPanel.add(closeBtn)

val backgroundImage = ImageIO.read(javaClass.getResource("/background.jpg"))
val backgroundImage = ImageIO.read(javaClass.getResource("/background.jpeg"))
val backgroundIcon = ImageIcon(backgroundImage)
val background = JLabel(backgroundIcon)
root.add(background)

closeBtn.setLocation(backgroundImage.width - closeBtnImage.width - 25, 25)
closeBtn.setLocation(backgroundImage.width - closeBtnImage.width - 13, 13)

return root
}
Expand All @@ -64,14 +64,14 @@ class SplashScreen : JFrame(), IProgressMonitor {
label.text = "Загрузка..."
label.foreground = Color(0xddddde)
label.horizontalAlignment = SwingConstants.CENTER
label.border = BorderFactory.createEmptyBorder(30, 40, 15, 40)
label.border = BorderFactory.createEmptyBorder(15, 20, 8, 20)
val availFontNames = GraphicsEnvironment.getLocalGraphicsEnvironment().availableFontFamilyNames
val fontName = listOf("Helvetica", "Arial").find { availFontNames.contains(it) }
label.font = Font(fontName, Font.PLAIN, 20)
label.font = Font(fontName, Font.PLAIN, 14)
root.add(label, BorderLayout.NORTH)

val progressBar = GProgressBar()
progressBar.border = BorderFactory.createEmptyBorder(0, 40, 30, 40)
progressBar.border = BorderFactory.createEmptyBorder(0, 20, 15, 20)
progressBar.background = Color(0xddddde)
progressBar.foreground = Color(0x00db9d)
root.add(progressBar, BorderLayout.SOUTH)
Expand Down
Binary file added src/main/resources/background.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/resources/background.jpg
Binary file not shown.
Binary file modified src/main/resources/close-btn.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 622f70b

Please sign in to comment.