mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 22:37:02 -04:00
Minor fixes to multiplayer UI components
This commit is contained in:
parent
efaa0c9a6c
commit
675d05d1e4
@ -317,6 +317,42 @@
|
|||||||
Italian:"Nome utente"
|
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 speeds
|
||||||
|
|
||||||
"Game Speed":{
|
"Game Speed":{
|
||||||
@ -549,4 +585,7 @@
|
|||||||
Russian:"Показывать обучение"
|
Russian:"Показывать обучение"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"Auto-assign city production":{
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,8 +21,8 @@ android {
|
|||||||
applicationId "com.unciv.app"
|
applicationId "com.unciv.app"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 292
|
versionCode 293
|
||||||
versionName "2.19.10"
|
versionName "3.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Had to add this crap for Travis to build, it wanted to sign the app
|
// Had to add this crap for Travis to build, it wanted to sign the app
|
||||||
|
@ -73,7 +73,7 @@ class NewGameScreen: PickerScreen(){
|
|||||||
GameSaver().autoSave(newGame!!){}
|
GameSaver().autoSave(newGame!!){}
|
||||||
} catch (ex: Exception) {
|
} catch (ex: Exception) {
|
||||||
val cantUploadNewGamePopup = PopupTable(this)
|
val cantUploadNewGamePopup = PopupTable(this)
|
||||||
cantUploadNewGamePopup.addGoodSizedLabel("Can't upload the new game!")
|
cantUploadNewGamePopup.addGoodSizedLabel("Could not upload game!")
|
||||||
cantUploadNewGamePopup.addCloseButton()
|
cantUploadNewGamePopup.addCloseButton()
|
||||||
cantUploadNewGamePopup.open()
|
cantUploadNewGamePopup.open()
|
||||||
newGame = null
|
newGame = null
|
||||||
|
@ -141,8 +141,9 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
} catch (ex: Exception) {
|
} catch (ex: Exception) {
|
||||||
loadingGamePopup.close()
|
loadingGamePopup.close()
|
||||||
val couldntDownloadLatestGame = PopupTable(this)
|
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.addCloseButton()
|
||||||
|
couldntDownloadLatestGame.addAction(Actions.delay(5f, Actions.run { couldntDownloadLatestGame.close() }))
|
||||||
couldntDownloadLatestGame.open()
|
couldntDownloadLatestGame.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -324,10 +325,11 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
OnlineMultiplayer().tryUploadGame(gameInfoClone)
|
OnlineMultiplayer().tryUploadGame(gameInfoClone)
|
||||||
} catch (ex: Exception) {
|
} catch (ex: Exception) {
|
||||||
val cantUploadNewGamePopup = PopupTable(this)
|
val cantUploadNewGamePopup = PopupTable(this)
|
||||||
cantUploadNewGamePopup.addGoodSizedLabel("Can't upload the new game!")
|
cantUploadNewGamePopup.addGoodSizedLabel("Could not upload game!").row()
|
||||||
cantUploadNewGamePopup.addCloseButton()
|
cantUploadNewGamePopup.addCloseButton()
|
||||||
cantUploadNewGamePopup.open()
|
cantUploadNewGamePopup.open()
|
||||||
isPlayersTurn = true // Since we couldn't push the new game clone, then it's like we never clicked the "next turn" button
|
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
|
return@thread
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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("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.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()
|
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)
|
val game = OnlineMultiplayer().tryDownloadGame(gameId)
|
||||||
UnCivGame.Current.loadGame(game)
|
UnCivGame.Current.loadGame(game)
|
||||||
} catch (ex: Exception) {
|
} catch (ex: Exception) {
|
||||||
badGameIdLabel.setText("Could not download game1!")
|
badGameIdLabel.setText("Could not download game!".tr())
|
||||||
badGameIdLabel.isVisible = true
|
badGameIdLabel.isVisible = true
|
||||||
return@addButton
|
return@addButton
|
||||||
}
|
}
|
||||||
|
@ -80,10 +80,10 @@ class WorldScreenOptionsTable(val worldScreen:WorldScreen) : PopupTable(worldScr
|
|||||||
update()
|
update()
|
||||||
}
|
}
|
||||||
|
|
||||||
addFontSelectBox(innerTable)
|
|
||||||
|
|
||||||
addLanguageSelectBox(innerTable)
|
addLanguageSelectBox(innerTable)
|
||||||
|
|
||||||
|
addFontSelectBox(innerTable)
|
||||||
|
|
||||||
addResolutionSelectBox(innerTable)
|
addResolutionSelectBox(innerTable)
|
||||||
|
|
||||||
addAutosaveTurnsSelectBox(innerTable)
|
addAutosaveTurnsSelectBox(innerTable)
|
||||||
@ -222,10 +222,10 @@ class WorldScreenOptionsTable(val worldScreen:WorldScreen) : PopupTable(worldScr
|
|||||||
YesNoPopupTable("This Font requires you to download fonts.\n" +
|
YesNoPopupTable("This Font requires you to download fonts.\n" +
|
||||||
"Do you want to download fonts(about 4.2MB)?",
|
"Do you want to download fonts(about 4.2MB)?",
|
||||||
{
|
{
|
||||||
val downloading = PopupTable(screen)
|
val downloadingFontPopup = PopupTable(screen)
|
||||||
downloading.add("Downloading...\n".toLabel()).row()
|
downloadingFontPopup.add("Downloading...\n".toLabel()).row()
|
||||||
downloading.add("Warning:Don't switch this game to background until download finished.".toLabel().setFontColor(Color.RED)).row()
|
downloadingFontPopup.add("Warning:Don't switch this game to background until download finished.".toLabel().setFontColor(Color.RED)).row()
|
||||||
downloading.open()
|
downloadingFontPopup.open()
|
||||||
Gdx.input.inputProcessor = null
|
Gdx.input.inputProcessor = null
|
||||||
thread {
|
thread {
|
||||||
try {
|
try {
|
||||||
@ -237,10 +237,10 @@ class WorldScreenOptionsTable(val worldScreen:WorldScreen) : PopupTable(worldScr
|
|||||||
catch (e: IOException) {
|
catch (e: IOException) {
|
||||||
Gdx.app.postRunnable {
|
Gdx.app.postRunnable {
|
||||||
FontSetSelectBox.selected = "NativeFont(Recommended)"
|
FontSetSelectBox.selected = "NativeFont(Recommended)"
|
||||||
val downloading = PopupTable(UnCivGame.Current.worldScreen)
|
val downloadFailedPopup = PopupTable(UnCivGame.Current.worldScreen)
|
||||||
downloading.add("Download failed!\nPlease check your internet connection.".toLabel().setFontColor(Color.RED)).row()
|
downloadFailedPopup.add("Download failed!\nPlease check your internet connection.".toLabel().setFontColor(Color.RED)).row()
|
||||||
downloading.addButton("Close".tr()) { downloading.remove() }.row()
|
downloadFailedPopup.addCloseButton()
|
||||||
downloading.open()
|
downloadFailedPopup.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user