Minor fixes to multiplayer UI components

This commit is contained in:
Yair Morgenstern 2019-09-01 17:18:08 +03:00
parent efaa0c9a6c
commit 675d05d1e4
7 changed files with 66 additions and 25 deletions

View File

@ -317,21 +317,57 @@
Italian:"Nome utente"
}
"Multiplayer":{
}
"Could not download game!":{
}
"Could not upload game!":{
}
"Join Game":{
}
"Invalid game ID!":{
}
"Copy User Id":{
}
"Copy Game Id":{
}
/// tutorials for multiplayer
"To create a multiplayer game, check the 'multiplayer' toggle in the New Game screen, and for each human player insert that player's user ID.":{
}
"You can assign your own user ID there easily, and othr players can copy their user IDs here and send them to you for you to include them in the game.":{
}
"Once you've created your game, enter this screen again to copy the Game ID and send it to the other players.":{
}
"Players can enter you game by copying the game ID to the clipboard, and clicking on the Join Game button":{
}
// Game speeds
"Game Speed":{
Italian:"Velocità di gioco"
Russian:"Скорость игры"
Russian:"Скорость игры"
}
"Quick":{
Italian:"Rapida"
Russian:"Быстрая"
Russian:"Быстрая"
}
"Standard":{
Italian:"Standard"
Russian:"Обычная"
Russian:"Обычная"
}
"Epic":{
@ -467,14 +503,14 @@
French:"Tours avant sauvegarde automatique"
Simplified_Chinese:"自动存档回合数"
Portuguese:"Turnos entre autosaves"
Russian:"Кол-во ходов между автосохранениями"
Russian:"Кол-во ходов между автосохранениями"
}
"Sound effects volume":{
Italian:"Volume effetti"
French:"Volume sonore"
Simplified_Chinese:"声效大小"
Russian:"Громкость звука"
Russian:"Громкость звука"
}
"Show":{
@ -541,12 +577,15 @@
Italian:"Muovi unità con un solo tocco"
German: "Einheiten mit einem Klick bewegen"
French:"Bouger les unités en un seul click"
Russian:"Перемещать юниты одним касанием"
Russian:"Перемещать юниты одним касанием"
}
"Show tutorials":{
Italian:"Mostra tutorial"
Russian:"Показывать обучение"
Russian:"Показывать обучение"
}
"Auto-assign city production":{
}
}

View File

@ -21,8 +21,8 @@ android {
applicationId "com.unciv.app"
minSdkVersion 14
targetSdkVersion 28
versionCode 292
versionName "2.19.10"
versionCode 293
versionName "3.0.0"
}
// Had to add this crap for Travis to build, it wanted to sign the app

View File

@ -73,7 +73,7 @@ class NewGameScreen: PickerScreen(){
GameSaver().autoSave(newGame!!){}
} catch (ex: Exception) {
val cantUploadNewGamePopup = PopupTable(this)
cantUploadNewGamePopup.addGoodSizedLabel("Can't upload the new game!")
cantUploadNewGamePopup.addGoodSizedLabel("Could not upload game!")
cantUploadNewGamePopup.addCloseButton()
cantUploadNewGamePopup.open()
newGame = null

View File

@ -52,7 +52,7 @@ class Fonts {
return true
return false
}
fun getCharsForFont(withChinese:Boolean): String {
val defaultText = "ABCČĆDĐEFGHIJKLMNOPQRSŠTUVWXYZŽaäàâăbcčćçdđeéfghiîjklmnoöpqrsșštțuüvwxyzž" +
"АБВГҐДЂЕЁЄЖЗЅИІЇЙЈКЛЉМНЊОПРСТЋУЎФХЦЧЏШЩЪЫЬЭЮЯабвгґдђеёєжзѕиіїйјклљмнњопрстћуўфхцчџшщъыьэюя" +

View File

@ -141,8 +141,9 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
} catch (ex: Exception) {
loadingGamePopup.close()
val couldntDownloadLatestGame = PopupTable(this)
couldntDownloadLatestGame.addGoodSizedLabel("Couldn't download the latest game state!")
couldntDownloadLatestGame.addGoodSizedLabel("Couldn't download the latest game state!").row()
couldntDownloadLatestGame.addCloseButton()
couldntDownloadLatestGame.addAction(Actions.delay(5f, Actions.run { couldntDownloadLatestGame.close() }))
couldntDownloadLatestGame.open()
}
}
@ -324,10 +325,11 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
OnlineMultiplayer().tryUploadGame(gameInfoClone)
} catch (ex: Exception) {
val cantUploadNewGamePopup = PopupTable(this)
cantUploadNewGamePopup.addGoodSizedLabel("Can't upload the new game!")
cantUploadNewGamePopup.addGoodSizedLabel("Could not upload game!").row()
cantUploadNewGamePopup.addCloseButton()
cantUploadNewGamePopup.open()
isPlayersTurn = true // Since we couldn't push the new game clone, then it's like we never clicked the "next turn" button
shouldUpdate = true
return@thread
}
}

