chat overlay size text to actually follow the apparant size when the screen zoom is used

This commit is contained in:
minjaesong
2022-10-01 14:23:33 +09:00
parent e46c05a597
commit 40972bf7d1

View File

@@ -5,6 +5,7 @@ import com.badlogic.gdx.graphics.Camera
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import net.torvald.terrarum.App
import net.torvald.terrarum.ceilInt
import net.torvald.terrarum.langpack.Lang
import net.torvald.terrarum.modulebasegame.ui.UIInventoryFull.Companion.CELL_COL
import net.torvald.terrarum.ui.*
@@ -130,7 +131,9 @@ class UIGraphicsControlPanel(remoCon: UIRemoCon?) : UICanvas() {
batch.color = Toolkit.Theme.COL_ACTIVE
Toolkit.drawBoxBorder(batch, xstart + 1, 1, App.scr.chatWidth - 2, App.scr.height - 2)
val overlayResTxt = "${App.scr.chatWidth}$TIMES${App.scr.height}"
val overlayResTxt = "${(App.scr.chatWidth * App.scr.magn).ceilInt()}$TIMES${App.scr.windowH}"
App.fontGame.draw(batch, overlayResTxt,
(xstart + (App.scr.chatWidth - App.fontGame.getWidth(overlayResTxt)) / 2).toFloat(),
((App.scr.height - App.fontGame.lineHeight) / 2).toFloat()