mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 15:01:09 -04:00
Fixed misplaced back arrow
This commit is contained in:
parent
9d1f463310
commit
1e44b1a235
@ -5,6 +5,7 @@ import com.badlogic.gdx.scenes.scene2d.Actor
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.Button
|
import com.badlogic.gdx.scenes.scene2d.ui.Button
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Cell
|
import com.badlogic.gdx.scenes.scene2d.ui.Cell
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Label
|
import com.badlogic.gdx.scenes.scene2d.ui.Label
|
||||||
|
import com.badlogic.gdx.utils.Align
|
||||||
import com.unciv.Constants
|
import com.unciv.Constants
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -22,10 +23,10 @@ class IconTextButton(text: String, val icon: Actor? = null, fontSize: Int = Cons
|
|||||||
/** Table cell containing the [icon] if any, or `null`. */
|
/** Table cell containing the [icon] if any, or `null`. */
|
||||||
val iconCell: Cell<Actor>? = if (icon != null) {
|
val iconCell: Cell<Actor>? = if (icon != null) {
|
||||||
val size = fontSize.toFloat()
|
val size = fontSize.toFloat()
|
||||||
|
icon.setSize(size,size)
|
||||||
|
icon.setOrigin(Align.center)
|
||||||
add(icon).size(size).padRight(size / 3)
|
add(icon).size(size).padRight(size / 3)
|
||||||
} else {
|
} else null
|
||||||
null
|
|
||||||
}
|
|
||||||
/** Table cell instance containing the [label]. */
|
/** Table cell instance containing the [label]. */
|
||||||
val labelCell: Cell<Label> = add(label)
|
val labelCell: Cell<Label> = add(label)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user