Better Questing

Better Questing

39M Downloads

Cursor is off by two

Cazadorsniper opened this issue · 6 comments

commented

When editing a description I noticed that the cursor was off by two.

|=cursor
Example: Warning about |no graves in the Xia dimension, so make sure to soul anchor your stuff or win.

At that position the space between about and no wouldn't delete, the "u" in about would get deleted instead.

BQ3 Version: 3.5.285
Standard Expansion Version: 3.4.148

commented

This is a common issue. You have hidden characters in your text from previously editing the entry. Copy it into a text file and you will see the hidden characters.

commented

Thing is, BQ should be able to deal with hidden formatting character's just fine.

Can you include the raw string from the JSON (or from copy paste) so I can test with that exact case to make sure

commented

"desc:8": "Make a 3x3 soft bedrock base, then place 8 soft bedrock on top of the base (leaving the middle empty), finally throw a void star in the middle.\n\n§l§cWarning: No graves in the Xia dimension, so make sure to soul anchor your stuff or win." here is the string

commented

Just confirming that yes, I can recreate it with this string, thanks. I'll get working on fixing this hopefully in the next update

commented

Well this is an interesting revelation. Was playing around with this example to figure out why it breaks and nothing else I tested did and in doing so I sorta figured out what's causing it. The cursor position is actually fine, it's the text itself that's broken. You have a bold formatting code in there but it's not being displayed correctly for some odd reason. If it were showing in bold, the cursor position would be correct in adjusting for the now bigger characters.

Now to figure out why that formatting code broke

commented

This issue just gets better and better. Looks like you've stumbled upon a VANILLA bug of all things. Even if I remove all of Better Questing's GUI code AND the any multi-line requirements from the equation, Minecraft still reports the text width incorrectly when using particular orders of text formatting codes. Quite the find you've got here.

Guess my only option now is to rewrite Minecraft's own text rendering to actually work.
sigh
I was hoping to be done with writing rendering code by now. Thanks Minecraft...

EDIT: Took less effort than I thought it would. Works now and should be fixed next update