mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-05 15:59:50 +07:00
Restored techButton visualization
This commit is contained in:
BIN
android/Images/OtherIcons/techButtonBackground.png
Normal file
BIN
android/Images/OtherIcons/techButtonBackground.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 991 B |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 898 KiB After Width: | Height: | Size: 881 KiB |
Binary file not shown.
Before Width: | Height: | Size: 483 KiB After Width: | Height: | Size: 500 KiB |
@ -15,9 +15,11 @@ class TechButton(techName:String, private val techManager: TechManager, isWorldS
|
||||
|
||||
init {
|
||||
touchable = Touchable.enabled
|
||||
background = ImageGetter.getRoundedEdgeTableBackground(null,false)
|
||||
background = ImageGetter.getDrawable("OtherIcons/techButtonBackground").apply { setMinSize(0f,0f) }
|
||||
pad(10f)
|
||||
|
||||
if (ImageGetter.techIconExists(techName))
|
||||
add(ImageGetter.getTechIconGroup(techName, 60f))
|
||||
add(ImageGetter.getTechIconGroup(techName, 60f)).left()
|
||||
|
||||
val rightSide = Table()
|
||||
val techCost = techManager.costOfTech(techName)
|
||||
@ -69,6 +71,8 @@ class TechButton(techName:String, private val techManager: TechManager, isWorldS
|
||||
.apply { color = Color.BLACK }.surroundWithCircle(techIconSize))
|
||||
|
||||
if (isWorldScreen) rightSide.add(techEnabledIcons)
|
||||
else rightSide.add(techEnabledIcons).width(225f)
|
||||
else rightSide.add(techEnabledIcons)
|
||||
// .width(techEnabledIcons.children.size * (techIconSize+6f))
|
||||
.minWidth(150f)
|
||||
}
|
||||
}
|
@ -115,11 +115,11 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo, centerOnTech: Tec
|
||||
techTable.add(era.toLabel().addBorder(2f, color)).fill().colspan(columnSpan)
|
||||
}
|
||||
|
||||
for (i in 0..9) {
|
||||
for (rowIndex in 0..9) {
|
||||
techTable.row().pad(5f).padRight(40f)
|
||||
|
||||
for (j in techMatrix.indices) {
|
||||
val tech = techMatrix[j][i]
|
||||
for (columnIndex in techMatrix.indices) {
|
||||
val tech = techMatrix[columnIndex][rowIndex]
|
||||
if (tech == null)
|
||||
techTable.add() // empty cell
|
||||
|
||||
|
Reference in New Issue
Block a user