mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Resolved #6469 - solved check server connection errors on Android
This commit is contained in:
parent
73b6ee9af0
commit
5876047bda
@ -4,7 +4,7 @@ Changed server connection to URL-based to allow connection to uncivserver.xyz
|
|||||||
|
|
||||||
By xlenstra:
|
By xlenstra:
|
||||||
- Added a unique for attacking when embarked
|
- Added a unique for attacking when embarked
|
||||||
- Typed denmarks unique and generalized it
|
- Generalized Denmark's unique
|
||||||
|
|
||||||
By HaneulCheong:
|
By HaneulCheong:
|
||||||
- Improved city name generation
|
- Improved city name generation
|
||||||
|
@ -264,7 +264,6 @@ class OptionsPopup(val previousScreen: BaseScreen) : Popup(previousScreen) {
|
|||||||
else "https://..."
|
else "https://..."
|
||||||
val multiplayerServerTextField = TextField(textToShowForMultiplayerAddress, BaseScreen.skin)
|
val multiplayerServerTextField = TextField(textToShowForMultiplayerAddress, BaseScreen.skin)
|
||||||
multiplayerServerTextField.programmaticChangeEvents = true
|
multiplayerServerTextField.programmaticChangeEvents = true
|
||||||
multiplayerServerTextField.width = screen.stage.width / 2
|
|
||||||
val serverIpTable = Table()
|
val serverIpTable = Table()
|
||||||
|
|
||||||
serverIpTable.add("Server address".toLabel().onClick {
|
serverIpTable.add("Server address".toLabel().onClick {
|
||||||
@ -275,7 +274,7 @@ class OptionsPopup(val previousScreen: BaseScreen) : Popup(previousScreen) {
|
|||||||
settings.save()
|
settings.save()
|
||||||
connectionToServerButton.isEnabled = multiplayerServerTextField.text != Constants.dropboxMultiplayerServer
|
connectionToServerButton.isEnabled = multiplayerServerTextField.text != Constants.dropboxMultiplayerServer
|
||||||
}
|
}
|
||||||
serverIpTable.add(multiplayerServerTextField)
|
serverIpTable.add(multiplayerServerTextField).width(screen.stage.width / 2)
|
||||||
add(serverIpTable).row()
|
add(serverIpTable).row()
|
||||||
|
|
||||||
add("Reset to Dropbox".toTextButton().onClick {
|
add("Reset to Dropbox".toTextButton().onClick {
|
||||||
@ -316,7 +315,7 @@ class OptionsPopup(val previousScreen: BaseScreen) : Popup(previousScreen) {
|
|||||||
with(URL(url).openConnection() as HttpURLConnection) {
|
with(URL(url).openConnection() as HttpURLConnection) {
|
||||||
requestMethod = method // default is GET
|
requestMethod = method // default is GET
|
||||||
|
|
||||||
doOutput = true
|
if (method != Net.HttpMethods.GET) doOutput = true
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (content.isNotEmpty()) {
|
if (content.isNotEmpty()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user