News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

.

Started by RESTRICTED ACCOUNT, May 04, 2024, 09:50:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RESTRICTED ACCOUNT

.
 
 
 .

prissi

#1
Individual chat is a problem on Android (in principle) as it would require Simutrans to verify that a player is over 12 (in Germany) or 13 (in Japan) years old (and other limits in other countries). We could ignore this of course, the chances of being discovered are slim.

As said, I like the appearance. The other points sound like they need more work on the codebase and message distribution system. But I think this is very worthwhile.

Quote- Is it possible to distinguish between unread and read? I have no idea how to implement it.
- We need to think a little more about the design when making the background transparent. The name may be difficult to read.
- It would be useful to have access to a list of who is currently online.
- It would be convenient if a notification such as an icon would be displayed when a direct chat occurs while the chant window is closed. For example, display a message icon on the toolbar.
- It would also be a good idea to play a sound. It would be nice to have a sound specifically for message notifications.

Read would require to have a feedback message. Because in principle, there is the ticker below (in default setting) so it should been read if in front of the screen ...
For a list of who is online, one would need a new server message. Seems possible. But there is of course the problem that nicks and companies are not the same.
Message icon is certainly doable. Like the server icon on in simwin.cc
Same, message sound is easy. As messages would arrive not in sync_step. one could schedule the sound on arrival.

QuoteI'm having a hard time trying to avoid crashes due to focus issues when refreshing chats or switching tabs.
The tabs should be independent so switching should not do anything just adding more or less chat elements. (gui_chatbubble_t containers.) I would update the content with each container individually like the convoi lists in ::draw. (Check the last message, and if different, fill the lists.) That should not lead crashes.

But without seeing the code, I cannot comment on details ;)

RESTRICTED ACCOUNT

#2
 
 
 .

jamespetts

This is looking good! I have not tested the code, and I comment based on the text and screenshots. The chat functionality is definitely worth updating as it is currently very difficult to use.

One or two small points: it might be helpful to give timestamps not just for the real time, but also the in-game time when a message was posted, as that might be helpful for players to contextualise chat. A nice shortcut key (e.g. the spacebar) is good for bringing up the chat window - but if we have that, we equally need an easy shortcut key for closing the chat window. We could use escape, but that would close all windows, and that may not be what a player wants to do, as a player might want to respond quickly to a message and then close the chat window without having to locate its close button with a mouse while carrying on with other tasks.

Finally, where a company has changed names, it would be helpful to display the company's old name next to the chat message where the message was sent when the company still had that old name. This is likely to be harder (and also less important) for client name changes.
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

#4
@jamespetts
Retaining old company names seems hard and unneeded as after remaining all traces of those are gone.

@Ranran(retired)
What is the motivation for not having the chat window as a tab of the old message window?

Furthermore, also the old message window should (but this logic) add entries at the bottom. Maybe one should have an inverse option for the scrolled list (or an inverted scrolled list as derived type).

The add message tool is also used by scripts I think.

(And it would be easier to maintain cross compatibility of Extended would run once the directory sorting script reorganise-code-r10444.sh  ... )

jamespetts

Quote from: prissi on May 06, 2024, 06:59:30 AM@jamespetts
Retaining old company names seems hard and unneeded as after remaining all traces of those are gone.

The reason for this is that it is helpful for people to remember what former company names were so that (1) they can relate current companies to previous companies to make more sense of what is happening now; and (2) to increase the sense of immersion.
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.

RESTRICTED ACCOUNT

#6
 
 
 .

prissi

#7
By the way, about hindig the dedicated menu icon: Only show it if
networkmode || chat_messages number>0
That way, it will be even accessible after losing server connection.

Companies go bankrupt in standard too. But one could display (defunct company).

(On the reorganisation script, it was written in such a way that it kept the file history. (For git, one would have just to change "svn rename" to its git equivalent.) It could be run on each branch/fork too, keeping everything in sync. That is why it was made a script, so extended could follow. {sadly it did not then.})

EDIT:
what is SYSCOL_TEXT_TWEAK?

I could get it to compile after a lot of changes but testing with old servergames just displays rubbish; so I think I made some mistakes. I think the balloon function does not do what it should. It looks quite hackish anyway, I think it should rather come from gui_flowtext, so it have breaks automatically. At least I have a more or less similar starting point.

RESTRICTED ACCOUNT

#8
 :P

prissi

Thanks, I think the different colorboxes were to blame together with the broken text, I saw only a single line.

RESTRICTED ACCOUNT

