18.01.2009, 17:02
Well, no params, only return value, or maybe
GetConsoleBufferSize(&width, &height) //width in 'characters', height in 'lines'
So if you know the width buffer, you can print string of the same length, for making nice tables for example
. And height buffer can be useful for clearing the console for example
But that's no more related to console colors. I also wonder if it's possible to move cursor, as originally possible in Pawn, ad get/set the color of only where the cursor is (this join my other suggestion of start/end, which you said is impossible because of logprintf, but i really think it's possible to get and set the color of only 1 'cell' of the console buffer). So we can make colored games like tetris or whatever.
GetConsoleBufferSize(&width, &height) //width in 'characters', height in 'lines'
So if you know the width buffer, you can print string of the same length, for making nice tables for example
. And height buffer can be useful for clearing the console for exampleBut that's no more related to console colors. I also wonder if it's possible to move cursor, as originally possible in Pawn, ad get/set the color of only where the cursor is (this join my other suggestion of start/end, which you said is impossible because of logprintf, but i really think it's possible to get and set the color of only 1 'cell' of the console buffer). So we can make colored games like tetris or whatever.
pawn Код:
GetConsoleCursorPos(&x, &y);
SetConsoleCursorPos(x, y);
GetConsoleCell(x, y, &character, &foreground, &background);
SetConsoleCell(x, y, character, e_console_color:foreground, e_console_color:background);
GetConsoleBuffer(startx, starty, endx, endy, bufferdata[], size = sizeof bufferdata); //not sure for those..
SetConsoleBuffer(startx, starty, endx, endy, bufferdata[], size = sizeof bufferdata); //but can be scripted in Pawn

