mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-06 08:38:30 +09:00
index is reversed, transparency not working
This commit is contained in:
@@ -17,7 +17,7 @@ class UIItemHorizontalFadeSlide(
|
|||||||
vararg uis: UICanvas
|
vararg uis: UICanvas
|
||||||
) : UIItemTransitionContainer(parent, initialX, initialY, width, height, 0.212f, currentPosition, uis) {
|
) : UIItemTransitionContainer(parent, initialX, initialY, width, height, 0.212f, currentPosition, uis) {
|
||||||
|
|
||||||
fun getOffX(index: Int) = ((currentPosition - index) * width).roundToInt()
|
fun getOffX(index: Int) = ((currentPosition - index) * width / 2f).roundToInt()
|
||||||
fun getOpacity(index: Int) = (currentPosition - index).coerceIn(0f, 1f)
|
fun getOpacity(index: Int) = (currentPosition - index).coerceIn(0f, 1f)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
Reference in New Issue
Block a user