From 1dcdd8867acdba494779895fdd269f229de572f1 Mon Sep 17 00:00:00 2001 From: minjaesong Date: Tue, 5 Mar 2024 22:11:49 +0900 Subject: [PATCH] adjusting position of the noticelet --- .../torvald/terrarum/modulebasegame/ui/Noticelet.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/net/torvald/terrarum/modulebasegame/ui/Noticelet.kt b/src/net/torvald/terrarum/modulebasegame/ui/Noticelet.kt index 2ce91d0cf..d13169b47 100644 --- a/src/net/torvald/terrarum/modulebasegame/ui/Noticelet.kt +++ b/src/net/torvald/terrarum/modulebasegame/ui/Noticelet.kt @@ -59,17 +59,21 @@ class Noticelet : UICanvas() { } toDelete.clear() + // make way for the mouse cursor + /* if (Terrarum.mouseScreenX.toFloat() in Toolkit.drawWidthf * 0.25f..Toolkit.drawWidthf * 0.75f) { if (ypos == -1f && Terrarum.mouseScreenY < App.scr.halfhf - awayFromCentre) ypos = 1f else if (ypos == 1f && Terrarum.mouseScreenY > App.scr.halfhf + awayFromCentre) ypos = -1f } + + */ } private val h = 24f private val gap = 8f - private val awayFromCentre = 120f + private val awayFromCentre = 56f//120f private val toDelete = ArrayList() @@ -80,7 +84,7 @@ class Noticelet : UICanvas() { val py = App.scr.halfhf + awayFromCentre * ypos - (if (ypos < 0) h else 0f) messageQueue.forEachIndexed { index, notice -> - drawNoticelet(batch, px, py + (h + gap) * index * ypos, notice) + drawNoticelet(batch, App.scr.tvSafeGraphicsWidth.toFloat(), py + (h + gap) * index * ypos, notice) } } @@ -99,7 +103,7 @@ class Noticelet : UICanvas() { val strLen = App.fontGame.getWidth(str) val icon = ItemCodex.getItemImage(notice.item) ?: CommonResourcePool.getAsTextureRegion("itemplaceholder_16") val width = 4f + icon.regionWidth + 4 + strLen + 4 - val dx = ((x - width) / 2).floorToFloat() + val dx = x//((x - width) / 2).floorToFloat() val dy = y val opacity = if (notice.akku < openCloseTime)