[CF-Devel] client split information window

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Wed Oct 20 01:41:50 CDT 2004


Todd Mitchell wrote:
>
     
      When I was playing with the WHO command output I really wanted to add 
     
     >
     
      colour to make it really readable but any colourized lines got sent to 
     
     >
     
      the second information window when I was using split info windows in the 
     
     >
     
      GTK client.  SO  - how does this work in the client?  Does it just look 
     
     >
     
      for any colorized text or is it smarter than that and I am not using the 
     
     >
     
      right setting?  It would be nice to be able to use colour in the main 
     
     >
     
      info window too to improve readability, not just for WHO either.
     
     >
     
      Of course for now I could just add some colour to all the who output and 
     
     >
     
      then it would all display in the second info window when it is in use 
     
     >
     
      and normally when it isn't.  Wouldn't it be better to use listen level 
     
     >
     
      or something for splitting up the messages to the proper info window 
     
     >
     
      however?
     
     
  You're guess is correct - color text goes to the second window.

  note that the client gets nothing other than the desired color the text should 
e in, and the text itself.  It doesn't get any other content - listen listen is 
a filter that is handled on the server side of things.

  It's been on the TODO list for a long time to have content tags instead of 
color information sent to the client.  Examples of some of the content type tags 
could be things like attack message, level gain, level loss, shout, say, shop 
listing, etc.

  The client could then figure out what to do based on the content tag, 
including changing font as well as color (things like shop and some other 
listings work best with fixed width fonts for example).

  It's not a particularly hard thing to do.  The server could even have a 
mapping of the new content types back to the current color scheme to support old 
clients (eg, convert NDI_LEVEL_GAIN to NDI_RED for example).

  The real issue is that there are 1000+ calls to the various draw_info 
functions wihtin the server.  A lot of them default to black right now, but 
realistically, everything should be given some content type (the client could 
presumably treat any it doesn't undertand by using default value, so new ones 
can get added in as needed without causing any real issues)

  Probably still want to keep it somewhat limited - one idea about having it on 
the client is that you could let the player customize the various aspects, eg, 
font, color, and what window(s) it goes to.


_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list