News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Coding query: clickable links in the convoy information window

Started by jamespetts, July 24, 2013, 08:54:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

I am looking to see whether I can add clickable links to the destinations of freight/passengers in the convoy information window, but I am not as familiar as I might be with the GUI code. Might I ask - in general terms, what is the best way to go about doing this, and where is a good place to look for similar code that I can copy/adapt?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

This is not easy, as the convoi info dialogue gets this info via a string. It was often requested though, and will be quite an effort to update. Since the sorting of the string is not straight forward you either generate a position list gui control or parse the string to create the buttons. Then it must be then added to the scrollpane.

jamespetts

Hmm, yes, I see that this is not as easy as it might be. One would have to generate co-ordinates for each line and correlate that with a particular link. Hmm. One could at least do away with the visual representation of the co-ordinates of the destination factory/building if one did this, I suppose.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.