Open TheAssassin opened 4 years ago
I rly like that idea, but how about instead of coloring the text itself, how about we just draw a colored background to the text?
This'd required adding such a feature. Also, I think coloring the font is more subtle, which is also important in a game.
both ways we'd have to add a new parameter to struct cline
, e.g. bool mentions_player
so we don't have to recalculate it over and over again. that'd need us to fiddle inside the void conline(int type, const char *sf, int n)
, the biggest problem with this is that sf
means the entire thing you see in the chat e.g. <freem> Hello World
.
and regarding "adding that feature", this is nonsense, we can already draw stuff like images behind text.
and regarding "adding that feature", this is nonsense, we can already draw stuff like images behind text.
That's not quite the same as having some serious support for background colors. As said, I don't even think it's that much of a good idea. I'd personally just go for the ^fo
color.
both ways we'd have to add a new parameter to struct cline, e.g. bool mentions_player so we don't have to recalculate it over and over again. that'd need us to fiddle inside the void conline(int type, const char *sf, int n), the biggest problem with this is that sf means the entire thing you see in the chat e.g.
Hello World.
That just basically screams, "I want to be refactored". It seems the state keeping of chat lines is pretty bad. Might be time to add some struct
ure to them, e.g., class ChatMessage
or something like that.
I do agree with you, but
ChatMessage
would be an inappropriate name except you want to have a separate class for chatmessages and console outputs (which I think would also kinda make sense since console outputs don't need parameters like mentioned_player
, etc. so maybe we could have a general class for that and then have a class that derives from it
50 inspired me to this idea. We should add some chat highlighting feature, like you have in most IRC clients. Whenever you are mentioned (and this has become fairly easy with #37), the client should display the entire line in a special, highly visible (maybe even customizable) color. This is a very non-invasive, subtle but powerful way to inform users about lines which affect them.
One thing to look out for is, whatever color is used, the game must still make sure that when a color code is used in such a message, that part is highlighted in some way. I could imagine something like "if same color then display that part in white font color".