rtorrent coloured text

This is a discussion on rtorrent coloured text within the C++ Programming forums, part of the General Programming Boards category; <<mod: split from http://cboard.cprogramming.com/showthread.php?t=87701 >> Hi Guys, I have no experience whatsoever in programming, but I like to fiddle with ...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    2
    <<mod: split from Colored Text >>
    Hi Guys,

    I have no experience whatsoever in programming, but I like to fiddle with things, and currently I am playing with rtorrent.

    I have just optimised the rtorrent display for 80 column terminals. And seeing as it all went very smoothly, I figure I should now be able to add some colours to it.

    It is written using ncurses AFAIK, so colourising shouldn't be difficult.

    My problem is that everything I find on the subject makes it look like I have to make an array of some sort.

    Is it at all possible to simply wrap plain text defined in the .cc to colour it? There are only 3 or 4 words I actually want to apply an fg colour too. Otherwise its all default.


    eg. Can I make "Limit off" & "Limit ###" red without defining anything outside the code Ive pasted?

    PHP Code:
      if (torrent::up_throttle() == 0)
        
    first print_buffer(first,last,"Limit off ");
      else
        
    first print_buffer(first,last,"Limit %3iU ",torrent::up_throttle()/1024); 

    Thanks in advance

    =^_^=
    Last edited by Salem; 10-22-2007 at 12:32 AM. Reason: Split the bump

  2. #2
    Registered User
    Join Date
    Oct 2007
    Posts
    2
    Thanks for the move

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A bunch of Linker Errors...
    By Junior89 in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2006, 01:59 PM
  2. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 03:49 PM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 09:45 PM
  5. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 06:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21