mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 04:43:05 -04:00
Keep progress in notification scroll when updating (#7447)
* Keep progress in notification scroll when resizing * Don't use layout directly, as per docs
This commit is contained in:
parent
c2ae9e3145
commit
59d7a81b26
@ -1,7 +1,6 @@
|
||||
package com.unciv.ui.worldscreen
|
||||
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor
|
||||
import com.badlogic.gdx.scenes.scene2d.Touchable
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Cell
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||
@ -51,8 +50,14 @@ class NotificationsScroll(
|
||||
maxNotificationsHeight: Float,
|
||||
tileInfoTableHeight: Float
|
||||
) {
|
||||
|
||||
val previousScrollY = scrollY
|
||||
|
||||
updateContent(notifications)
|
||||
updateLayout(maxNotificationsHeight, tileInfoTableHeight)
|
||||
|
||||
scrollY = previousScrollY
|
||||
updateVisualScroll()
|
||||
}
|
||||
|
||||
private fun updateContent(notifications: MutableList<Notification>) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user