Added show/hide button for tile panel in map editor
Fixed unit unique translations in Civilopedia
This commit is contained in:
parent
c8c9daf820
commit
df2be37785
4 changed files with 21 additions and 7 deletions
|
@ -75,7 +75,7 @@ class BaseUnit : INamed, IConstruction, ICivilopedia {
|
|||
}
|
||||
|
||||
for(unique in uniques)
|
||||
sb.appendln(unique.tr())
|
||||
sb.appendln(Translations.translateBonusOrPenalty(unique))
|
||||
|
||||
for(promotion in promotions)
|
||||
sb.appendln(promotion.tr())
|
||||
|
|
|
@ -414,7 +414,7 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){
|
|||
civGroup.add(ImageGetter.getImage("OtherIcons/DisbandUnit")).size(30f)
|
||||
civGroup.background = civGroupBackground.tint(Color.LIGHT_GRAY)
|
||||
label.setFontColor(Color.BLACK)
|
||||
} else if (currentPlayer==civ || currentPlayer.knows(civ)) {
|
||||
} else if (currentPlayer==civ || UnCivGame.Current.viewEntireMapForDebug || currentPlayer.knows(civ)) {
|
||||
civGroup.add(ImageGetter.getNationIndicator(civ.nation, 30f))
|
||||
civGroup.background = civGroupBackground.tint(civ.nation.getColor())
|
||||
label.setFontColor(civ.nation.getSecondaryColor())
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package com.unciv.ui.mapeditor
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.actions.Actions
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
||||
import com.unciv.models.metadata.GameParameters
|
||||
import com.unciv.logic.MapSaver
|
||||
import com.unciv.logic.map.TileMap
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.metadata.GameParameters
|
||||
import com.unciv.ui.tilegroups.TileGroup
|
||||
import com.unciv.ui.tilegroups.TileSetStrings
|
||||
import com.unciv.ui.utils.CameraStageBaseScreen
|
||||
|
@ -18,7 +19,7 @@ class MapEditorScreen(): CameraStageBaseScreen(){
|
|||
var mapName = "My first map"
|
||||
lateinit var mapHolder: TileGroupMap<TileGroup>
|
||||
val tileEditorOptions = TileEditorOptionsTable(this)
|
||||
|
||||
val showHideEditorOptionsButton = TextButton(">",skin)
|
||||
|
||||
constructor(mapNameToLoad:String?):this(){
|
||||
var mapToLoad = mapNameToLoad
|
||||
|
@ -44,8 +45,23 @@ class MapEditorScreen(): CameraStageBaseScreen(){
|
|||
val mapHolder = getMapHolder(tileMap)
|
||||
|
||||
stage.addActor(mapHolder)
|
||||
|
||||
stage.addActor(tileEditorOptions)
|
||||
tileEditorOptions.setPosition(stage.width - tileEditorOptions.width, 0f)
|
||||
|
||||
showHideEditorOptionsButton.labelCell.pad(10f)
|
||||
showHideEditorOptionsButton.pack()
|
||||
showHideEditorOptionsButton.onClick {
|
||||
if (showHideEditorOptionsButton.text.toString() == ">") {
|
||||
tileEditorOptions.addAction(Actions.moveTo(stage.width, 0f, 0.5f))
|
||||
showHideEditorOptionsButton.setText("<")
|
||||
} else {
|
||||
tileEditorOptions.addAction(Actions.moveTo(stage.width - tileEditorOptions.width, 0f, 0.5f))
|
||||
showHideEditorOptionsButton.setText(">")
|
||||
}
|
||||
}
|
||||
showHideEditorOptionsButton.setPosition(stage.width - showHideEditorOptionsButton.width - 10f,
|
||||
stage.height - showHideEditorOptionsButton.height - 10f)
|
||||
stage.addActor(showHideEditorOptionsButton)
|
||||
|
||||
|
||||
val optionsMenuButton = TextButton("Options".tr(), skin)
|
||||
|
|
|
@ -56,8 +56,6 @@ class TileEditorOptionsTable(val mapEditorScreen: MapEditorScreen): Table(Camera
|
|||
add(ScrollPane(tabPickerTable).apply { this.width= mapEditorScreen.stage.width/3}).row()
|
||||
|
||||
add(editorPickTable).row()
|
||||
|
||||
setPosition(mapEditorScreen.stage.width - width, 0f)
|
||||
}
|
||||
|
||||
private fun setImprovements() {
|
||||
|
|
Loading…
Reference in a new issue