View File

@ -83,7 +83,7 @@ class WorldScreenMenuTable(val worldScreen: WorldScreen) : PopupTable(worldScree
multiplayerPopup.addGoodSizedLabel("To create a multiplayer game, check the 'multiplayer' toggle in the New Game screen, and for each human player insert that player's user ID.").row()
multiplayerPopup.addGoodSizedLabel("You can assign your own user ID there easily, and othr players can copy their user IDs here and send them to you for you to include them in the game.").row()
multiplayerPopup.addButton("Click to copy User Id"){ Gdx.app.clipboard.contents = UnCivGame.Current.settings.userId }.row()
multiplayerPopup.addButton("Copy User Id"){ Gdx.app.clipboard.contents = UnCivGame.Current.settings.userId }.row()
multiplayerPopup.addGoodSizedLabel("Once you've created your game, enter this screen again to copy the Game ID and send it to the other players.").row()
@ -108,7 +108,7 @@ class WorldScreenMenuTable(val worldScreen: WorldScreen) : PopupTable(worldScree
val game = OnlineMultiplayer().tryDownloadGame(gameId)
UnCivGame.Current.loadGame(game)
} catch (ex: Exception) {
badGameIdLabel.setText("Could not download game1!")
badGameIdLabel.setText("Could not download game!".tr())
badGameIdLabel.isVisible = true
return@addButton
}

View File

@ -79,11 +79,11 @@ class WorldScreenOptionsTable(val worldScreen:WorldScreen) : PopupTable(worldScr
settings.autoAssignCityProduction= !settings.autoAssignCityProduction
update()
}
addFontSelectBox(innerTable)
addLanguageSelectBox(innerTable)
addFontSelectBox(innerTable)
addResolutionSelectBox(innerTable)
addAutosaveTurnsSelectBox(innerTable)
@ -222,10 +222,10 @@ class WorldScreenOptionsTable(val worldScreen:WorldScreen) : PopupTable(worldScr
YesNoPopupTable("This Font requires you to download fonts.\n" +
"Do you want to download fonts(about 4.2MB)?",
{
val downloading = PopupTable(screen)
downloading.add("Downloading...\n".toLabel()).row()
downloading.add("Warning:Don't switch this game to background until download finished.".toLabel().setFontColor(Color.RED)).row()
downloading.open()
val downloadingFontPopup = PopupTable(screen)
downloadingFontPopup.add("Downloading...\n".toLabel()).row()
downloadingFontPopup.add("Warning:Don't switch this game to background until download finished.".toLabel().setFontColor(Color.RED)).row()
downloadingFontPopup.open()
Gdx.input.inputProcessor = null
thread {
try {
@ -237,10 +237,10 @@ class WorldScreenOptionsTable(val worldScreen:WorldScreen) : PopupTable(worldScr
catch (e: IOException) {
Gdx.app.postRunnable {
FontSetSelectBox.selected = "NativeFont(Recommended)"
val downloading = PopupTable(UnCivGame.Current.worldScreen)
downloading.add("Download failed!\nPlease check your internet connection.".toLabel().setFontColor(Color.RED)).row()
downloading.addButton("Close".tr()) { downloading.remove() }.row()
downloading.open()
val downloadFailedPopup = PopupTable(UnCivGame.Current.worldScreen)
downloadFailedPopup.add("Download failed!\nPlease check your internet connection.".toLabel().setFontColor(Color.RED)).row()
downloadFailedPopup.addCloseButton()
downloadFailedPopup.open()
}
}
}