Retro68/Console/ConsoleTest.cc

24 lines
588 B
C++
Raw Normal View History

2019-01-08 23:12:47 +00:00
#include "retro/Console.h"
#include <string.h>
2019-01-08 23:12:47 +00:00
namespace retro
{
void InitConsole();
}
int main()
{
retro::InitConsole();
2020-01-12 21:09:04 +00:00
std::string out = "Hello, \033[1mexternal world of \033[0m\033[3mtrue beauty and \033[4mgreatness\033[0m.\nEnter \"exit\" to quit.\n";
retro::Console::currentInstance->write(out.data(), out.size());
std::string in;
do
{
in = retro::Console::currentInstance->ReadLine();
out = "You Entered: " + in;
retro::Console::currentInstance->write(out.data(), out.size());
} while(in != "exit\n");
return 0;
}