Retro68/App2/Console.h
2012-04-06 01:43:44 +02:00

32 lines
502 B
C++

#include <Quickdraw.h>
#include <vector>
#include <string>
class Console
{
public:
Console(GrafPtr port, Rect r);
void Draw();
void putch(char c);
std::string ReadLine();
static Console *currentInstance;
private:
GrafPtr consolePort;
Rect bounds;
std::vector<char> chars;
short cellSizeX;
short cellSizeY;
short rows, cols;
short cursorX, cursorY;
Rect CellRect(short x, short y);
void DrawCell(short x, short y);
void ScrollUp(short n = 1);
};