News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Hyperlinks overflow.

Started by Yona-TYT, April 11, 2017, 08:55:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

All text is hyperlink.

Line 201 in /class/class_chapter_03.nut

                local c1 = coord3d(67,40,-1)
                local c2 = coord3d(53,27,-1)
                local c3 = coord3d(53,15,-1)
                local c4 = coord3d(35,6,1)
                local rails1 = c1.href(" ("+c1.tostring()+")")+""
                local rails2 = c2.href(" ("+c2.tostring()+")")+""
                local rails3 = c3.href(" ("+c3.tostring()+")")+""
                local rails4 = c4.href(" ("+c4.tostring()+")")+""

                local coord1 = label1.href(" ("+label1.tostring()+")")+""
                local coord2 = label2.hreLinef(" ("+label2.tostring()+")")+""
                local coord3 = label3.href(" ("+label3.tostring()+")")+""
                if (pot0==0)text.tx2=ttext("<em>[1/5]</em> "+format(translate("Connect the two points between %s and %s."),rails1,rails2))
                else if (pot1==0)text.tx2=ttext("<em>[2/5]</em> "+format(translate("Build a straight slope at %s."),coord1))
                else if (pot2==0)text.tx2=ttext("<em>[3/5]</em> "+format(translate("Use a flat slope to lift the ground at %s."),coord2))
                else if (pot3==0)text.tx2=ttext("<em>[4/5]</em> "+format(translate("Build a tunnel at %s."),coord3))
                else if (pot4==0)text.tx2=ttext("<em>[5/5]</em> "+format(translate("Connect the two points between %s and %s."),rails3,rails4))


Scenario: Tutorial-v3.5.01.zip
Savegame: Tutorialsv2.sve
Capture:



Dwachs

What exactly is the problem?
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

Quote from: Dwachs on April 12, 2017, 07:36:21 AM
What exactly is the problem?
Clicking on black text should not change the position on the map.

Yona-TYT

@Dwachs
Can you replicate this? ... just click on the texts (without hyperlink)

Dwachs

This should be fixed with r8213. You should fix your script as well: there are closing </a> tags without corresponding <a> tags.
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

Quote from: Dwachs on April 18, 2017, 07:18:04 PM
This should be fixed with r8213. You should fix your script as well: there are closing </a> tags without corresponding <a> tags.
It works fine, thank you!. 8)