News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

[tutorial] Using the information bar

Started by Yona-TYT, November 19, 2018, 06:15:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

I would like to give the player the information he needs to advance to the next step at all times, the best way to do this is by using the information bar. The problem is that the window configuration for scenarios is by default [off].

Why not activate the information bar for scenario messages, or at least do it from the scrip ?.

On the other hand, it would be very useful to be able to use links in the information bar, for example: A link that allows me to show the window of the scenario.

It would be nice to be able to give more use to that informative bar.

Leartin

Three thoughts:
1.) Is the newsticker, a location where the message disappears on it's own, really the best position for information that's supposed to be permanently on screen?
2.) If you intend to display the message in a loop, wouldn't that be really annoying if you were to use different display settings?

3.) This could be combined with requests for a chat feature. If there was a chat similar to basically every other game, you could always have it display the last few messages/lines in the bottom left corner. Rather than using the newsticker, the scenario could be allowed to send a chat message, which would then always be visible - at least in singleplayer games.

Yona-TYT

Quote1.) Is the newsticker, a location where the message disappears on it's own, really the best position for information that is supposed to be permanently on screen?
It's the only way, "Pop-.up" windows are very annoying.
Quote
2.) If you intend to display the message in a loop, wouldn't that be really annoying if you were to use different display settings?
I do not think that's a problem.
Quote3.) This could be combined with requests for a chat feature. If there was a chat similar to basically every other game, you could always have it display the last few messages/lines in the bottom left corner. Rather than using the newsticker, the scenario could be allowed to send a chat message, which would then always be visible - at least in singleplayer games.
I have always wanted a window of information that appears in a lower corner and that hidden auomaticamente like that of open-ttd and other simulation games, but with the limited interface of simutrans, I doubt that this happens.


Leartin

Quote from: Yona-TYT on November 19, 2018, 10:09:50 AM
It's the only way, "Pop-.up" windows are very annoying.[...]I do not think that's a problem.
I agree that the newsticker is a better place than popups, but you would need to ignore the users message settings, such that it's displayed in the ticker even if all messages are off, and not displayed as a popup even if that option is on. I don't think it's hard to do, but there are definitelly people who value their ability to decide whether and how messages are shown over the artistic expression of a scenario authors. I'm pointing it out for awareness, that's all.


Quote from: Yona-TYT on November 19, 2018, 10:09:50 AM
I have always wanted a window of information that appears in a lower corner and that hidden auomaticamente like that of open-ttd and other simulation games, but with the limited interface of simutrans, I doubt that this happens.
I mostly mentioned it for completions sake, not because I think it will be done (or has higher priority than other suggestions). I just like it when different suggestions compliment each other, rather then implementing several instances of a noncoherent minimum (which is still better than nothing, though)

Yona-TYT

I like using "ticker::add_msg(text, pos, colorval);"  for show the message directly.

prissi

The message bar is the wrong place for permanent messages. People may go to toilet and then miss it. Also identical messages may not displayed more than once, if it is already in the history. This was added to avoid cluttering the histroy bar.

Also there is the message history in the message window. Having tons of identical messages there is pointless. No, I think one should respect the user settings.

Yona-TYT

#6
This function to display a message without saturating the mailbox list and displayed directly:



//api_gui.cc

#include "../../simticker.h"




void_t add_newsticker(const char* text, koord pos )
{
   if (text) {
      ticker::add_msg(text, pos,  color_idx_to_rgb(COL_BLACK));
   }
   return void_t();
   
}




STATIC register_method(vm, add_newsticker, "add_newsticker");



This does not require having the mailbox configuration activated. ;) 

Edit .
I need help to get the coordinates (koor) from a text string. :-[



Dwachs

Something like this will not be included. There is the message system. The user then can control, where these messages appear.
Parsley, sage, rosemary, and maggikraut.

Yona-TYT


Quote from: Dwachs on November 21, 2018, 02:26:46 PMSomething like this will not be included. There is the message system. The user then can control, where these messages appear.

And what would be the way forward to achieve this ?.[