Better category spacing for Civilopedia

This commit is contained in:
Yair Morgenstern 2019-12-13 14:07:46 +02:00
parent a13d6bc82e
commit 906bf19426
3 changed files with 32 additions and 1367 deletions

File diff suppressed because it is too large Load Diff

View File

@ -118,24 +118,25 @@ class Ruleset {
Translations.add(file.readString(Charsets.UTF_8.name()))
}
}
for(language in Translations.getLanguages()){
val translationsOfLanguage = HashMap<String,String>()
val stringBuilder=StringBuilder()
for(translation in Translations.values) {
stringBuilder.append(translation.entry)
stringBuilder.append('=')
if (translation.containsKey(language))
stringBuilder.append(translation[language]!!)
stringBuilder.appendln()
}
val finalFile = stringBuilder.toString()
Gdx.files.local("jsons/Translations/$language.json")
.writeString(finalFile,false,Charsets.UTF_8.name())
}
// for(language in Translations.getLanguages()){
// val translationsOfLanguage = HashMap<String,String>()
// val stringBuilder=StringBuilder()
// for(translation in Translations.values) {
//
// stringBuilder.append(translation.entry)
// stringBuilder.append('=')
//
//
// if (translation.containsKey(language))
// stringBuilder.append(translation[language]!!)
// stringBuilder.appendln()
// }
//
// val finalFile = stringBuilder.toString()
// Gdx.files.local("jsons/Translations/$language.json")
// .writeString(finalFile,false,Charsets.UTF_8.name())
// }
val translationFilesTime = System.currentTimeMillis() - translationStart
println("Loading translation files - "+translationFilesTime+"ms")

View File

@ -49,8 +49,21 @@ class CivilopediaScreen(ruleset: Ruleset) : CameraStageBaseScreen() {
onBackButtonClicked { UncivGame.Current.setWorldScreen() }
val buttonTable = Table()
buttonTable.pad(15f)
buttonTable.defaults().pad(10f)
val buttonTableScroll = ScrollPane(buttonTable)
val goToGameButton = TextButton("Close".tr(), skin)
goToGameButton.onClick {
game.setWorldScreen()
dispose()
}
val topTable = Table()
topTable.add(goToGameButton).pad(10f)
topTable.add(buttonTableScroll)
val entryTable = Table()
val splitPane = SplitPane(buttonTable, entryTable, true, skin)
val splitPane = SplitPane(topTable, entryTable, true, skin)
splitPane.splitAmount = 0.2f
splitPane.setFillParent(true)
@ -58,12 +71,6 @@ class CivilopediaScreen(ruleset: Ruleset) : CameraStageBaseScreen() {
description.setWrap(true)
val goToGameButton = TextButton("Close".tr(), skin)
goToGameButton.onClick {
game.setWorldScreen()
dispose()
}
buttonTable.add(goToGameButton)