Skip to content

Commit

Permalink
Added Draw and Write methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Jalae committed Feb 27, 2012
1 parent ea60a70 commit 0b71aa1
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Console.h
Expand Up @@ -203,7 +203,35 @@ class console
} }


//Output Functions //Output Functions
void Draw()
{
SwapDisplayBuffers();
}


void Write(charT* str)
{
CHAR_INFO temp;
WORD attrib=8;
while(*str)
{
//figureout if str* is an escape sequence-|
//if it is change attrib to match---------|-1 function
ParseEscape(str, attrib);
//build temp
temp = BuildCharInfo(*str, attrib);
SMALL_RECT rec = {vCursorPos.X,vCursorPos.Y,vCursorPos.X,vCursorPos.Y};
WriteConsoleOutput(
ConsoleState->out_buffer,
&temp,
ONE_COORD,
ORIGIN,
&rec
);
vCursorPos.X++;
str++;
}

}


//Input Functions //Input Functions


Expand Down

0 comments on commit 0b71aa1

Please sign in to comment.