Why the text widget centerOn() method is notwoking?
Jero Wang last edited by
val font = resourcesVfs["fonts/clear_sans.fnt"].readBitmapFont() text("2048", cellSize * 0.5, Colors.WHITE, font).centerOn(bgLogo)
Please help me to solve this problem, thanks!
Yuri Volkov last edited by
I also noticed that centerOn stopped working (at least in some cases) after some KotGe library upgrade.
And I easily changed this to the manually calculated positioning ( position(x, y) )
E.g. in https://github.com/andstatus/game2048/blob/master/src/commonMain/kotlin/org/andstatus/game2048/presenter/Block.kt I changed:
position(cellSize / 2, cellSize / 2)