Next Generation Emulation banner

C++ Console Text Color

3.4K views 5 replies 3 participants last post by  KillerShots  
#1 ·
I'm trying to make a game for my C++ class and the big problem is graphics. I found out how to change the color of all of the text in the console window, but is it possible to just change individual elements? For instance, there will be words of text on the screen.. is it possible for one word to be, say, yellow and the rest to be white?
 
#2 ·
For some good tips on console functions, go here... covers colored text, mouse in a console, putting text into any cell on the screen (not having to go in order from left-right, top-bottom), etc.... something I would have killed for a few years ago :) Have fun!
 
#3 ·
Thanks a lot! :) I'm attempting to make Advance Wars, albeit a really simple and crappy looking version. Color is integral to the display of the units so I'll fiddle around with the functions and hopefully be able to display different colors. Those other tutorials look interesting, as well.
 
#4 ·
Heh, that's why I gave the link to the tutorials list rather than the color-specific one - they are very interesting :)
 
#6 ·
Yep - bear in mind a lot of the tutorials I showed require <windows.h>... you won't find that in linux/unix - in that case, like Ipswitch says, ncurses seems to be the way to go :)