The International Simutrans Forum

Development => Patches & Projects => Topic started by: Yona-TYT on August 20, 2021, 02:10:29 PM

Title: [patch] Show vehicle icon in pop-up windows
Post by: Yona-TYT on August 20, 2021, 02:10:29 PM
This is something I always wanted to use in scripts. It's not a big deal, just get the image of the vehicle from a text (As is done with the coordinates). It's just an experiment, it still works.  :D   

Edit.
Update: move "get_image_from_text" to siemens.
Title: Re: [patch] Show vehicle icon in pop-up windows
Post by: Yona-TYT on August 20, 2021, 02:14:47 PM
I apologize, my bad internet connection made me post twice on the same topic.  :-[   
Edit.
Remove this: https://forum.simutrans.com/index.php/topic,21076.msg196554.html#msg196554
Title: Re: [patch] Show vehicle icon in pop-up windows
Post by: prissi on August 21, 2021, 12:01:40 PM
This is really a bad hack. I would rather add a second default image paramter to the message box opning call, and then pass the text there. This way you would show the image and a meaningful text. But for such a repurposed vehicle message seems better.
Title: Re: [patch] Show vehicle icon in pop-up windows
Post by: Yona-TYT on August 21, 2021, 06:29:30 PM
Quote from: prissi on August 21, 2021, 12:01:40 PMI would rather add a second default image paramter to the message box opning call, and then pass the text there.

Are you referring to this?.
    else if (image != IMG_EMPTY) {
        create_win( new news_img(error, image), w_time_delete, magic_none );
    }