mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
more informative 'update available' ticker
This commit is contained in:
@@ -282,7 +282,6 @@ $BULLET Music:
|
||||
- music/discs/lucid_dream.ogg
|
||||
- music/discs/railway.ogg
|
||||
- music/discs/welded.ogg
|
||||
|
||||
℗ 2021, 2022, 2023, 2024 Orstphone
|
||||
Check out the original tracks on:
|
||||
Apple Music: <https://music.apple.com/kr/artist/orstphone/1587723053>
|
||||
@@ -300,7 +299,6 @@ $BULLET Foleys:
|
||||
- ambient/season/diurnal_winter.*.ogg
|
||||
- ambient/season/matutinal.*.ogg
|
||||
- ambient/season/nocturnal.*.ogg
|
||||
|
||||
℗ 2011, 2013, 2015, 2020, 2021 Klankbeeld
|
||||
Sound from <https://www.freesound.org/people/klankbeeld>
|
||||
|
||||
@@ -311,38 +309,31 @@ Sound from <https://www.freesound.org/people/klankbeeld>
|
||||
- effects/steps/WOOD.*.ogg
|
||||
- effects/door/wooden_open.*.ogg
|
||||
- effects/door/wooden_close.*.ogg
|
||||
|
||||
℗ 2020, 2021, 2022 Nox Sound
|
||||
Sound from <https://freesound.org/people/Nox_Sound>
|
||||
|
||||
- effects/static/phono_pops.ogg
|
||||
|
||||
℗ 2011 Veezay
|
||||
Sound from <https://freesound.org/people/veezay>
|
||||
|
||||
- effects/static/tape_hiss.ogg
|
||||
|
||||
℗ 2017 Stephen Holdaway
|
||||
Sound from <https://freesound.org/people/stecman>
|
||||
|
||||
- effects/static/film_pops_lowpass.ogg
|
||||
|
||||
℗ 2015 Joe DeShon
|
||||
Sound from <https://freesound.org/people/joedeshon>
|
||||
|
||||
- effects/static/bonfire.ogg
|
||||
|
||||
℗ 2019 DrinkingWindGames
|
||||
Sound from <https://freesound.org/people/DrinkingWindGames>
|
||||
|
||||
- effects/explosion/bang_bomb.ogg
|
||||
|
||||
℗ 2019 Richwise
|
||||
Sound from <https://freesound.org/people/richwise>
|
||||
|
||||
- effects/explosion/fuse.ogg
|
||||
- effects/explosion/fuse_continue.ogg
|
||||
|
||||
℗ 2012, 2015 j1987 and ScouseMouseJB
|
||||
Sound from <https://freesound.org/people/j1987> and <https://freesound.org/people/ScouseMouseJB>
|
||||
|
||||
@@ -351,12 +342,10 @@ Sound from <https://freesound.org/people/j1987> and <https://freesound.org/peopl
|
||||
$BULLET Impulse Responses:
|
||||
|
||||
- convolution/EchoThief - *.bin
|
||||
|
||||
EchoThief Impulse Response Library
|
||||
℗ 2013-2023 Chris Warren <cwarren@sdsu.edu>
|
||||
|
||||
- convolution/Soundwoofer - *.bin
|
||||
|
||||
Soundwoofer Free Impulse Response Library
|
||||
℗ 2018 Soundwoofer Team
|
||||
<https://soundwoofer.com/User/Index?uid=soundwoofer>
|
||||
|
||||
@@ -2,6 +2,7 @@ package net.torvald.terrarum
|
||||
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.serialise.toUint
|
||||
import java.net.URL
|
||||
import java.time.LocalDate
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.*
|
||||
@@ -48,6 +49,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
basegame
|
||||
"""
|
||||
|
||||
val FIXED_LATEST_DOWNLOAD_LINK = URL("https://github.com/curioustorvald/Terrarum/releases/latest")
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
||||
@@ -35,6 +35,8 @@ import net.torvald.terrarum.realestate.LandUtil
|
||||
import net.torvald.terrarum.serialise.ReadSimpleWorld
|
||||
import net.torvald.terrarum.ui.Toolkit
|
||||
import net.torvald.terrarum.ui.UICanvas
|
||||
import net.torvald.terrarum.ui.UIItemTextButton
|
||||
import net.torvald.terrarum.utils.OpenURL
|
||||
import net.torvald.terrarum.weather.WeatherMixer
|
||||
import net.torvald.terrarum.worlddrawer.WorldCamera
|
||||
import net.torvald.util.CircularArray
|
||||
@@ -494,18 +496,47 @@ class TitleScreen(batch: FlippingSpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
// update available!
|
||||
if (App.hasUpdate) {
|
||||
batch.color = Toolkit.Theme.COL_SELECTED
|
||||
|
||||
batch.color = if (System.currentTimeMillis() % 1500 < 750L)
|
||||
Toolkit.Theme.COL_MOUSE_UP
|
||||
else
|
||||
Toolkit.Theme.COL_SELECTED
|
||||
|
||||
val tx = UIRemoCon.menubarOffX + UIRemoCon.UIRemoConElement.paddingLeft / 2 + uiRemoCon.posX
|
||||
val ty1 = UIRemoCon.menubarOffY - uiRemoCon.height + uiRemoCon.posY - 60
|
||||
val ty2 = ty1 + 28
|
||||
App.fontGame.draw(
|
||||
batch,
|
||||
Lang["MENU_UPDATE_UPDATE_AVAILABLE"],
|
||||
UIRemoCon.menubarOffX + UIRemoCon.UIRemoConElement.paddingLeft / 2 + uiRemoCon.posX,
|
||||
UIRemoCon.menubarOffY - uiRemoCon.height + uiRemoCon.posY
|
||||
tx, ty1
|
||||
)
|
||||
|
||||
|
||||
val tw = App.fontGame.getWidth("<${TerrarumAppConfiguration.FIXED_LATEST_DOWNLOAD_LINK}>")
|
||||
if (Terrarum.mouseScreenX in tx - 32 until tx + tw + 32 &&
|
||||
Terrarum.mouseScreenY in ty2 - 16 until ty2 + App.fontGame.lineHeight.toInt() + 16) {
|
||||
|
||||
if (Gdx.input.isButtonJustPressed(App.getConfigInt("config_mouseprimary"))) {
|
||||
OpenURL(TerrarumAppConfiguration.FIXED_LATEST_DOWNLOAD_LINK)
|
||||
}
|
||||
batch.color = Toolkit.Theme.COL_SELECTED
|
||||
}
|
||||
else
|
||||
batch.color = Toolkit.Theme.COL_MOUSE_UP
|
||||
|
||||
App.fontGame.draw(
|
||||
batch,
|
||||
"<${TerrarumAppConfiguration.FIXED_LATEST_DOWNLOAD_LINK}>",
|
||||
tx, ty2
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
override fun pause() {
|
||||
}
|
||||
|
||||
|
||||
@@ -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