mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
replacing min/max usage with kotlin's
This commit is contained in:
@@ -8,6 +8,7 @@ import net.torvald.terrarum.Second
|
||||
import net.torvald.terrarum.blendNormalStraightAlpha
|
||||
import net.torvald.terrarum.ui.Toolkit
|
||||
import net.torvald.terrarum.ui.UICanvas
|
||||
import kotlin.math.max
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2016-01-23.
|
||||
@@ -56,7 +57,7 @@ class Notification : UICanvas() {
|
||||
App.fontGame.getWidth(message[0])
|
||||
else
|
||||
message.map { App.fontGame.getWidth(it) }.sorted().last()
|
||||
val displayedTextWidth = maxOf(240, realTextWidth)
|
||||
val displayedTextWidth = max(240, realTextWidth)
|
||||
|
||||
// force the UI to the centre of the screen
|
||||
this.posX = (App.scr.width - displayedTextWidth) / 2
|
||||
|
||||
Reference in New Issue
Block a user