ID:2390598
 
Resolved
Maptext bounds were not set correctly in cases where a virtual KEEP_TOGETHER was applied (e.g., alpha, color matrix, or filter).
BYOND Version:512.1445
Operating System:Windows 10 Pro
Web Browser:Chrome 68.0.3440.75
Applies to:Dream Seeker
Status: Resolved (512.1446)

This issue has been resolved.
Descriptive Problem Summary: I'm creating objects with long maptext values, and an odd visual bug is happening if a part of the text is displayed over the icon

Numbered Steps to Reproduce Problem: Just run the code below and press "Bug"

Code Snippet (if applicable) to Reproduce Problem:
mob/verb/Bug()
var/image/I = locate("Bug")
if(I)
for(var/obj/O in I.vis_contents)
I.vis_contents -= O

else

I = image(null, src)
I.tag = "Bug"
src<<I

var/obj/O1 = new/obj/Object {maptext_width = 400; maptext_height = 140; pixel_x = -120; pixel_y = 300 +10; alpha = 0} ()
O1.maptext = "<DIV valign='top'><font size=3><b><font color=#ECFFFF>Test\nTest 1\nTest 2\nTest 3\nTest 4"

var/obj/O2 = new/obj/Object {maptext_width = 400; maptext_height = 140; pixel_x = 120; pixel_y = 300 +10; alpha = 0} ()
O2.maptext = "<font size=3><b><font color=#ECFFFF>Test without valign set to top\nTest 1\nTest 2\nTest 3\nTest 4"

animate(O1, alpha = 255, time = 7)
animate(O2, alpha = 255, time = 7)

I.vis_contents += list(O1, O2)

obj
Object icon = 'Icon.dmi'


Expected Results: The maptext is correctly displayed

Actual Results: An odd visual bug

Does the problem occur:
Every time? Or how often? Always
In other games? Yes
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur? When the maptext is displayed below the icon (?) I am not entirely sure.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.) It only happens on the latest version (512.1445), I've just tried the previous one (512.1444) and it worked perfectly

Workarounds: I've just tried maptext_y = -100, and you can see how the maptext below the icon is displayed (while a part of the maptext above the icon on the left isn't for some time).

Source: https://mega.nz/#!dYRDRAZI!SrX9q7psvIaYlSkfrwrpldiUndByVJ_Cb v7qwBZHW18
Gif 1: https://imgur.com/a/9eJ9Ncs
Gif 2 (maptext_y set to -100): https://imgur.com/a/tVL1Ry4

/Edit/ This visual bug depends on the icon's size. Gif: https://imgur.com/a/AQjFfda
Okay, so I actually asked you for clarification on the wrong thread (though I would have done so on the other eventually anyway). I need clarification on this issue, because your description is lacking some detail.

What is "An odd visual bug" supposed to mean? That's really not a good enough description, and I need to know in detail what the issue is.

Chances are this and your other report are related, but this is the one I'm looking at first.
If the maptext displayed is longer than the object's icon (and is set higher) the part that is over the icon is temporarily cut, while the other is correctly displayed:

https://imgur.com/a/FCYQ4Iw
I hope this explains the bug better:

https://imgur.com/a/gxIJHt8
(Note: The maptext that is automatically displayed will be at least maptext's width x 32, even if the object's icon height is lower).
Lummox JR resolved issue with message:
Maptext bounds were not set correctly in cases where a virtual KEEP_TOGETHER was applied (e.g., alpha, color matrix, or filter).