mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 04:38:18 +07:00
Avoid overflow of the construction bar (#3573)
This commit is contained in:
@ -316,7 +316,9 @@ object ImageGetter {
|
||||
|
||||
fun getProgressBarVertical(width: Float, height: Float, percentComplete: Float, progressColor: Color, backgroundColor: Color): Table {
|
||||
val advancementGroup = Table()
|
||||
val completionHeight = height * percentComplete
|
||||
var completionHeight = height * percentComplete
|
||||
if (completionHeight > height)
|
||||
completionHeight = height
|
||||
advancementGroup.add(getImage(whiteDotLocation).apply { color = backgroundColor })
|
||||
.size(width, height - completionHeight).row()
|
||||
advancementGroup.add(getImage(whiteDotLocation).apply { color = progressColor }).size(width, completionHeight)
|
||||
|
Reference in New Issue
Block a user