mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-17 00:56:07 +09:00
UI is now rendered in correct pos
This commit is contained in:
@@ -23,10 +23,10 @@ class UIItemHorizontalFadeSlide(
|
|||||||
init {
|
init {
|
||||||
// re-position the uis according to the initial choice of currentPosition
|
// re-position the uis according to the initial choice of currentPosition
|
||||||
uis.forEachIndexed { index, it ->
|
uis.forEachIndexed { index, it ->
|
||||||
it.posX = posX + getOffX(index)
|
it.posX = 0 + getOffX(index)
|
||||||
it.initialX = posX + getOffX(index)
|
it.initialX = 0 + getOffX(index)
|
||||||
it.posY = posY
|
it.posY = 0
|
||||||
it.initialY = posY
|
it.initialY = 0
|
||||||
it.opacity = getOpacity(index)
|
it.opacity = getOpacity(index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,7 +34,7 @@ class UIItemHorizontalFadeSlide(
|
|||||||
override fun onTransition(currentPosition: Float, uis: Array<out UICanvas>) {
|
override fun onTransition(currentPosition: Float, uis: Array<out UICanvas>) {
|
||||||
uis.forEachIndexed { index, it ->
|
uis.forEachIndexed { index, it ->
|
||||||
it.posX = it.initialX + getOffX(index)
|
it.posX = it.initialX + getOffX(index)
|
||||||
it.posY = posY
|
it.posY = it.initialY
|
||||||
it.opacity = getOpacity(index)
|
it.opacity = getOpacity(index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user