mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-26 00:32:02 +00:00
32 lines
502 B
C++
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);
|
|
};
|
|
|