more informative 'update available' ticker

This commit is contained in:
minjaesong
2024-02-20 04:35:07 +09:00
parent c568276df6
commit a5953b8c87
4 changed files with 45 additions and 18 deletions

View File

@@ -3,11 +3,8 @@ package net.torvald.terrarum.utils
import com.badlogic.gdx.Gdx
import net.torvald.terrarum.App
import java.awt.Desktop
import java.awt.Toolkit
import java.awt.datatransfer.DataFlavor
import java.awt.datatransfer.StringSelection
import java.awt.datatransfer.UnsupportedFlavorException
import java.io.File
import java.net.URL
/**
* Created by minjaesong on 2016-07-31.
@@ -31,4 +28,11 @@ object OpenFile {
if (IS_MACOS) return // at this point macOS might as well be a bane of existence for "some" devs Apple fanboys think they are not worthy of existence
Desktop.getDesktop().open(file)
}
}
object OpenURL {
private val IS_MACOS = App.operationSystem == "OSX"
operator fun invoke(url: URL) {
Gdx.net.openURI(url.toURI().toString())
}
}