Changing Console Cursor

Write your question here.
My Question is same as the title of thread...
I'm making a game in C++ which look likes with that of PACMan
I've coded it almost, but there's a problem... the shape of pacman used in this code is black blinking cursor, how can I change it ? and use my own custom pacman to eat foods

You can't change the cursor to any arbitrary shape.

You can turn it off, and use a different character for Pac-Man, which you can animate with different characters -- for example, an alternating 'C' and 'O'.


After you get this working, have you considered playing with SDL or SFML?

Good luck!
There's also a way to alter the cursor size if it helps. The cursor size can be set from 1-99 using commands like SetCursorSize(99);.
1
2
3
4
5
6
7
8
9
void SetCursorSize(const int iSize = 0)
{
   HANDLE cxHandle;
   cxHandle = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_CURSOR_INFO cci;
    cci.dwSize = iSize;
    cci.bVisible = true;
    SetConsoleCursorInfo(cxHandle, &cci );
}//End SetCursorSize  
Last edited on
Topic archived. No new replies allowed.