ID:1584671
 
Not a bug
BYOND Version:504
Operating System:Windows 8 64-bit
Web Browser:Chrome 35.0.1916.114
Applies to:DM Language
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:

It seems that if you set maptext width above 32 pixels, and set mouse_opacity to 2 it expands the detection box to the width of the maptext instead of the width of the object.

Numbered Steps to Reproduce Problem:

1: Create an object, image, or probably anything else you can apply maptext to.

2: Set the aboves mouse_opacity to 2, and its maptext_width to 96.

3: Set up MouseEntered() to set its maptext to a non-null value, and set MouseExited() to null the maptext

4: Set up a row of the object, image, or whatever and move your mouse between them. If you're moving the mouse from right to left, it's fine. If you go left to right, it'll only change every 96 instead of 32, even if the thing with maptext is only 32.

Code Snippet (if applicable) to Reproduce Problem:


Expected Results: To be able to create maptext that exceeds 32 pixels in length, without having the MouseEntered() detection box increased beyond a width of 32 pixels.

Actual Results: Lengthy maptext screws up the boundaries for mouse detection.

Does the problem occur:
Every time? Or how often? Every time.
In other games? Probably any.
In other user accounts? Probably any.
On other computers? Probably any.

When does the problem NOT occur? When you do not set mouse_opacity to 2.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? Probably applies to all versions.

Workarounds: There's probably a couple. The main one off the top of my head would be making sure the icon fills enough space for mouse_opacity to not need to be set to 2.



Notes: I know this is probably pretty minor, I'm not 100% sure this is a bug, but I could see it causing a lot of problems for new developers, and maybe even experienced ones if the right need comes up; so reporting this just for good measure.
Since maptext is meant to be clickable, how is this a bug? I'm not sure I follow.
Well, I actually didn't think about maptext needing to receive the clicks so that probably caused some confusion on my part, but it's basically that I didn't expect mouse_opacity to expand beyond the size of the object. I expected it to go off the object, not the maptext.

What got me thinking it's a bug is I was experimenting with having an objects name displayed above it whenever it's hovered over, but the maptext was expanding the width boundary to where hovering wouldn't work properly with mouse_opacity set to 2.

I've yet to think of a way around this, aside from filling the icon to avoid opacity setting, or making a new maptext object on top of the hovered object, but I'm not sure this could be altered without causing problems so it may just be something developers have to work around their selves.

Edit: Just fixed some wording.
Edit 2: This might be better as a feature request that asks for a new mouse_opacity setting that sets the opacity to the size of the atom, instead of the size of the maptext; since existing behavior may not actually be a bug.
Lummox JR resolved issue (Not a bug)