Mapping Console Text colors to PB Values.

Windows specific forum
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Mapping Console Text colors to PB Values.

Post by jassing »

Is there a way to easily map a consoles text attribute (CONSOLE_SCREEN_BUFFER_INFO\wAttributes) to PB's Color list?
Or do I need to code it manually?

ie: You can fetch the consoles current text attribute (default: light gray on black)
but wAttributes returns individual RGB values, ultimately, what I need to do is detect current color, change it for my output, then return it back to what it was before my app started.

There aren't that many color combo's So I can easily code a bunch of if statements -- but why re-invent the wheel if I'm overlooking something obvious.


Thanks