Console Stuff

This is a discussion on Console Stuff within the Game Programming forums, part of the General Programming Boards category; I know how to get console text colored. So what I want to know is to just color a space. ...

  1. #1
    Rabite SirCrono6's Avatar
    Join Date
    Nov 2003
    Location
    California, US
    Posts
    269

    Question Console Stuff

    I know how to get console text colored. So what I want to know is to just color a space. Sort of like a colored space. Like in tanks (see games post).

    - SirCrono6
    Last edited by SirCrono6; 12-29-2003 at 02:16 PM.
    From C to shining C++!

    Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
    - Bubba

    IDE and Compiler - Code::Blocks with MinGW
    Operating System - Windows XP Professional x64 Edition

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    195
    There are two ways to handle this:

    One possibility is to use the " " (space) character and set the Background color to what you want it to. The Foreground obviously doesnt matter.


    The second way, which i use, is this character, "" which you can just copy and paste. It is a blank block, and you can set the color to whatever you want.

    Good luck hope this helps

  3. #3
    Registered User harryP's Avatar
    Join Date
    Sep 2002
    Posts
    124
    You can use any character. Just set the foreground and background colours to the same value.

    Brendan
    Draco dormiens nunquam titallandus.
    Console Graphics Library: http://www.geocities.com/steve_alberto/cgl.html

  4. #4
    Rabite SirCrono6's Avatar
    Join Date
    Nov 2003
    Location
    California, US
    Posts
    269
    Thanks. I like the way. I even made a Color.h . Well, anyways, how do I set it back to the default color? You know, set it to blue, then back to default.

    - SirCrono6
    From C to shining C++!

    Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
    - Bubba

    IDE and Compiler - Code::Blocks with MinGW
    Operating System - Windows XP Professional x64 Edition

  5. #5
    Registered User harryP's Avatar
    Join Date
    Sep 2002
    Posts
    124
    Foreground colour: Light grey, background colour: 0.
    Code:
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE,
    FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE 
     0);
    Brendan
    Draco dormiens nunquam titallandus.
    Console Graphics Library: http://www.geocities.com/steve_alberto/cgl.html

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems with a simple console game
    By DZeek in forum C++ Programming
    Replies: 9
    Last Post: 03-06-2005, 01:02 PM
  2. Console Functions Help
    By Artist_of_dream in forum C++ Programming
    Replies: 9
    Last Post: 12-04-2004, 02:44 AM
  3. Output to console window...
    By alvifarooq in forum C++ Programming
    Replies: 2
    Last Post: 10-26-2004, 08:56 PM
  4. win32 apps compiled with GCC start console window!
    By Citrus538 in forum Windows Programming
    Replies: 5
    Last Post: 02-18-2002, 09:35 PM
  5. Just one Question?
    By Irish-Slasher in forum C++ Programming
    Replies: 6
    Last Post: 02-12-2002, 09:19 AM

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