mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-10 23:37:31 +07:00
Better category spacing for Civilopedia
This commit is contained in:
parent
a13d6bc82e
commit
906bf19426
File diff suppressed because it is too large
Load Diff
@ -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")
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user