Uniformed the size of buttons on LanguagePickerScreen and MultiplayerScreen (#2628)
This commit is contained in:
parent
90051ebe5c
commit
8745f58dc2
3 changed files with 17 additions and 7 deletions
|
@ -17,6 +17,7 @@ class LanguageTable(val language:String, val percentComplete: Int):Table(){
|
|||
init{
|
||||
pad(10f)
|
||||
defaults().pad(10f)
|
||||
left()
|
||||
if(ImageGetter.imageExists("FlagIcons/$language"))
|
||||
add(ImageGetter.getImage("FlagIcons/$language")).size(40f)
|
||||
|
||||
|
@ -52,6 +53,11 @@ class LanguagePickerScreen(): PickerScreen(){
|
|||
| instructions are in the Github readme! (Menu > Community > Github)
|
||||
""".trimMargin()
|
||||
topTable.add(translationDisclaimer.toLabel()).pad(10f).row()
|
||||
val tableLanguages = Table();
|
||||
tableLanguages.defaults().uniformX();
|
||||
tableLanguages.defaults().pad(10.0f);
|
||||
tableLanguages.defaults().fillX();
|
||||
topTable.add(tableLanguages).row();
|
||||
|
||||
val languageCompletionPercentage = UncivGame.Current.translations
|
||||
.percentCompleteOfLanguages
|
||||
|
@ -65,7 +71,7 @@ class LanguagePickerScreen(): PickerScreen(){
|
|||
rightSideButton.enable()
|
||||
update()
|
||||
}
|
||||
topTable.add(it).pad(10f).row()
|
||||
tableLanguages.add(it).row()
|
||||
}
|
||||
|
||||
rightSideButton.setText("Pick language".tr())
|
||||
|
|
|
@ -68,6 +68,10 @@ class MultiplayerScreen(previousScreen: CameraStageBaseScreen) : PickerScreen()
|
|||
topTable.add(mainTable).row()
|
||||
scrollPane.setScrollingDisabled(false, true)
|
||||
|
||||
rightSideTable.defaults().uniformX();
|
||||
rightSideTable.defaults().fillX();
|
||||
rightSideTable.defaults().pad(10.0f);
|
||||
|
||||
// leftTable Setup
|
||||
reloadGameListUI()
|
||||
|
||||
|
@ -79,30 +83,30 @@ class MultiplayerScreen(previousScreen: CameraStageBaseScreen) : PickerScreen()
|
|||
Gdx.app.clipboard.contents = game.settings.userId
|
||||
ResponsePopup("UserID copied to clipboard".tr(), this)
|
||||
}
|
||||
rightSideTable.add(copyUserIdButton).pad(10f).padBottom(30f).row()
|
||||
rightSideTable.add(copyUserIdButton).padBottom(30f).row()
|
||||
|
||||
copyGameIdButton.onClick {
|
||||
Gdx.app.clipboard.contents = selectedGame.gameId
|
||||
ResponsePopup("GameID copied to clipboard".tr(), this)
|
||||
}
|
||||
rightSideTable.add(copyGameIdButton).pad(10f).row()
|
||||
rightSideTable.add(copyGameIdButton).row()
|
||||
|
||||
editButton.onClick {
|
||||
game.setScreen(EditMultiplayerGameInfoScreen(selectedGame, selectedGameName, this))
|
||||
//game must be unselected in case the game gets deleted inside the EditScreen
|
||||
unselectGame()
|
||||
}
|
||||
rightSideTable.add(editButton).pad(10f).row()
|
||||
rightSideTable.add(editButton).row()
|
||||
|
||||
addGameButton.onClick {
|
||||
game.setScreen(AddMultiplayerGameScreen(this))
|
||||
}
|
||||
rightSideTable.add(addGameButton).pad(10f).padBottom(30f).row()
|
||||
rightSideTable.add(addGameButton).padBottom(30f).row()
|
||||
|
||||
refreshButton.onClick {
|
||||
redownloadAllGames()
|
||||
}
|
||||
rightSideTable.add(refreshButton).pad(10f).row()
|
||||
rightSideTable.add(refreshButton).row()
|
||||
|
||||
//RightSideButton Setup
|
||||
rightSideButton.setText("Join Game".tr())
|
||||
|
|
|
@ -19,7 +19,7 @@ import com.unciv.ui.utils.AutoScrollPane as ScrollPane
|
|||
class Language(val language:String, val percentComplete:Int){
|
||||
override fun toString(): String {
|
||||
val spaceSplitLang = language.replace("_"," ")
|
||||
return "$spaceSplitLang- $percentComplete%"
|
||||
return "$spaceSplitLang - $percentComplete%"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue