This commit is contained in:
YueR 2019-09-14 21:18:10 +08:00
parent 9aff29f414
commit d24f7a51af
4 changed files with 5 additions and 18 deletions

View File

@ -45,7 +45,7 @@ class CityInfoTable(private val cityScreen: CityScreen) : Table(CameraStageBaseS
val width = cityScreen.stage.width/4 - 2*pad val width = cityScreen.stage.width/4 - 2*pad
val showHideTableWrapper = Table() val showHideTableWrapper = Table()
showHideTableWrapper.add(showHideTable).width(width) showHideTableWrapper.add(showHideTable).width(width)
titleTable.add(str.toLabel().setFontSize(22)) titleTable.add(str.toLabel().setFontSize(24))
titleTable.onClick { titleTable.onClick {
if(showHideTableWrapper.hasChildren()) showHideTableWrapper.clear() if(showHideTableWrapper.hasChildren()) showHideTableWrapper.clear()
else showHideTableWrapper.add(showHideTable).width(width) else showHideTableWrapper.add(showHideTable).width(width)

View File

@ -39,20 +39,7 @@ class CityScreenCityPickerTable(val cityScreen: CityScreen) : Table(){
} }
val currentCityLabel = Label(city.name + " (" + city.population.population + ")", CameraStageBaseScreen.skin) val currentCityLabel = Label(city.name + " (" + city.population.population + ")", CameraStageBaseScreen.skin)
currentCityLabel.setFontSize(25) currentCityLabel.setFontSize(30)
currentCityLabel.onClick {
val editCityNamePopup = PopupTable(cityScreen)
val textArea = TextField(city.name, CameraStageBaseScreen.skin)
textArea.setAlignment(Align.center)
editCityNamePopup.add(textArea).colspan(2).row()
editCityNamePopup.addCloseButton()
editCityNamePopup.addButton("Save".tr()){
city.name = textArea.text
cityScreen.game.screen = CityScreen(city)
}
editCityNamePopup.open()
}
cityNameTable.add(currentCityLabel) cityNameTable.add(currentCityLabel)
add(cityNameTable) add(cityNameTable)

View File

@ -126,7 +126,7 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski
.fillY() // provide full-height clicking area .fillY() // provide full-height clicking area
if (UnCivGame.Current.viewEntireMapForDebug || city.civInfo.isCurrentPlayer()) if (UnCivGame.Current.viewEntireMapForDebug || city.civInfo.isCurrentPlayer())
iconTable.add(getConstructionGroup(city.cityConstructions)).padRight(10f) iconTable.add(getConstructionGroup(city.cityConstructions)).padRight(10f).padLeft(10f)
else if (city.civInfo.isMajorCiv()) { else if (city.civInfo.isMajorCiv()) {
val nationIcon = ImageGetter.getNationIcon(city.civInfo.nation.name) val nationIcon = ImageGetter.getNationIcon(city.civInfo.nation.name)
nationIcon.color = secondaryColor nationIcon.color = secondaryColor
@ -176,7 +176,7 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski
val turnsToConstruction = cityConstructions.turnsToConstruction(cityCurrentConstruction.name) val turnsToConstruction = cityConstructions.turnsToConstruction(cityCurrentConstruction.name)
val label = turnsToConstruction.toString().toLabel() val label = turnsToConstruction.toString().toLabel()
label.setFontColor(secondaryColor) label.setFontColor(secondaryColor)
label.setFontSize(10) label.setFontSize(14)
label.pack() label.pack()
group.addActor(label) group.addActor(label)

View File

@ -254,7 +254,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
buttonPic.background = ImageGetter.getDrawable("OtherIcons/civTableBackground") buttonPic.background = ImageGetter.getDrawable("OtherIcons/civTableBackground")
.tint(colorFromRGB(7, 46, 43)) .tint(colorFromRGB(7, 46, 43))
buttonPic.defaults().pad(10f) buttonPic.defaults().pad(10f)
buttonPic.add("{Pick a tech}!".toLabel().setFontColor(Color.WHITE).setFontSize(22)) buttonPic.add("{Pick a tech}!".toLabel().setFontColor(Color.WHITE).setFontSize(30))
techButtonHolder.add(buttonPic) techButtonHolder.add(buttonPic)
} }
else { else {