mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 04:24:05 +09:00
same for the tooltip
This commit is contained in:
@@ -49,7 +49,8 @@ open class MusicDiscPrototype(originalID: ItemID, module: String, path: String)
|
||||
originalName = meta.title
|
||||
author = meta.author
|
||||
collection = meta.album
|
||||
name = "$author $EMDASH $originalName"
|
||||
name = meta.title
|
||||
nameSecondary = "${meta.author} $EMDASH ${meta.album}"
|
||||
}
|
||||
|
||||
@Transient override val itemImage: TextureRegion = generateSprite()
|
||||
|
||||
@@ -329,13 +329,16 @@ open class UIItemInventoryItemGrid(
|
||||
// set tooltip accordingly
|
||||
if ((App.IS_DEVELOPMENT_BUILD || isCompactMode) && tooltipShowing[hash] != true && it.item != null && it.mouseUp) {
|
||||
// printdbg(this, "calling INGAME.setTooltipMessage by $hash")
|
||||
|
||||
val grey = App.fontGame.toColorCode(11, 11, 11)
|
||||
val itemIDstr = "\n$grey(${it.item?.originalID}${if (it.item?.originalID == it.item?.dynamicID) "" else "/${it.item?.dynamicID}"})"
|
||||
val nameStr = if (it.item?.nameSecondary?.isNotBlank() == true) "${it.item?.name}\n$grey${it.item?.nameSecondary}" else "${it.item?.name}"
|
||||
|
||||
INGAME.setTooltipMessage(
|
||||
if (App.IS_DEVELOPMENT_BUILD) {
|
||||
it.item?.name + "\n(${it.item?.originalID}${if (it.item?.originalID == it.item?.dynamicID) "" else "/${it.item?.dynamicID}"})"
|
||||
}
|
||||
else {
|
||||
it.item?.name
|
||||
}
|
||||
if (App.IS_DEVELOPMENT_BUILD)
|
||||
nameStr + itemIDstr
|
||||
else
|
||||
nameStr
|
||||
)
|
||||
|
||||
tooltipShowing[hash] = true
|
||||
|
||||
Reference in New Issue
Block a user