News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

[DONE] Show a message preview.

Started by Yona-TYT, September 15, 2016, 04:59:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT




Do not know if this is possible but I would like to show a preview when coordinates are entered in a message.


I want to use this in the "is_work_allowed_here" when a warning message is returned.


It is the same behavior you see in the chat.

Dwachs

This is possible to implement, but not easy: The return value of is_allowed_* are just text, which is displayed as an error message. No markup possible (right now). The chat messages use a different system.
Parsley, sage, rosemary, and maggikraut.

Dwachs

This is now possible with r7880. Syntax as in chat messages: @12,34 or (12,34). Use coord_to_string to get the right coordinate when map is rotated.
Parsley, sage, rosemary, and maggikraut.


Yona-TYT

#4
@Dwachs, Where you can call it a print("")? (For a moment I thought that "print()" was used to show pop-up. :o )


Better said, how I can display a pop-up?, Is there a function?.

Dwachs

Parsley, sage, rosemary, and maggikraut.

Yona-TYT

Quote from: Dwachs on September 17, 2016, 02:13:52 PM
check these functions

http://dwachs.github.io/simutrans-sqapi-doc/classgui.html

they do not work in network games
If I had already noticed that, the problem is that it will not display a pop-up until the player configure. :-[

Yona-TYT

#7

@Dwachs
It does not work with "is_waystop_correct(player,schedule,nr,load,wait,coord)".


Dwachs

#8
edit: you mean the error messages of is_schedule_allowed? That should be easily possible.

(is_schedule_allowed still does not work in network games)
Parsley, sage, rosemary, and maggikraut.

Yona-TYT


Quote from: Dwachs on October 07, 2016, 05:31:11 AM
edit: you mean the error messages of is_schedule_allowed? That should be easily possible.

(is_schedule_allowed still does not work in network games)
This is for the tutorial scenario, I'm getting a little better things to make it easier. ;)

Dwachs

Parsley, sage, rosemary, and maggikraut.