mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 21:14:04 +09:00
more informative 'update available' ticker
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user