mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-13 12:27:40 +07:00
Added icons for Medieval and Renaissance era units
This commit is contained in:
parent
7155bfb927
commit
f546a49c49
BIN
android/assets/UnitIcons/Cannon.png
Normal file
BIN
android/assets/UnitIcons/Cannon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
BIN
android/assets/UnitIcons/Knight.png
Normal file
BIN
android/assets/UnitIcons/Knight.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
BIN
android/assets/UnitIcons/Lancer.png
Normal file
BIN
android/assets/UnitIcons/Lancer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
BIN
android/assets/UnitIcons/Musketman.png
Normal file
BIN
android/assets/UnitIcons/Musketman.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
android/assets/UnitIcons/Trebuchet.png
Normal file
BIN
android/assets/UnitIcons/Trebuchet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
@ -158,7 +158,7 @@ class TileInfo {
|
||||
if(unit!!.getBaseUnit().unitType!=UnitType.Civilian) unitString += "(" + unit!!.health + ")"
|
||||
SB.appendln(unitString)
|
||||
}
|
||||
return SB.toString()
|
||||
return SB.toString().trim()
|
||||
}
|
||||
|
||||
fun hasViewableResource(civInfo: CivilizationInfo): Boolean {
|
||||
|
@ -26,7 +26,7 @@ open class CameraStageBaseScreen : Screen {
|
||||
private var isTutorialShowing = false
|
||||
|
||||
init {
|
||||
stage = Stage(ExtendViewport(1500f, 900f), batch)// FitViewport(1000,600)
|
||||
stage = Stage(ExtendViewport(1000f, 600f), batch)// FitViewport(1000,600)
|
||||
Gdx.input.inputProcessor = stage
|
||||
}
|
||||
|
||||
|
@ -8,31 +8,36 @@ import com.unciv.ui.utils.CameraStageBaseScreen
|
||||
import com.unciv.ui.utils.ImageGetter
|
||||
|
||||
class TileInfoTable(private val worldScreen: WorldScreen) : Table() {
|
||||
init{
|
||||
skin = CameraStageBaseScreen.skin
|
||||
}
|
||||
|
||||
internal fun updateTileTable(tile: TileInfo) {
|
||||
clearChildren()
|
||||
val civInfo = worldScreen.civInfo
|
||||
val stats = tile.getTileStats(civInfo)
|
||||
pad(20f)
|
||||
columnDefaults(0).padRight(10f)
|
||||
|
||||
val skin = CameraStageBaseScreen.skin
|
||||
|
||||
if (civInfo.exploredTiles.contains(tile.position)) {
|
||||
add(getStatsTable(tile)).pad(20f)
|
||||
add(Label(tile.toString(), skin)).colspan(2)
|
||||
row()
|
||||
|
||||
|
||||
for (entry in stats.toHashMap().filterNot { it.value == 0f }) {
|
||||
add(ImageGetter.getStatIcon(entry.key.toString())).align(Align.right)
|
||||
add(Label(entry.value.toInt().toString(), skin)).align(Align.left)
|
||||
row()
|
||||
}
|
||||
}
|
||||
|
||||
pack()
|
||||
|
||||
setPosition(worldScreen.stage.width - 10f - width, 10f)
|
||||
}
|
||||
|
||||
fun getStatsTable(tile: TileInfo):Table{
|
||||
val table=Table()
|
||||
|
||||
|
||||
for (entry in tile.getTileStats(worldScreen.civInfo).toHashMap().filterNot { it.value == 0f }) {
|
||||
table.add(ImageGetter.getStatIcon(entry.key.toString())).align(Align.right)
|
||||
table.add(Label(entry.value.toInt().toString(), skin)).align(Align.left)
|
||||
table.row()
|
||||
}
|
||||
return table
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user