<<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 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
=^_^=