#10
  :-[

jamespetts

Quote from: prissi on May 07, 2024, 01:05:07 AMBy the way, about hindig the dedicated menu icon: Only show it if
networkmode || chat_messages number>0
That way, it will be even accessible after losing server connection.
...
This is a very good idea.
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.

RESTRICTED ACCOUNT

#12
 :P

Isaac Eiland-Hall

QuoteSYSCOL_TEXT_TWEAK

QuoteSYSCOL_TEXT_WEAK

QuoteSYSCOL_TEXT_WEK

It keeps getting shorter! If we keep discussing this, it will disappear entirely in a few more replies. ;-)

Yona-TYT

Quote from: Isaac Eiland-Hall on May 08, 2024, 01:18:40 AMIt keeps getting shorter! If we keep discussing this, it will disappear entirely in a few more replies. ;-)



wow, you see it all!.   ;D

prissi

#15
On each update there seems an entire recalculation of the whole list which will make long chats slow down the GUI a lot.

Also, the first update seems not to display all, despite this. One has to scroll down the entire list. Somehow the min height calculation seems not to work.

I wonder if it would not make more sense to have the title and the messages as separate items. One item the title of the play, then one or more text balloons?

Anyway, a somewhat working standard is here: https://github.com/prissi/simutrans/tree/chat-window

RESTRICTED ACCOUNT

#16
 ???

prissi

The vehiclelist has also vehicles with different sizes as there could be detail texts and so on. Their size is also no know as it is a . This is not a problem as long as the size is known on initialisation. I mean, the chat balloon do not change size later until resized. Hence, the trigger should be only needed after fill_list(). After the initial filling, the width (and hence) the height of each object is known.
Also, I would only fill one of the lists (the one needed) and fill the tabs on tab changes. I will have a go too, but my feeling is that instead of all the container business, maybe the text balloon and date should be draw by "hand" without tables. Hence one would have different entries in the scrolly, Header, the for me hidden date, the text balloons.

prissi

Ok, I have finally a working chat window under all circumstances with a lot less nested box and nice scaling and found quite some errors within the resizing jungle. Please see here:
https://github.com/prissi/simutrans/tree/chat-window
As a bonus, the overview list does not need refill when changing the player ...

RESTRICTED ACCOUNT

#19
 ???

prissi

Very interesting addition, thank you.

RESTRICTED ACCOUNT

#21
 ???

prissi

I think I messed up also the time display of old messages and the direction of the triangle at the messages. But I will add this to my branch too, thank you.

RESTRICTED ACCOUNT

#23
 :o

RESTRICTED ACCOUNT

#24
 :-[  :-[  :-[

prissi

Thank you and sorry, the tailless condition I did not understood because of no comment when I tried to port the things over. I may have guessed more things wrong.

Now I never seem my company messages going to the left if I load a server game in single player mode (as I do for testing the display). If I am player 5, the message from player 5 do no longer move to the right. Why? At least on the standard games I had players (many years ago) only few people ever changed their nickname. And if you change you nickname "your messages" are not long right sided. Maybe there should be at least an option to have the company message as their own.

Also what is a company chat. Usually, companies are protected by a password, and thus only a single player plays a company.

The sizes are still not perfect, working on it. I think also of bsize should be taken from the flowtext.

RESTRICTED ACCOUNT

#26
 :-[  :-[

prissi

I see. Since I haven't run a network game in like ages, you are probably better at handling the finer points. I still think the scroller_list is somewhat fundamentally broken. It changes when the convoi height in the convoi_frame changes, but somehow not when the height changes of the comment. I think I need to address this on a fundamental level to have all the stupid resizing put to an end.

RESTRICTED ACCOUNT

#28
 ;)

prissi

Probably it becomes easier to move the labels and buttons in an aligned container before doing even more repositioning exercises. Anyway, showing again the pos-button.

prissi

I have finally achieved a stable (and also much more performant) scrolled list that works even with dynamic sizes. As usual here: https://github.com/prissi/simutrans/tree/chat-window

RESTRICTED ACCOUNT

#31
 8)

prissi

#32
There were still some redrawing issues with the scrolled list, which I have committed to the main repo at r11223.

About the scrolling, this is indeed on my today list. I think this is best a special flag on the scrolled list component. Like "sticky_end" compared to "sticky_top" (right now the default).

The current state of the chat system has gone in in r11225, but I will look at your changes tonight. Already thank you for your hard work on that.

EDIT: r11228 fixes copying and clipboard

Andarix

#33
If you want to test the new chat, I have my Simutrans server running with r11226. It may be necessary to install pak64.german again due to file differences.



What's strange is that when you open it, there are 2 input fields at the bottom of public_chat. If you switch to another tab and then back, an input field will disappear.

For personal_chat, I would put the message input line on a new line so that more of the entered text can be read.

When switching tabs, the width adjustments of the input line below are not carried out. This only happens when the window is resized.

inputline_no_scaled.png

I'm wondering how appending the coordinate (arrow in input line) is supposed to work.

RESTRICTED ACCOUNT

#34
 :-X