mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-16 08:36:07 +09:00
replacing min/max usage with kotlin's
This commit is contained in:
@@ -55,14 +55,14 @@ class ChunkLoadingLoadScreen(screenToBeLoaded: IngameInstance, private val world
|
||||
|
||||
App.batch.inUse { val it = it as FlippingSpriteBatch
|
||||
it.color = Color.WHITE
|
||||
val previewX = (drawWidth - previewWidth).div(2f).round()
|
||||
val previewY = (App.scr.height - previewHeight.times(1.5f)).div(2f).round()
|
||||
val previewX = (drawWidth - previewWidth).div(2f).roundToFloat()
|
||||
val previewY = (App.scr.height - previewHeight.times(1.5f)).div(2f).roundToFloat()
|
||||
Toolkit.drawBoxBorder(it, previewX.toInt() - 1, previewY.toInt() - 1, previewWidth + 2, previewHeight + 2)
|
||||
it.drawFlipped(previewTexture, previewX, previewY)
|
||||
val text = messages.getHeadElem() ?: ""
|
||||
App.fontGame.draw(it,
|
||||
text,
|
||||
(drawWidth - App.fontGame.getWidth(text)).div(2f).round(),
|
||||
(drawWidth - App.fontGame.getWidth(text)).div(2f).roundToFloat(),
|
||||
previewY + previewHeight + 98 - App.fontGame.lineHeight
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user